• Home
  • Raw
  • Download

Lines Matching refs:CGF

273                                             CodeGenFunction *CGF,  in tryCaptureAsConstant()  argument
294 return CGM.EmitConstantInit(*var, CGF); in tryCaptureAsConstant()
337 static void computeBlockInfo(CodeGenModule &CGM, CodeGenFunction *CGF, in computeBlockInfo() argument
364 assert(CGF && CGF->CurFuncDecl && isa<CXXMethodDecl>(CGF->CurFuncDecl) && in computeBlockInfo()
366 QualType thisType = cast<CXXMethodDecl>(CGF->CurFuncDecl)->getThisType(C); in computeBlockInfo()
401 if (llvm::Constant *constant = tryCaptureAsConstant(CGM, CGF, variable)) { in computeBlockInfo()
572 static void enterBlockScope(CodeGenFunction &CGF, BlockDecl *block) { in enterBlockScope() argument
573 assert(CGF.HaveInsertPoint()); in enterBlockScope()
577 *new CGBlockInfo(block, CGF.CurFn->getName()); in enterBlockScope()
578 blockInfo.NextBlockInfo = CGF.FirstBlockInfo; in enterBlockScope()
579 CGF.FirstBlockInfo = &blockInfo; in enterBlockScope()
583 computeBlockInfo(CGF.CGM, &CGF, blockInfo); in enterBlockScope()
590 CGF.CreateTempAlloca(blockInfo.StructureType, "block"); in enterBlockScope()
620 destroyer = CGF.getDestroyer(dtorKind); in enterBlockScope()
624 llvm::Value *addr = CGF.Builder.CreateStructGEP( in enterBlockScope()
632 bool useArrayEHCleanup = CGF.needsEHCleanup(dtorKind); in enterBlockScope()
636 CGF.pushDestroy(cleanupKind, addr, variable->getType(), in enterBlockScope()
640 capture.setCleanup(CGF.EHStack.stable_begin()); in enterBlockScope()
1611 void emitCopy(CodeGenFunction &CGF, llvm::Value *destField, in emitCopy() argument
1613 destField = CGF.Builder.CreateBitCast(destField, CGF.VoidPtrTy); in emitCopy()
1615 srcField = CGF.Builder.CreateBitCast(srcField, CGF.VoidPtrPtrTy); in emitCopy()
1616 llvm::Value *srcValue = CGF.Builder.CreateLoad(srcField); in emitCopy()
1620 llvm::Value *flagsVal = llvm::ConstantInt::get(CGF.Int32Ty, flags); in emitCopy()
1621 llvm::Value *fn = CGF.CGM.getBlockObjectAssign(); in emitCopy()
1624 CGF.EmitNounwindRuntimeCall(fn, args); in emitCopy()
1627 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) override { in emitDispose() argument
1628 field = CGF.Builder.CreateBitCast(field, CGF.Int8PtrTy->getPointerTo(0)); in emitDispose()
1629 llvm::Value *value = CGF.Builder.CreateLoad(field); in emitDispose()
1631 CGF.BuildBlockRelease(value, Flags | BLOCK_BYREF_CALLER); in emitDispose()
1644 void emitCopy(CodeGenFunction &CGF, llvm::Value *destField, in emitCopy() argument
1646 CGF.EmitARCMoveWeak(destField, srcField); in emitCopy()
1649 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) override { in emitDispose() argument
1650 CGF.EmitARCDestroyWeak(field); in emitDispose()
1665 void emitCopy(CodeGenFunction &CGF, llvm::Value *destField, in emitCopy() argument
1670 llvm::LoadInst *value = CGF.Builder.CreateLoad(srcField); in emitCopy()
1676 if (CGF.CGM.getCodeGenOpts().OptimizationLevel == 0) { in emitCopy()
1677 llvm::StoreInst *store = CGF.Builder.CreateStore(null, destField); in emitCopy()
1679 CGF.EmitARCStoreStrongCall(destField, value, /*ignored*/ true); in emitCopy()
1680 CGF.EmitARCStoreStrongCall(srcField, null, /*ignored*/ true); in emitCopy()
1683 llvm::StoreInst *store = CGF.Builder.CreateStore(value, destField); in emitCopy()
1686 store = CGF.Builder.CreateStore(null, srcField); in emitCopy()
1690 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) override { in emitDispose() argument
1691 CGF.EmitARCDestroyStrong(field, ARCImpreciseLifetime); in emitDispose()
1706 void emitCopy(CodeGenFunction &CGF, llvm::Value *destField, in emitCopy() argument
1711 llvm::LoadInst *oldValue = CGF.Builder.CreateLoad(srcField); in emitCopy()
1714 llvm::Value *copy = CGF.EmitARCRetainBlock(oldValue, /*mandatory*/ true); in emitCopy()
1716 llvm::StoreInst *store = CGF.Builder.CreateStore(copy, destField); in emitCopy()
1720 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) override { in emitDispose() argument
1721 CGF.EmitARCDestroyStrong(field, ARCImpreciseLifetime); in emitDispose()
1742 void emitCopy(CodeGenFunction &CGF, llvm::Value *destField, in emitCopy() argument
1745 CGF.EmitSynthesizedCXXCopyCtor(destField, srcField, CopyExpr); in emitCopy()
1748 void emitDispose(CodeGenFunction &CGF, llvm::Value *field) override { in emitDispose() argument
1749 EHScopeStack::stable_iterator cleanupDepth = CGF.EHStack.stable_begin(); in emitDispose()
1750 CGF.PushDestructorCleanup(VarType, field); in emitDispose()
1751 CGF.PopCleanupBlocks(cleanupDepth); in emitDispose()
1761 generateByrefCopyHelper(CodeGenFunction &CGF, in generateByrefCopyHelper() argument
1765 ASTContext &Context = CGF.getContext(); in generateByrefCopyHelper()
1770 ImplicitParamDecl dst(CGF.getContext(), nullptr, SourceLocation(), nullptr, in generateByrefCopyHelper()
1774 ImplicitParamDecl src(CGF.getContext(), nullptr, SourceLocation(), nullptr, in generateByrefCopyHelper()
1778 const CGFunctionInfo &FI = CGF.CGM.getTypes().arrangeFreeFunctionDeclaration( in generateByrefCopyHelper()
1781 CodeGenTypes &Types = CGF.CGM.getTypes(); in generateByrefCopyHelper()
1788 "__Block_byref_object_copy_", &CGF.CGM.getModule()); in generateByrefCopyHelper()
1800 CGF.StartFunction(FD, R, Fn, FI, args); in generateByrefCopyHelper()
1806 llvm::Value *destField = CGF.GetAddrOfLocalVar(&dst); in generateByrefCopyHelper()
1807 destField = CGF.Builder.CreateLoad(destField); in generateByrefCopyHelper()
1808 destField = CGF.Builder.CreateBitCast(destField, byrefPtrType); in generateByrefCopyHelper()
1809 destField = CGF.Builder.CreateStructGEP(&byrefType, destField, in generateByrefCopyHelper()
1813 llvm::Value *srcField = CGF.GetAddrOfLocalVar(&src); in generateByrefCopyHelper()
1814 srcField = CGF.Builder.CreateLoad(srcField); in generateByrefCopyHelper()
1815 srcField = CGF.Builder.CreateBitCast(srcField, byrefPtrType); in generateByrefCopyHelper()
1817 CGF.Builder.CreateStructGEP(&byrefType, srcField, valueFieldIndex, "x"); in generateByrefCopyHelper()
1819 byrefInfo.emitCopy(CGF, destField, srcField); in generateByrefCopyHelper()
1822 CGF.FinishFunction(); in generateByrefCopyHelper()
1824 return llvm::ConstantExpr::getBitCast(Fn, CGF.Int8PtrTy); in generateByrefCopyHelper()
1832 CodeGenFunction CGF(CGM); in buildByrefCopyHelper() local
1833 return generateByrefCopyHelper(CGF, byrefType, byrefValueIndex, info); in buildByrefCopyHelper()
1838 generateByrefDisposeHelper(CodeGenFunction &CGF, in generateByrefDisposeHelper() argument
1842 ASTContext &Context = CGF.getContext(); in generateByrefDisposeHelper()
1846 ImplicitParamDecl src(CGF.getContext(), nullptr, SourceLocation(), nullptr, in generateByrefDisposeHelper()
1850 const CGFunctionInfo &FI = CGF.CGM.getTypes().arrangeFreeFunctionDeclaration( in generateByrefDisposeHelper()
1853 CodeGenTypes &Types = CGF.CGM.getTypes(); in generateByrefDisposeHelper()
1861 &CGF.CGM.getModule()); in generateByrefDisposeHelper()
1872 CGF.StartFunction(FD, R, Fn, FI, args); in generateByrefDisposeHelper()
1875 llvm::Value *V = CGF.GetAddrOfLocalVar(&src); in generateByrefDisposeHelper()
1876 V = CGF.Builder.CreateLoad(V); in generateByrefDisposeHelper()
1877 V = CGF.Builder.CreateBitCast(V, byrefType.getPointerTo(0)); in generateByrefDisposeHelper()
1878 V = CGF.Builder.CreateStructGEP(&byrefType, V, byrefValueIndex, "x"); in generateByrefDisposeHelper()
1880 byrefInfo.emitDispose(CGF, V); in generateByrefDisposeHelper()
1883 CGF.FinishFunction(); in generateByrefDisposeHelper()
1885 return llvm::ConstantExpr::getBitCast(Fn, CGF.Int8PtrTy); in generateByrefDisposeHelper()
1893 CodeGenFunction CGF(CGM); in buildByrefDisposeHelper() local
1894 return generateByrefDisposeHelper(CGF, byrefType, byrefValueIndex, info); in buildByrefDisposeHelper()
2248 void Emit(CodeGenFunction &CGF, Flags flags) override { in Emit()
2250 CGF.BuildBlockRelease(Addr, BLOCK_FIELD_IS_BYREF); in Emit()