• Home
  • Raw
  • Download

Lines Matching refs:CGF

263                                             CodeGenFunction *CGF,  in tryCaptureAsConstant()  argument
289 return CGM.EmitConstantInit(*var, CGF); in tryCaptureAsConstant()
321 static void computeBlockInfo(CodeGenModule &CGM, CodeGenFunction *CGF, in computeBlockInfo() argument
348 assert(CGF && CGF->CurFuncDecl && isa<CXXMethodDecl>(CGF->CurFuncDecl) && in computeBlockInfo()
350 QualType thisType = cast<CXXMethodDecl>(CGF->CurFuncDecl)->getThisType(C); in computeBlockInfo()
384 if (llvm::Constant *constant = tryCaptureAsConstant(CGM, CGF, variable)) { in computeBlockInfo()
562 static void enterBlockScope(CodeGenFunction &CGF, BlockDecl *block) { in enterBlockScope() argument
563 assert(CGF.HaveInsertPoint()); in enterBlockScope()
567 *new CGBlockInfo(block, CGF.CurFn->getName()); in enterBlockScope()
568 blockInfo.NextBlockInfo = CGF.FirstBlockInfo; in enterBlockScope()
569 CGF.FirstBlockInfo = &blockInfo; in enterBlockScope()
573 computeBlockInfo(CGF.CGM, &CGF, blockInfo); in enterBlockScope()
579 blockInfo.LocalAddress = CGF.CreateTempAlloca(blockInfo.StructureType, in enterBlockScope()
609 destroyer = CGF.getDestroyer(dtorKind); in enterBlockScope()
613 Address addr = CGF.Builder.CreateStructGEP(blockInfo.LocalAddress, in enterBlockScope()
622 bool useArrayEHCleanup = CGF.needsEHCleanup(dtorKind); in enterBlockScope()
626 CGF.pushDestroy(cleanupKind, addr, variable->getType(), in enterBlockScope()
630 capture.setCleanup(CGF.EHStack.stable_begin()); in enterBlockScope()
1639 void emitCopy(CodeGenFunction &CGF, Address destField, in emitCopy() argument
1641 destField = CGF.Builder.CreateBitCast(destField, CGF.VoidPtrTy); in emitCopy()
1643 srcField = CGF.Builder.CreateBitCast(srcField, CGF.VoidPtrPtrTy); in emitCopy()
1644 llvm::Value *srcValue = CGF.Builder.CreateLoad(srcField); in emitCopy()
1648 llvm::Value *flagsVal = llvm::ConstantInt::get(CGF.Int32Ty, flags); in emitCopy()
1649 llvm::Value *fn = CGF.CGM.getBlockObjectAssign(); in emitCopy()
1652 CGF.EmitNounwindRuntimeCall(fn, args); in emitCopy()
1655 void emitDispose(CodeGenFunction &CGF, Address field) override { in emitDispose() argument
1656 field = CGF.Builder.CreateBitCast(field, CGF.Int8PtrTy->getPointerTo(0)); in emitDispose()
1657 llvm::Value *value = CGF.Builder.CreateLoad(field); in emitDispose()
1659 CGF.BuildBlockRelease(value, Flags | BLOCK_BYREF_CALLER); in emitDispose()
1672 void emitCopy(CodeGenFunction &CGF, Address destField, in emitCopy() argument
1674 CGF.EmitARCMoveWeak(destField, srcField); in emitCopy()
1677 void emitDispose(CodeGenFunction &CGF, Address field) override { in emitDispose() argument
1678 CGF.EmitARCDestroyWeak(field); in emitDispose()
1693 void emitCopy(CodeGenFunction &CGF, Address destField, in emitCopy() argument
1698 llvm::Value *value = CGF.Builder.CreateLoad(srcField); in emitCopy()
1703 if (CGF.CGM.getCodeGenOpts().OptimizationLevel == 0) { in emitCopy()
1704 CGF.Builder.CreateStore(null, destField); in emitCopy()
1705 CGF.EmitARCStoreStrongCall(destField, value, /*ignored*/ true); in emitCopy()
1706 CGF.EmitARCStoreStrongCall(srcField, null, /*ignored*/ true); in emitCopy()
1709 CGF.Builder.CreateStore(value, destField); in emitCopy()
1710 CGF.Builder.CreateStore(null, srcField); in emitCopy()
1713 void emitDispose(CodeGenFunction &CGF, Address field) override { in emitDispose() argument
1714 CGF.EmitARCDestroyStrong(field, ARCImpreciseLifetime); in emitDispose()
1730 void emitCopy(CodeGenFunction &CGF, Address destField, in emitCopy() argument
1735 llvm::Value *oldValue = CGF.Builder.CreateLoad(srcField); in emitCopy()
1736 llvm::Value *copy = CGF.EmitARCRetainBlock(oldValue, /*mandatory*/ true); in emitCopy()
1737 CGF.Builder.CreateStore(copy, destField); in emitCopy()
1740 void emitDispose(CodeGenFunction &CGF, Address field) override { in emitDispose() argument
1741 CGF.EmitARCDestroyStrong(field, ARCImpreciseLifetime); in emitDispose()
1762 void emitCopy(CodeGenFunction &CGF, Address destField, in emitCopy() argument
1765 CGF.EmitSynthesizedCXXCopyCtor(destField, srcField, CopyExpr); in emitCopy()
1768 void emitDispose(CodeGenFunction &CGF, Address field) override { in emitDispose() argument
1769 EHScopeStack::stable_iterator cleanupDepth = CGF.EHStack.stable_begin(); in emitDispose()
1770 CGF.PushDestructorCleanup(VarType, field); in emitDispose()
1771 CGF.PopCleanupBlocks(cleanupDepth); in emitDispose()
1781 generateByrefCopyHelper(CodeGenFunction &CGF, const BlockByrefInfo &byrefInfo, in generateByrefCopyHelper() argument
1783 ASTContext &Context = CGF.getContext(); in generateByrefCopyHelper()
1788 ImplicitParamDecl dst(CGF.getContext(), nullptr, SourceLocation(), nullptr, in generateByrefCopyHelper()
1792 ImplicitParamDecl src(CGF.getContext(), nullptr, SourceLocation(), nullptr, in generateByrefCopyHelper()
1797 CGF.CGM.getTypes().arrangeBuiltinFunctionDeclaration(R, args); in generateByrefCopyHelper()
1799 llvm::FunctionType *LTy = CGF.CGM.getTypes().GetFunctionType(FI); in generateByrefCopyHelper()
1805 "__Block_byref_object_copy_", &CGF.CGM.getModule()); in generateByrefCopyHelper()
1817 CGF.CGM.SetInternalFunctionAttributes(nullptr, Fn, FI); in generateByrefCopyHelper()
1819 CGF.StartFunction(FD, R, Fn, FI, args); in generateByrefCopyHelper()
1825 Address destField = CGF.GetAddrOfLocalVar(&dst); in generateByrefCopyHelper()
1826 destField = Address(CGF.Builder.CreateLoad(destField), in generateByrefCopyHelper()
1828 destField = CGF.Builder.CreateBitCast(destField, byrefPtrType); in generateByrefCopyHelper()
1829 destField = CGF.emitBlockByrefAddress(destField, byrefInfo, false, in generateByrefCopyHelper()
1833 Address srcField = CGF.GetAddrOfLocalVar(&src); in generateByrefCopyHelper()
1834 srcField = Address(CGF.Builder.CreateLoad(srcField), in generateByrefCopyHelper()
1836 srcField = CGF.Builder.CreateBitCast(srcField, byrefPtrType); in generateByrefCopyHelper()
1837 srcField = CGF.emitBlockByrefAddress(srcField, byrefInfo, false, in generateByrefCopyHelper()
1840 generator.emitCopy(CGF, destField, srcField); in generateByrefCopyHelper()
1843 CGF.FinishFunction(); in generateByrefCopyHelper()
1845 return llvm::ConstantExpr::getBitCast(Fn, CGF.Int8PtrTy); in generateByrefCopyHelper()
1852 CodeGenFunction CGF(CGM); in buildByrefCopyHelper() local
1853 return generateByrefCopyHelper(CGF, byrefInfo, generator); in buildByrefCopyHelper()
1858 generateByrefDisposeHelper(CodeGenFunction &CGF, in generateByrefDisposeHelper() argument
1861 ASTContext &Context = CGF.getContext(); in generateByrefDisposeHelper()
1865 ImplicitParamDecl src(CGF.getContext(), nullptr, SourceLocation(), nullptr, in generateByrefDisposeHelper()
1870 CGF.CGM.getTypes().arrangeBuiltinFunctionDeclaration(R, args); in generateByrefDisposeHelper()
1872 llvm::FunctionType *LTy = CGF.CGM.getTypes().GetFunctionType(FI); in generateByrefDisposeHelper()
1879 &CGF.CGM.getModule()); in generateByrefDisposeHelper()
1891 CGF.CGM.SetInternalFunctionAttributes(nullptr, Fn, FI); in generateByrefDisposeHelper()
1893 CGF.StartFunction(FD, R, Fn, FI, args); in generateByrefDisposeHelper()
1896 Address addr = CGF.GetAddrOfLocalVar(&src); in generateByrefDisposeHelper()
1897 addr = Address(CGF.Builder.CreateLoad(addr), byrefInfo.ByrefAlignment); in generateByrefDisposeHelper()
1899 addr = CGF.Builder.CreateBitCast(addr, byrefPtrType); in generateByrefDisposeHelper()
1900 addr = CGF.emitBlockByrefAddress(addr, byrefInfo, false, "object"); in generateByrefDisposeHelper()
1902 generator.emitDispose(CGF, addr); in generateByrefDisposeHelper()
1905 CGF.FinishFunction(); in generateByrefDisposeHelper()
1907 return llvm::ConstantExpr::getBitCast(Fn, CGF.Int8PtrTy); in generateByrefDisposeHelper()
1914 CodeGenFunction CGF(CGM); in buildByrefDisposeHelper() local
1915 return generateByrefDisposeHelper(CGF, byrefInfo, generator); in buildByrefDisposeHelper()
2267 void Emit(CodeGenFunction &CGF, Flags flags) override { in Emit()
2269 CGF.BuildBlockRelease(Addr, BLOCK_FIELD_IS_BYREF); in Emit()