Lines Matching refs:blockInfo
53 const CGBlockInfo &blockInfo,
58 const CGBlockInfo &blockInfo) { in buildCopyHelper() argument
59 return CodeGenFunction(CGM).GenerateCopyHelperFunction(blockInfo); in buildCopyHelper()
64 const CGBlockInfo &blockInfo) { in buildDisposeHelper() argument
65 return CodeGenFunction(CGM).GenerateDestroyHelperFunction(blockInfo); in buildDisposeHelper()
187 const CGBlockInfo &blockInfo) { in buildBlockDescriptor() argument
205 descName = getBlockDescriptorName(blockInfo, CGM); in buildBlockDescriptor()
223 elements.addInt(ulong, blockInfo.BlockSize.getQuantity()); in buildBlockDescriptor()
227 if (blockInfo.needsCopyDisposeHelpers()) { in buildBlockDescriptor()
229 llvm::Constant *copyHelper = buildCopyHelper(CGM, blockInfo); in buildBlockDescriptor()
233 llvm::Constant *disposeHelper = buildDisposeHelper(CGM, blockInfo); in buildBlockDescriptor()
244 CGM.getContext().getObjCEncodingForBlock(blockInfo.getBlockExpr()); in buildBlockDescriptor()
251 elements.add(CGM.getObjCRuntime().BuildGCBlockLayout(CGM, blockInfo)); in buildBlockDescriptor()
253 elements.add(CGM.getObjCRuntime().BuildRCBlockLayout(CGM, blockInfo)); in buildBlockDescriptor()
784 CGBlockInfo &blockInfo = in enterBlockScope() local
786 blockInfo.NextBlockInfo = CGF.FirstBlockInfo; in enterBlockScope()
787 CGF.FirstBlockInfo = &blockInfo; in enterBlockScope()
791 computeBlockInfo(CGF.CGM, &CGF, blockInfo); in enterBlockScope()
794 if (blockInfo.CanBeGlobal) return; in enterBlockScope()
797 blockInfo.LocalAddress = CGF.CreateTempAlloca(blockInfo.StructureType, in enterBlockScope()
798 blockInfo.BlockAlign, "block"); in enterBlockScope()
801 if (!blockInfo.NeedsCopyDispose) return; in enterBlockScope()
812 CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in enterBlockScope()
841 Address addr = CGF.Builder.CreateStructGEP(blockInfo.LocalAddress, in enterBlockScope()
846 if (!blockInfo.DominatingIP) in enterBlockScope()
847 blockInfo.DominatingIP = cast<llvm::Instruction>(addr.getPointer()); in enterBlockScope()
910 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), CurFn->getName()); in EmitBlockLiteral() local
911 computeBlockInfo(CGM, this, blockInfo); in EmitBlockLiteral()
912 blockInfo.BlockExpression = blockExpr; in EmitBlockLiteral()
913 return EmitBlockLiteral(blockInfo); in EmitBlockLiteral()
917 std::unique_ptr<CGBlockInfo> blockInfo; in EmitBlockLiteral() local
918 blockInfo.reset(findAndRemoveBlockInfo(&FirstBlockInfo, in EmitBlockLiteral()
921 blockInfo->BlockExpression = blockExpr; in EmitBlockLiteral()
922 return EmitBlockLiteral(*blockInfo); in EmitBlockLiteral()
925 llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { in EmitBlockLiteral() argument
935 bool isLambdaConv = blockInfo.getBlockDecl()->isConversionFromLambda(); in EmitBlockLiteral()
939 CurGD, blockInfo, LocalDeclMap, isLambdaConv, blockInfo.CanBeGlobal); in EmitBlockLiteral()
943 if (blockInfo.CanBeGlobal) in EmitBlockLiteral()
944 return CGM.getAddrOfGlobalBlockIfEmitted(blockInfo.BlockExpression); in EmitBlockLiteral()
948 Address blockAddr = blockInfo.LocalAddress; in EmitBlockLiteral()
958 llvm::Constant *blockISA = blockInfo.getBlockDecl()->doesNotEscape() in EmitBlockLiteral()
964 descriptor = buildBlockDescriptor(CGM, blockInfo); in EmitBlockLiteral()
968 if (blockInfo.HasCapturedVariableLayout) in EmitBlockLiteral()
970 if (blockInfo.needsCopyDisposeHelpers()) in EmitBlockLiteral()
972 if (blockInfo.HasCXXObject) in EmitBlockLiteral()
974 if (blockInfo.UsesStret) in EmitBlockLiteral()
976 if (blockInfo.getBlockDecl()->doesNotEscape()) in EmitBlockLiteral()
1010 llvm::ConstantInt::get(IntTy, blockInfo.BlockSize.getQuantity()), in EmitBlockLiteral()
1013 llvm::ConstantInt::get(IntTy, blockInfo.BlockAlign.getQuantity()), in EmitBlockLiteral()
1021 for (auto I : Helper->getCustomFieldValues(*this, blockInfo)) { in EmitBlockLiteral()
1032 const BlockDecl *blockDecl = blockInfo.getBlockDecl(); in EmitBlockLiteral()
1036 Address addr = projectField(blockInfo.CXXThisIndex, blockInfo.CXXThisOffset, in EmitBlockLiteral()
1044 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in EmitBlockLiteral()
1173 ActivateCleanupBlock(cleanup, blockInfo.DominatingIP); in EmitBlockLiteral()
1180 blockAddr.getPointer(), ConvertType(blockInfo.getBlockExpr()->getType())); in EmitBlockLiteral()
1183 CGM.getOpenCLRuntime().recordBlockInfo(blockInfo.BlockExpression, InvokeFn, in EmitBlockLiteral()
1376 CGBlockInfo blockInfo(BE->getBlockDecl(), Name); in GetAddrOfGlobalBlock() local
1377 blockInfo.BlockExpression = BE; in GetAddrOfGlobalBlock()
1380 computeBlockInfo(*this, nullptr, blockInfo); in GetAddrOfGlobalBlock()
1386 GlobalDecl(), blockInfo, LocalDeclMap, in GetAddrOfGlobalBlock()
1394 const CGBlockInfo &blockInfo, in buildGlobalBlock() argument
1396 assert(blockInfo.CanBeGlobal); in buildGlobalBlock()
1400 assert(!CGM.getAddrOfGlobalBlockIfEmitted(blockInfo.BlockExpression) && in buildGlobalBlock()
1418 if (blockInfo.UsesStret) in buildGlobalBlock()
1426 fields.addInt(CGM.IntTy, blockInfo.BlockSize.getQuantity()); in buildGlobalBlock()
1427 fields.addInt(CGM.IntTy, blockInfo.BlockAlign.getQuantity()); in buildGlobalBlock()
1435 fields.add(buildBlockDescriptor(CGM, blockInfo)); in buildGlobalBlock()
1438 for (auto I : Helper->getCustomFieldValues(CGM, blockInfo)) { in buildGlobalBlock()
1448 "__block_literal_global", blockInfo.BlockAlign, in buildGlobalBlock()
1473 CGM.getTypes().ConvertType(blockInfo.getBlockExpr()->getType()); in buildGlobalBlock()
1476 CGM.setAddrOfGlobalBlock(blockInfo.BlockExpression, Result); in buildGlobalBlock()
1479 blockInfo.BlockExpression, in buildGlobalBlock()
1525 const CGBlockInfo &blockInfo, in GenerateBlockFunction() argument
1529 const BlockDecl *blockDecl = blockInfo.getBlockDecl(); in GenerateBlockFunction()
1533 CurEHLocation = blockInfo.getBlockExpr()->getEndLoc(); in GenerateBlockFunction()
1535 BlockInfo = &blockInfo; in GenerateBlockFunction()
1574 const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType(); in GenerateBlockFunction()
1578 blockInfo.UsesStret = true; in GenerateBlockFunction()
1591 buildGlobalBlock(CGM, blockInfo, in GenerateBlockFunction()
1598 blockInfo.getBlockExpr()->getBody()->getBeginLoc()); in GenerateBlockFunction()
1621 Builder.CreateStructGEP(LoadBlockStruct(), blockInfo.CXXThisIndex, in GenerateBlockFunction()
1622 blockInfo.CXXThisOffset, "block.captured-this"); in GenerateBlockFunction()
1629 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in GenerateBlockFunction()
1670 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable); in GenerateBlockFunction()
1679 variable, BlockPointerDbgLoc, Builder, blockInfo, in GenerateBlockFunction()
2002 CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { in GenerateCopyHelperFunction() argument
2004 findBlockCapturedManagedEntities(blockInfo, getLangOpts(), CopiedCaptures); in GenerateCopyHelperFunction()
2006 getCopyDestroyHelperFuncName(CopiedCaptures, blockInfo.BlockAlign, in GenerateCopyHelperFunction()
2044 setBlockHelperAttributesVisibility(blockInfo.CapturesNonExternalType, Fn, FI, in GenerateCopyHelperFunction()
2047 ApplyDebugLocation NL{*this, blockInfo.getBlockExpr()->getBeginLoc()}; in GenerateCopyHelperFunction()
2048 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo(); in GenerateCopyHelperFunction()
2051 src = Address(Builder.CreateLoad(src), blockInfo.BlockAlign); in GenerateCopyHelperFunction()
2055 dst = Address(Builder.CreateLoad(dst), blockInfo.BlockAlign); in GenerateCopyHelperFunction()
2195 CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { in GenerateDestroyHelperFunction() argument
2197 findBlockCapturedManagedEntities(blockInfo, getLangOpts(), DestroyedCaptures); in GenerateDestroyHelperFunction()
2199 getCopyDestroyHelperFuncName(DestroyedCaptures, blockInfo.BlockAlign, in GenerateDestroyHelperFunction()
2234 setBlockHelperAttributesVisibility(blockInfo.CapturesNonExternalType, Fn, FI, in GenerateDestroyHelperFunction()
2239 ApplyDebugLocation NL{*this, blockInfo.getBlockExpr()->getBeginLoc()}; in GenerateDestroyHelperFunction()
2241 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo(); in GenerateDestroyHelperFunction()
2244 src = Address(Builder.CreateLoad(src), blockInfo.BlockAlign); in GenerateDestroyHelperFunction()