Lines Matching refs:blockInfo
52 const CGBlockInfo &blockInfo,
57 const CGBlockInfo &blockInfo) { in buildCopyHelper() argument
58 return CodeGenFunction(CGM).GenerateCopyHelperFunction(blockInfo); in buildCopyHelper()
63 const CGBlockInfo &blockInfo) { in buildDisposeHelper() argument
64 return CodeGenFunction(CGM).GenerateDestroyHelperFunction(blockInfo); in buildDisposeHelper()
170 const CGBlockInfo &blockInfo) { in buildBlockDescriptor() argument
188 descName = getBlockDescriptorName(blockInfo, CGM); in buildBlockDescriptor()
206 elements.addInt(ulong, blockInfo.BlockSize.getQuantity()); in buildBlockDescriptor()
210 if (blockInfo.NeedsCopyDispose) { in buildBlockDescriptor()
212 llvm::Constant *copyHelper = buildCopyHelper(CGM, blockInfo); in buildBlockDescriptor()
216 llvm::Constant *disposeHelper = buildDisposeHelper(CGM, blockInfo); in buildBlockDescriptor()
228 CGM.getContext().getObjCEncodingForBlock(blockInfo.getBlockExpr()); in buildBlockDescriptor()
235 elements.add(CGM.getObjCRuntime().BuildGCBlockLayout(CGM, blockInfo)); in buildBlockDescriptor()
237 elements.add(CGM.getObjCRuntime().BuildRCBlockLayout(CGM, blockInfo)); in buildBlockDescriptor()
794 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), CurFn->getName()); in EmitBlockLiteral() local
795 computeBlockInfo(CGM, this, blockInfo); in EmitBlockLiteral()
796 blockInfo.BlockExpression = blockExpr; in EmitBlockLiteral()
797 if (!blockInfo.CanBeGlobal) in EmitBlockLiteral()
798 blockInfo.LocalAddress = CreateTempAlloca(blockInfo.StructureType, in EmitBlockLiteral()
799 blockInfo.BlockAlign, "block"); in EmitBlockLiteral()
800 return EmitBlockLiteral(blockInfo); in EmitBlockLiteral()
803 llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { in EmitBlockLiteral() argument
813 bool isLambdaConv = blockInfo.getBlockDecl()->isConversionFromLambda(); in EmitBlockLiteral()
817 CurGD, blockInfo, LocalDeclMap, isLambdaConv, blockInfo.CanBeGlobal); in EmitBlockLiteral()
821 if (blockInfo.CanBeGlobal) in EmitBlockLiteral()
822 return CGM.getAddrOfGlobalBlockIfEmitted(blockInfo.BlockExpression); in EmitBlockLiteral()
826 Address blockAddr = blockInfo.LocalAddress; in EmitBlockLiteral()
836 llvm::Constant *blockISA = blockInfo.NoEscape in EmitBlockLiteral()
842 descriptor = buildBlockDescriptor(CGM, blockInfo); in EmitBlockLiteral()
846 if (blockInfo.HasCapturedVariableLayout) in EmitBlockLiteral()
848 if (blockInfo.NeedsCopyDispose) in EmitBlockLiteral()
850 if (blockInfo.HasCXXObject) in EmitBlockLiteral()
852 if (blockInfo.UsesStret) in EmitBlockLiteral()
854 if (blockInfo.NoEscape) in EmitBlockLiteral()
885 llvm::ConstantInt::get(IntTy, blockInfo.BlockSize.getQuantity()), in EmitBlockLiteral()
888 llvm::ConstantInt::get(IntTy, blockInfo.BlockAlign.getQuantity()), in EmitBlockLiteral()
896 for (auto I : Helper->getCustomFieldValues(*this, blockInfo)) { in EmitBlockLiteral()
907 const BlockDecl *blockDecl = blockInfo.getBlockDecl(); in EmitBlockLiteral()
912 projectField(blockInfo.CXXThisIndex, "block.captured-this.addr"); in EmitBlockLiteral()
919 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in EmitBlockLiteral()
1043 if (!blockInfo.NoEscape && !blockInfo.NeedsCopyDispose) in EmitBlockLiteral()
1105 blockAddr.getPointer(), ConvertType(blockInfo.getBlockExpr()->getType())); in EmitBlockLiteral()
1108 CGM.getOpenCLRuntime().recordBlockInfo(blockInfo.BlockExpression, InvokeFn, in EmitBlockLiteral()
1109 result, blockInfo.StructureType); in EmitBlockLiteral()
1297 CGBlockInfo blockInfo(BE->getBlockDecl(), Name); in GetAddrOfGlobalBlock() local
1298 blockInfo.BlockExpression = BE; in GetAddrOfGlobalBlock()
1301 computeBlockInfo(*this, nullptr, blockInfo); in GetAddrOfGlobalBlock()
1307 GlobalDecl(), blockInfo, LocalDeclMap, in GetAddrOfGlobalBlock()
1315 const CGBlockInfo &blockInfo, in buildGlobalBlock() argument
1317 assert(blockInfo.CanBeGlobal); in buildGlobalBlock()
1321 assert(!CGM.getAddrOfGlobalBlockIfEmitted(blockInfo.BlockExpression) && in buildGlobalBlock()
1339 if (blockInfo.UsesStret) in buildGlobalBlock()
1347 fields.addInt(CGM.IntTy, blockInfo.BlockSize.getQuantity()); in buildGlobalBlock()
1348 fields.addInt(CGM.IntTy, blockInfo.BlockAlign.getQuantity()); in buildGlobalBlock()
1356 fields.add(buildBlockDescriptor(CGM, blockInfo)); in buildGlobalBlock()
1359 for (auto I : Helper->getCustomFieldValues(CGM, blockInfo)) { in buildGlobalBlock()
1369 "__block_literal_global", blockInfo.BlockAlign, in buildGlobalBlock()
1397 CGM.getTypes().ConvertType(blockInfo.getBlockExpr()->getType()); in buildGlobalBlock()
1400 CGM.setAddrOfGlobalBlock(blockInfo.BlockExpression, Result); in buildGlobalBlock()
1403 blockInfo.BlockExpression, in buildGlobalBlock()
1448 GlobalDecl GD, const CGBlockInfo &blockInfo, const DeclMapTy &ldm, in GenerateBlockFunction() argument
1450 const BlockDecl *blockDecl = blockInfo.getBlockDecl(); in GenerateBlockFunction()
1454 CurEHLocation = blockInfo.getBlockExpr()->getEndLoc(); in GenerateBlockFunction()
1456 BlockInfo = &blockInfo; in GenerateBlockFunction()
1495 const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType(); in GenerateBlockFunction()
1499 blockInfo.UsesStret = true; in GenerateBlockFunction()
1512 buildGlobalBlock(CGM, blockInfo, in GenerateBlockFunction()
1519 blockInfo.getBlockExpr()->getBody()->getBeginLoc()); in GenerateBlockFunction()
1542 LoadBlockStruct(), blockInfo.CXXThisIndex, "block.captured-this"); in GenerateBlockFunction()
1549 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in GenerateBlockFunction()
1589 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in GenerateBlockFunction()
1598 variable, BlockPointerDbgLoc, Builder, blockInfo, in GenerateBlockFunction()
1900 CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { in GenerateCopyHelperFunction() argument
1902 blockInfo.SortedCaptures, blockInfo.BlockAlign, in GenerateCopyHelperFunction()
1935 setBlockHelperAttributesVisibility(blockInfo.CapturesNonExternalType, Fn, FI, in GenerateCopyHelperFunction()
1941 src = Address(Builder.CreateLoad(src), Int8Ty, blockInfo.BlockAlign); in GenerateCopyHelperFunction()
1942 src = Builder.CreateElementBitCast(src, blockInfo.StructureType, in GenerateCopyHelperFunction()
1946 dst = Address(Builder.CreateLoad(dst), Int8Ty, blockInfo.BlockAlign); in GenerateCopyHelperFunction()
1948 Builder.CreateElementBitCast(dst, blockInfo.StructureType, "block.dest"); in GenerateCopyHelperFunction()
1950 for (auto &capture : blockInfo.SortedCaptures) { in GenerateCopyHelperFunction()
2091 CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { in GenerateDestroyHelperFunction() argument
2093 blockInfo.SortedCaptures, blockInfo.BlockAlign, in GenerateDestroyHelperFunction()
2123 setBlockHelperAttributesVisibility(blockInfo.CapturesNonExternalType, Fn, FI, in GenerateDestroyHelperFunction()
2131 src = Address(Builder.CreateLoad(src), Int8Ty, blockInfo.BlockAlign); in GenerateDestroyHelperFunction()
2132 src = Builder.CreateElementBitCast(src, blockInfo.StructureType, "block"); in GenerateDestroyHelperFunction()
2136 for (auto &capture : blockInfo.SortedCaptures) { in GenerateDestroyHelperFunction()