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()
186 const CGBlockInfo &blockInfo) { in buildBlockDescriptor() argument
204 descName = getBlockDescriptorName(blockInfo, CGM); in buildBlockDescriptor()
222 elements.addInt(ulong, blockInfo.BlockSize.getQuantity()); in buildBlockDescriptor()
226 if (blockInfo.needsCopyDisposeHelpers()) { in buildBlockDescriptor()
228 llvm::Constant *copyHelper = buildCopyHelper(CGM, blockInfo); in buildBlockDescriptor()
232 llvm::Constant *disposeHelper = buildDisposeHelper(CGM, blockInfo); in buildBlockDescriptor()
243 CGM.getContext().getObjCEncodingForBlock(blockInfo.getBlockExpr()); in buildBlockDescriptor()
250 elements.add(CGM.getObjCRuntime().BuildGCBlockLayout(CGM, blockInfo)); in buildBlockDescriptor()
252 elements.add(CGM.getObjCRuntime().BuildRCBlockLayout(CGM, blockInfo)); in buildBlockDescriptor()
787 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), CurFn->getName()); in EmitBlockLiteral() local
788 computeBlockInfo(CGM, this, blockInfo); in EmitBlockLiteral()
789 blockInfo.BlockExpression = blockExpr; in EmitBlockLiteral()
790 if (!blockInfo.CanBeGlobal) in EmitBlockLiteral()
791 blockInfo.LocalAddress = CreateTempAlloca(blockInfo.StructureType, in EmitBlockLiteral()
792 blockInfo.BlockAlign, "block"); in EmitBlockLiteral()
793 return EmitBlockLiteral(blockInfo); in EmitBlockLiteral()
796 llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { in EmitBlockLiteral() argument
806 bool isLambdaConv = blockInfo.getBlockDecl()->isConversionFromLambda(); in EmitBlockLiteral()
810 CurGD, blockInfo, LocalDeclMap, isLambdaConv, blockInfo.CanBeGlobal); in EmitBlockLiteral()
814 if (blockInfo.CanBeGlobal) in EmitBlockLiteral()
815 return CGM.getAddrOfGlobalBlockIfEmitted(blockInfo.BlockExpression); in EmitBlockLiteral()
819 Address blockAddr = blockInfo.LocalAddress; in EmitBlockLiteral()
829 llvm::Constant *blockISA = blockInfo.getBlockDecl()->doesNotEscape() in EmitBlockLiteral()
835 descriptor = buildBlockDescriptor(CGM, blockInfo); in EmitBlockLiteral()
839 if (blockInfo.HasCapturedVariableLayout) in EmitBlockLiteral()
841 if (blockInfo.needsCopyDisposeHelpers()) in EmitBlockLiteral()
843 if (blockInfo.HasCXXObject) in EmitBlockLiteral()
845 if (blockInfo.UsesStret) in EmitBlockLiteral()
847 if (blockInfo.getBlockDecl()->doesNotEscape()) in EmitBlockLiteral()
878 llvm::ConstantInt::get(IntTy, blockInfo.BlockSize.getQuantity()), in EmitBlockLiteral()
881 llvm::ConstantInt::get(IntTy, blockInfo.BlockAlign.getQuantity()), in EmitBlockLiteral()
889 for (auto I : Helper->getCustomFieldValues(*this, blockInfo)) { in EmitBlockLiteral()
900 const BlockDecl *blockDecl = blockInfo.getBlockDecl(); in EmitBlockLiteral()
905 projectField(blockInfo.CXXThisIndex, "block.captured-this.addr"); in EmitBlockLiteral()
912 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in EmitBlockLiteral()
1036 if (!blockInfo.NeedsCopyDispose) in EmitBlockLiteral()
1098 blockAddr.getPointer(), ConvertType(blockInfo.getBlockExpr()->getType())); in EmitBlockLiteral()
1101 CGM.getOpenCLRuntime().recordBlockInfo(blockInfo.BlockExpression, InvokeFn, in EmitBlockLiteral()
1292 CGBlockInfo blockInfo(BE->getBlockDecl(), Name); in GetAddrOfGlobalBlock() local
1293 blockInfo.BlockExpression = BE; in GetAddrOfGlobalBlock()
1296 computeBlockInfo(*this, nullptr, blockInfo); in GetAddrOfGlobalBlock()
1302 GlobalDecl(), blockInfo, LocalDeclMap, in GetAddrOfGlobalBlock()
1310 const CGBlockInfo &blockInfo, in buildGlobalBlock() argument
1312 assert(blockInfo.CanBeGlobal); in buildGlobalBlock()
1316 assert(!CGM.getAddrOfGlobalBlockIfEmitted(blockInfo.BlockExpression) && in buildGlobalBlock()
1334 if (blockInfo.UsesStret) in buildGlobalBlock()
1342 fields.addInt(CGM.IntTy, blockInfo.BlockSize.getQuantity()); in buildGlobalBlock()
1343 fields.addInt(CGM.IntTy, blockInfo.BlockAlign.getQuantity()); in buildGlobalBlock()
1351 fields.add(buildBlockDescriptor(CGM, blockInfo)); in buildGlobalBlock()
1354 for (auto I : Helper->getCustomFieldValues(CGM, blockInfo)) { in buildGlobalBlock()
1364 "__block_literal_global", blockInfo.BlockAlign, in buildGlobalBlock()
1392 CGM.getTypes().ConvertType(blockInfo.getBlockExpr()->getType()); in buildGlobalBlock()
1395 CGM.setAddrOfGlobalBlock(blockInfo.BlockExpression, Result); in buildGlobalBlock()
1398 blockInfo.BlockExpression, in buildGlobalBlock()
1443 const CGBlockInfo &blockInfo, in GenerateBlockFunction() argument
1447 const BlockDecl *blockDecl = blockInfo.getBlockDecl(); in GenerateBlockFunction()
1451 CurEHLocation = blockInfo.getBlockExpr()->getEndLoc(); in GenerateBlockFunction()
1453 BlockInfo = &blockInfo; in GenerateBlockFunction()
1492 const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType(); in GenerateBlockFunction()
1496 blockInfo.UsesStret = true; in GenerateBlockFunction()
1509 buildGlobalBlock(CGM, blockInfo, in GenerateBlockFunction()
1516 blockInfo.getBlockExpr()->getBody()->getBeginLoc()); in GenerateBlockFunction()
1539 LoadBlockStruct(), blockInfo.CXXThisIndex, "block.captured-this"); in GenerateBlockFunction()
1546 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in GenerateBlockFunction()
1586 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in GenerateBlockFunction()
1595 variable, BlockPointerDbgLoc, Builder, blockInfo, in GenerateBlockFunction()
1918 CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { in GenerateCopyHelperFunction() argument
1920 findBlockCapturedManagedEntities(blockInfo, getLangOpts(), CopiedCaptures); in GenerateCopyHelperFunction()
1922 getCopyDestroyHelperFuncName(CopiedCaptures, blockInfo.BlockAlign, in GenerateCopyHelperFunction()
1961 setBlockHelperAttributesVisibility(blockInfo.CapturesNonExternalType, Fn, FI, in GenerateCopyHelperFunction()
1968 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo(); in GenerateCopyHelperFunction()
1971 src = Address(Builder.CreateLoad(src), blockInfo.BlockAlign); in GenerateCopyHelperFunction()
1975 dst = Address(Builder.CreateLoad(dst), blockInfo.BlockAlign); in GenerateCopyHelperFunction()
2115 CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { in GenerateDestroyHelperFunction() argument
2117 findBlockCapturedManagedEntities(blockInfo, getLangOpts(), DestroyedCaptures); in GenerateDestroyHelperFunction()
2119 getCopyDestroyHelperFuncName(DestroyedCaptures, blockInfo.BlockAlign, in GenerateDestroyHelperFunction()
2156 setBlockHelperAttributesVisibility(blockInfo.CapturesNonExternalType, Fn, FI, in GenerateDestroyHelperFunction()
2165 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo(); in GenerateDestroyHelperFunction()
2168 src = Address(Builder.CreateLoad(src), blockInfo.BlockAlign); in GenerateDestroyHelperFunction()