Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Block

30     HasCXXObject(false), UsesStret(false), StructureType(0), Block(blockExpr) {
40 /// Build the given block as a global block.
45 /// Build the helper function to copy a block.
51 /// Build the helper function to dipose of a block.
57 /// Build the block descriptor constant for a block.
109 Purely notional variadic template describing the layout of a block.
125 /// 25. BLOCK_HAS_COPY_DISPOSE - indicates that the block
129 /// 28. BLOCK_IS_GLOBAL - indicates that the block is allocated
131 /// 29. BLOCK_USE_STRET - indicates that the block function
133 /// 30. BLOCK_HAS_SIGNATURE - indicates that the block has an
136 /// 24. BLOCK_NEEDS_FREE - indicates that the block has been moved
138 /// 27. BLOCK_IS_GC - indicates that the block has been moved to
147 /// Function pointer generated from block literal.
150 /// Block description metadata generated from block literal.
158 /// The number of fields in a block header.
162 /// A chunk of data that we actually have to capture in the block.
174 /// Tell the block info that this chunk has the given field index.
211 /// actually need to keep storage for it in the block; we'll just
212 /// rematerialize it at the start of the block function. This is
277 /// Compute the layout of the given block. Attempts to lay the block
281 const BlockDecl *block = info.getBlockDecl();
286 if (!block->hasCaptures()) {
295 layout.reserve(block->capturesCXXThis() +
296 (block->capture_end() - block->capture_begin()));
301 if (block->capturesCXXThis()) {
302 const DeclContext *DC = block->getDeclContext();
319 // Next, all the block captures.
320 for (BlockDecl::capture_const_iterator ci = block->capture_begin(),
321 ce = block->capture_end(); ci != ce; ++ci) {
363 // Block pointers require copy/dispose. So do Objective-C pointers.
484 /// Emit a block literal expression in the current function.
489 // Compute information about the layout, etc., of this block.
492 // Using that metadata, generate the actual block function.
498 // If there is nothing to capture, we can emit this as a global block.
502 // Otherwise, we have to emit this as a local block.
507 // Build the block descriptor.
513 CreateTempAlloca(blockInfo.StructureType, "block");
516 // Compute the initial on-stack block flags.
522 // Initialize the block literal.
523 Builder.CreateStore(isa, Builder.CreateStructGEP(blockAddr, 0, "block.isa"));
525 Builder.CreateStructGEP(blockAddr, 1, "block.flags"));
527 Builder.CreateStructGEP(blockAddr, 2, "block.reserved"));
529 "block.invoke"));
531 "block.descriptor"));
533 // Finally, capture all the values into the block.
540 "block.captured-this.addr");
559 "block.captured");
562 // block literal.
565 // We need to use the capture from the enclosing block.
572 "block.capture.addr");
579 // the block field. There's no need to chase the forwarding
592 // If we have a copy constructor, evaluate that into the block field.
596 // If it's a reference variable, copy the reference into the block field.
600 // Otherwise, fake up a POD copy into the block field.
633 // Block captures count as local values and have imprecise semantics.
651 // Cast to the converted block-pointer type, which happens (somewhat
679 // const char *signature; // the block signature
720 // Get a pointer to the generic block literal.
724 // Bitcast the callee to a block literal.
726 Builder.CreateBitCast(Callee, BlockLiteralTy, "block.literal");
733 // Add the block literal.
756 // And call the block.
762 assert(BlockInfo && "evaluating block ref without block information?");
770 "block.capture.addr");
803 // Compute information about the layout, etc., of this block.
806 // Using that metadata, generate the actual block function.
824 // Generate the constants for the block literal initializer.
869 // Check if we should generate debug info for this block function.
877 // referenced in a block.
889 // The first argument is the block pointer. Just take it as a void*
934 "block");
941 "block.captured-this");
956 "block.captured-self");
971 CreateMemTemp(variable->getType(), "block.captured-const");
1068 // Check if we should generate debug info for this block helper function.
1086 src = Builder.CreateBitCast(src, structPtrTy, "block.source");
1090 dst = Builder.CreateBitCast(dst, structPtrTy, "block.dest");
1180 // Check if we should generate debug info for this block destroy function.
1199 src = Builder.CreateBitCast(src, structPtrTy, "block");
1333 /// that's not of block-pointer type.
1587 // Block-pointers need to be _Block_copy'ed, so we let the