/external/clang/lib/CodeGen/ |
D | CGObjCRuntime.cpp | 86 LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF, in EmitValueForIvarAtOffset() argument 94 llvm::Type *LTy = CGF.CGM.getTypes().ConvertTypeForMem(IvarTy); in EmitValueForIvarAtOffset() 95 llvm::Value *V = CGF.Builder.CreateBitCast(BaseValue, CGF.Int8PtrTy); in EmitValueForIvarAtOffset() 96 V = CGF.Builder.CreateInBoundsGEP(V, Offset, "add.ptr"); in EmitValueForIvarAtOffset() 99 V = CGF.Builder.CreateBitCast(V, llvm::PointerType::getUnqual(LTy)); in EmitValueForIvarAtOffset() 100 LValue LV = CGF.MakeNaturalAlignAddrLValue(V, IvarTy); in EmitValueForIvarAtOffset() 119 uint64_t FieldBitOffset = LookupFieldBitOffset(CGF.CGM, OID, nullptr, Ivar); in EmitValueForIvarAtOffset() 120 uint64_t BitOffset = FieldBitOffset % CGF.CGM.getContext().getCharWidth(); in EmitValueForIvarAtOffset() 121 uint64_t AlignmentBits = CGF.CGM.getTarget().getCharAlign(); in EmitValueForIvarAtOffset() 122 uint64_t BitFieldSize = Ivar->getBitWidthValue(CGF.getContext()); in EmitValueForIvarAtOffset() [all …]
|
D | CGExprAgg.cpp | 34 CodeGenFunction &CGF; member in __anon53c0b41c0111::AggExprEmitter 56 return CGF.CreateAggTemp(T, "agg.tmp.ensured"); in EnsureSlot() 60 Dest = CGF.CreateAggTemp(T, "agg.tmp.ensured"); in EnsureDest() 65 : CGF(cgf), Builder(CGF.Builder), Dest(Dest) { in AggExprEmitter() 90 if (CGF.getLangOpts().getGC() && TypeRequiresGCollection(T)) in needsGC() 102 CGF.ErrorUnsupported(S, "aggregate expression"); in VisitStmt() 123 = CGF.tryEmitAsConstant(E)) { in VisitDeclRefExpr() 124 EmitFinalDestCopy(E->getType(), result.getReferenceLValue(CGF, E)); in VisitDeclRefExpr() 165 CodeGenFunction::CXXDefaultInitExprScope Scope(CGF); in VisitCXXDefaultInitExpr() 180 LValue LV = CGF.EmitPseudoObjectLValue(E); in VisitPseudoObjectExpr() [all …]
|
D | CGCXXABI.cpp | 22 void CGCXXABI::ErrorUnsupportedABI(CodeGenFunction &CGF, StringRef S) { in ErrorUnsupportedABI() argument 23 DiagnosticsEngine &Diags = CGF.CGM.getDiags(); in ErrorUnsupportedABI() 26 Diags.Report(CGF.getContext().getFullLoc(CGF.CurCodeDecl->getLocation()), in ErrorUnsupportedABI() 76 CodeGenFunction &CGF, const Expr *E, llvm::Value *&This, in EmitLoadOfMemberFunctionPointer() argument 78 ErrorUnsupportedABI(CGF, "calls through member pointers"); in EmitLoadOfMemberFunctionPointer() 90 CGCXXABI::EmitMemberDataPointerAddress(CodeGenFunction &CGF, const Expr *E, in EmitMemberDataPointerAddress() argument 93 ErrorUnsupportedABI(CGF, "loads of member pointers"); in EmitMemberDataPointerAddress() 94 llvm::Type *Ty = CGF.ConvertType(MPT->getPointeeType())->getPointerTo(); in EmitMemberDataPointerAddress() 98 llvm::Value *CGCXXABI::EmitMemberPointerConversion(CodeGenFunction &CGF, in EmitMemberPointerConversion() argument 101 ErrorUnsupportedABI(CGF, "member function pointer conversions"); in EmitMemberPointerConversion() [all …]
|
D | CGException.cpp | 337 static llvm::Constant *getCatchAllValue(CodeGenFunction &CGF) { in getCatchAllValue() argument 339 return llvm::ConstantPointerNull::get(CGF.Int8PtrTy); in getCatchAllValue() 348 void Emit(CodeGenFunction &CGF, Flags flags) override { in Emit() 349 CGF.EmitNounwindRuntimeCall(getFreeExceptionFn(CGF.CGM), exn); in Emit() 358 static void EmitAnyExprToExn(CodeGenFunction &CGF, const Expr *e, in EmitAnyExprToExn() argument 362 CGF.pushFullExprCleanup<FreeException>(EHCleanup, addr); in EmitAnyExprToExn() 363 EHScopeStack::stable_iterator cleanup = CGF.EHStack.stable_begin(); in EmitAnyExprToExn() 367 llvm::Type *ty = CGF.ConvertTypeForMem(e->getType())->getPointerTo(); in EmitAnyExprToExn() 368 llvm::Value *typedAddr = CGF.Builder.CreateBitCast(addr, ty); in EmitAnyExprToExn() 377 CGF.EmitAnyExprToMem(e, typedAddr, e->getType().getQualifiers(), in EmitAnyExprToExn() [all …]
|
D | CGOpenMPRuntime.cpp | 71 CodeGenFunction &CGF, SourceLocation Loc, OpenMPLocationFlags Flags) { in EmitOpenMPUpdateLocation() argument 77 assert(CGF.CurFn && "No function in current CodeGenFunction."); in EmitOpenMPUpdateLocation() 80 OpenMPLocMapTy::iterator I = OpenMPLocMap.find(CGF.CurFn); in EmitOpenMPUpdateLocation() 85 llvm::AllocaInst *AI = CGF.CreateTempAlloca(IdentTy, ".kmpc_loc.addr"); in EmitOpenMPUpdateLocation() 87 OpenMPLocMap[CGF.CurFn] = AI; in EmitOpenMPUpdateLocation() 90 CGBuilderTy::InsertPointGuard IPG(CGF.Builder); in EmitOpenMPUpdateLocation() 91 CGF.Builder.SetInsertPoint(CGF.AllocaInsertPt); in EmitOpenMPUpdateLocation() 92 CGF.Builder.CreateMemCpy(LocValue, GetOrCreateDefaultOpenMPLocation(Flags), in EmitOpenMPUpdateLocation() 99 CGF.Builder.CreateConstInBoundsGEP2_32(LocValue, 0, IdentField_PSource); in EmitOpenMPUpdateLocation() 106 PresumedLoc PLoc = CGF.getContext().getSourceManager().getPresumedLoc(Loc); in EmitOpenMPUpdateLocation() [all …]
|
D | CGCXXABI.h | 50 ImplicitParamDecl *&getThisDecl(CodeGenFunction &CGF) { in getThisDecl() argument 51 return CGF.CXXABIThisDecl; in getThisDecl() 53 llvm::Value *&getThisValue(CodeGenFunction &CGF) { in getThisValue() argument 54 return CGF.CXXABIThisValue; in getThisValue() 58 void ErrorUnsupportedABI(CodeGenFunction &CGF, StringRef S); 63 ImplicitParamDecl *&getStructorImplicitParamDecl(CodeGenFunction &CGF) { in getStructorImplicitParamDecl() argument 64 return CGF.CXXStructorImplicitParamDecl; in getStructorImplicitParamDecl() 66 llvm::Value *&getStructorImplicitParamValue(CodeGenFunction &CGF) { in getStructorImplicitParamValue() argument 67 return CGF.CXXStructorImplicitParamValue; in getStructorImplicitParamValue() 72 void EmitThisParam(CodeGenFunction &CGF); [all …]
|
D | CGExprScalar.cpp | 61 CodeGenFunction &CGF; member in __anonabb71b230111::ScalarExprEmitter 68 : CGF(cgf), Builder(CGF.Builder), IgnoreResultAssign(ira), in ScalarExprEmitter() 82 llvm::Type *ConvertType(QualType T) { return CGF.ConvertType(T); } in ConvertType() 83 LValue EmitLValue(const Expr *E) { return CGF.EmitLValue(E); } in EmitLValue() 85 return CGF.EmitCheckedLValue(E, TCK); in EmitCheckedLValue() 91 return CGF.EmitLoadOfLValue(LV, Loc).getScalarVal(); in EmitLoadOfLValue() 167 S->dump(CGF.getContext().getSourceManager()); in VisitStmt() 207 llvm::Value *V = CGF.GetAddrOfLabel(E->getLabel()); in VisitAddrLabelExpr() 216 return CGF.EmitPseudoObjectRValue(E).getScalarVal(); in VisitPseudoObjectExpr() 221 return EmitLoadOfLValue(CGF.getOpaqueLValueMapping(E), E->getExprLoc()); in VisitOpaqueValueExpr() [all …]
|
D | ItaniumCXXABI.cpp | 73 EmitLoadOfMemberFunctionPointer(CodeGenFunction &CGF, 80 EmitMemberDataPointerAddress(CodeGenFunction &CGF, const Expr *E, 85 llvm::Value *EmitMemberPointerConversion(CodeGenFunction &CGF, 100 llvm::Value *EmitMemberPointerComparison(CodeGenFunction &CGF, 105 llvm::Value *EmitMemberPointerIsNotNull(CodeGenFunction &CGF, 109 llvm::Value *adjustToCompleteObject(CodeGenFunction &CGF, llvm::Value *ptr, 117 void EmitBadTypeidCall(CodeGenFunction &CGF) override; 118 llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy, 125 llvm::Value *EmitDynamicCastCall(CodeGenFunction &CGF, llvm::Value *Value, 130 llvm::Value *EmitDynamicCastToVoid(CodeGenFunction &CGF, llvm::Value *Value, [all …]
|
D | CGAtomic.cpp | 29 CodeGenFunction &CGF; member in __anon750979ab0111::AtomicInfo 40 AtomicInfo(CodeGenFunction &CGF, LValue &lvalue) : CGF(CGF) { in AtomicInfo() argument 45 EvaluationKind = CGF.getEvaluationKind(ValueTy); in AtomicInfo() 47 ASTContext &C = CGF.getContext(); in AtomicInfo() 90 CharUnits size = CGF.getContext().toCharUnitsFromBits(AtomicSizeInBits); in getAtomicSizeValue() 91 return CGF.CGM.getSize(size); in getAtomicSizeValue() 110 addr = CGF.Builder.CreateStructGEP(addr, 0); in projectValue() 113 CGF.getContext(), lvalue.getTBAAInfo()); in projectValue() 124 static RValue emitAtomicLibcall(CodeGenFunction &CGF, in emitAtomicLibcall() argument 129 CGF.CGM.getTypes().arrangeFreeFunctionCall(resultType, args, in emitAtomicLibcall() [all …]
|
D | CGCUDARuntime.cpp | 27 RValue CGCUDARuntime::EmitCUDAKernelCallExpr(CodeGenFunction &CGF, in EmitCUDAKernelCallExpr() argument 30 llvm::BasicBlock *ConfigOKBlock = CGF.createBasicBlock("kcall.configok"); in EmitCUDAKernelCallExpr() 31 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("kcall.end"); in EmitCUDAKernelCallExpr() 33 CodeGenFunction::ConditionalEvaluation eval(CGF); in EmitCUDAKernelCallExpr() 34 CGF.EmitBranchOnBoolExpr(E->getConfig(), ContBlock, ConfigOKBlock, in EmitCUDAKernelCallExpr() 37 eval.begin(CGF); in EmitCUDAKernelCallExpr() 38 CGF.EmitBlock(ConfigOKBlock); in EmitCUDAKernelCallExpr() 47 llvm::Value *Callee = CGF.EmitScalarExpr(E->getCallee()); in EmitCUDAKernelCallExpr() 48 CGF.EmitCall(E->getCallee()->getType(), Callee, E->getLocStart(), in EmitCUDAKernelCallExpr() 50 CGF.EmitBranch(ContBlock); in EmitCUDAKernelCallExpr() [all …]
|
D | CGExprCXX.cpp | 311 static void EmitNullBaseClassInitialization(CodeGenFunction &CGF, in EmitNullBaseClassInitialization() argument 317 DestPtr = CGF.EmitCastToVoidPtr(DestPtr); in EmitNullBaseClassInitialization() 319 const ASTRecordLayout &Layout = CGF.getContext().getASTRecordLayout(Base); in EmitNullBaseClassInitialization() 323 llvm::Value *SizeVal = CGF.CGM.getSize(Size); in EmitNullBaseClassInitialization() 331 if (!CGF.CGM.getTypes().isZeroInitializable(Base)) { in EmitNullBaseClassInitialization() 332 llvm::Constant *NullConstant = CGF.CGM.EmitNullConstantForBase(Base); in EmitNullBaseClassInitialization() 335 new llvm::GlobalVariable(CGF.CGM.getModule(), NullConstant->getType(), in EmitNullBaseClassInitialization() 340 llvm::Value *SrcPtr = CGF.EmitCastToVoidPtr(NullVariable); in EmitNullBaseClassInitialization() 343 CGF.Builder.CreateMemCpy(DestPtr, SrcPtr, SizeVal, Align.getQuantity()); in EmitNullBaseClassInitialization() 350 CGF.Builder.CreateMemSet(DestPtr, CGF.Builder.getInt8(0), SizeVal, in EmitNullBaseClassInitialization() [all …]
|
D | MicrosoftCXXABI.cpp | 60 llvm::Value *adjustToCompleteObject(CodeGenFunction &CGF, 70 void EmitBadTypeidCall(CodeGenFunction &CGF) override; 71 llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy, 78 llvm::Value *EmitDynamicCastCall(CodeGenFunction &CGF, llvm::Value *Value, 83 llvm::Value *EmitDynamicCastToVoid(CodeGenFunction &CGF, llvm::Value *Value, 87 bool EmitBadCastCall(CodeGenFunction &CGF) override; 90 GetVirtualBaseClassOffset(CodeGenFunction &CGF, llvm::Value *This, 99 EmitCtorCompleteObjectHandler(CodeGenFunction &CGF, 102 void initializeHiddenVirtualInheritanceMembers(CodeGenFunction &CGF, 171 adjustThisArgumentForVirtualFunctionCall(CodeGenFunction &CGF, GlobalDecl GD, [all …]
|
D | CGCUDANV.cpp | 42 void EmitDeviceStubBody(CodeGenFunction &CGF, FunctionArgList &Args) override; 78 void CGNVCUDARuntime::EmitDeviceStubBody(CodeGenFunction &CGF, in EmitDeviceStubBody() argument 85 llvm::Value *V = CGF.GetAddrOfLocalVar(*I); in EmitDeviceStubBody() 91 CGF.getLLVMContext(), ArgTypes); in EmitDeviceStubBody() 93 llvm::BasicBlock *EndBlock = CGF.createBasicBlock("setup.end"); in EmitDeviceStubBody() 99 llvm::BasicBlock *NextBlock = CGF.createBasicBlock("setup.next"); in EmitDeviceStubBody() 100 Args[0] = CGF.Builder.CreatePointerCast(ArgValues[I], VoidPtrTy); in EmitDeviceStubBody() 101 Args[1] = CGF.Builder.CreateIntCast( in EmitDeviceStubBody() 104 Args[2] = CGF.Builder.CreateIntCast( in EmitDeviceStubBody() 107 llvm::CallSite CS = CGF.EmitRuntimeCallOrInvoke(cudaSetupArgFn, Args); in EmitDeviceStubBody() [all …]
|
D | CGClass.cpp | 113 ApplyNonVirtualAndVirtualOffset(CodeGenFunction &CGF, llvm::Value *ptr, in ApplyNonVirtualAndVirtualOffset() argument 122 baseOffset = llvm::ConstantInt::get(CGF.PtrDiffTy, in ApplyNonVirtualAndVirtualOffset() 125 baseOffset = CGF.Builder.CreateAdd(virtualOffset, baseOffset); in ApplyNonVirtualAndVirtualOffset() 132 ptr = CGF.Builder.CreateBitCast(ptr, CGF.Int8PtrTy); in ApplyNonVirtualAndVirtualOffset() 133 ptr = CGF.Builder.CreateInBoundsGEP(ptr, baseOffset, "add.ptr"); in ApplyNonVirtualAndVirtualOffset() 345 void Emit(CodeGenFunction &CGF, Flags flags) override { in Emit() 347 cast<CXXMethodDecl>(CGF.CurCodeDecl)->getParent(); in Emit() 351 CGF.GetAddressOfDirectBaseInCompleteClass(CGF.LoadCXXThis(), in Emit() 354 CGF.EmitCXXDestructorCall(D, Dtor_Base, BaseIsVirtual, in Emit() 383 static void EmitBaseInitializer(CodeGenFunction &CGF, in EmitBaseInitializer() argument [all …]
|
D | CGObjC.cpp | 33 tryEmitARCRetainScalarExpr(CodeGenFunction &CGF, const Expr *e); 34 static RValue AdjustRelatedResultType(CodeGenFunction &CGF, 230 static RValue AdjustRelatedResultType(CodeGenFunction &CGF, in AdjustRelatedResultType() argument 238 CGF.getContext().hasSameType(ExpT, Method->getReturnType()) || in AdjustRelatedResultType() 243 return RValue::get(CGF.Builder.CreateBitCast(Result.getScalarVal(), in AdjustRelatedResultType() 244 CGF.ConvertType(ExpT))); in AdjustRelatedResultType() 434 void Emit(CodeGenFunction &CGF, Flags flags) override { in Emit() 435 const ObjCMethodDecl *method = cast<ObjCMethodDecl>(CGF.CurCodeDecl); in Emit() 444 llvm::Value *self = CGF.LoadObjCSelf(); in Emit() 447 CGF.CGM.getObjCRuntime().GenerateMessageSendSuper(CGF, ReturnValueSlot(), in Emit() [all …]
|
D | CGExprComplex.cpp | 44 CodeGenFunction &CGF; member in __anon59b5f3050111::ComplexExprEmitter 50 : CGF(cgf), Builder(CGF.Builder), IgnoreReal(ir), IgnoreImag(ii) { in ComplexExprEmitter() 73 return EmitLoadOfLValue(CGF.EmitLValue(E), E->getExprLoc()); in EmitLoadOfLValue() 98 S->dump(CGF.getContext().getSourceManager()); in VisitStmt() 114 if (CodeGenFunction::ConstantEmission result = CGF.tryEmitAsConstant(E)) { in VisitDeclRefExpr() 116 return EmitLoadOfLValue(result.getReferenceLValue(CGF, E), in VisitDeclRefExpr() 129 return CGF.EmitObjCMessageExpr(E).getComplexVal(); in VisitObjCMessageExpr() 135 return EmitLoadOfLValue(CGF.getOpaqueLValueMapping(E), E->getExprLoc()); in VisitOpaqueValueExpr() 136 return CGF.getOpaqueRValueMapping(E).getComplexVal(); in VisitOpaqueValueExpr() 140 return CGF.EmitPseudoObjectRValue(E).getComplexVal(); in VisitPseudoObjectExpr() [all …]
|
D | CGObjCRuntime.h | 85 LValue EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF, 98 void EmitTryCatchStmt(CodeGenFunction &CGF, 107 void EmitAtSynchronizedStmt(CodeGenFunction &CGF, 122 virtual llvm::Value *GetSelector(CodeGenFunction &CGF, 126 virtual llvm::Value *GetSelector(CodeGenFunction &CGF, 153 GenerateMessageSend(CodeGen::CodeGenFunction &CGF, 169 GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF, 182 virtual llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF, 221 virtual llvm::Value *GetClass(CodeGenFunction &CGF, 225 virtual llvm::Value *EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) { in EmitNSAutoreleasePoolClassRef() argument [all …]
|
D | TargetInfo.cpp | 364 CodeGenFunction &CGF) const override; 374 CodeGenFunction &CGF) const { in EmitVAArg() 421 CodeGenFunction &CGF) const override; 439 CodeGenFunction &CGF) const { in EmitVAArg() 485 static llvm::Type* X86AdjustInlineAsmType(CodeGen::CodeGenFunction &CGF, in X86AdjustInlineAsmType() argument 494 return llvm::Type::getX86_MMXTy(CGF.getLLVMContext()); in X86AdjustInlineAsmType() 561 CodeGenFunction &CGF) const override; 587 bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, 590 llvm::Type* adjustInlineAsmType(CodeGen::CodeGenFunction &CGF, in adjustInlineAsmType() argument 593 return X86AdjustInlineAsmType(CGF, Constraint, Ty); in adjustInlineAsmType() [all …]
|
D | CGObjCMac.cpp | 1029 CodeGen::RValue EmitMessageSend(CodeGen::CodeGenFunction &CGF, 1097 llvm::Value *EmitClassRef(CodeGenFunction &CGF, 1100 llvm::Value *EmitClassRefFromId(CodeGenFunction &CGF, 1103 llvm::Value *EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) override; 1181 llvm::Value *EmitSelector(CodeGenFunction &CGF, Selector Sel, 1189 CodeGen::RValue GenerateMessageSend(CodeGen::CodeGenFunction &CGF, 1198 GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF, 1205 llvm::Value *GetClass(CodeGenFunction &CGF, 1208 llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel, 1213 llvm::Value *GetSelector(CodeGenFunction &CGF, [all …]
|
D | CGCleanup.cpp | 35 DominatingValue<RValue>::saved_type::save(CodeGenFunction &CGF, RValue rv) { in save() argument 44 llvm::Value *addr = CGF.CreateTempAlloca(V->getType(), "saved-rvalue"); in save() 45 CGF.Builder.CreateStore(V, addr); in save() 54 llvm::Value *addr = CGF.CreateTempAlloca(ComplexTy, "saved-complex"); in save() 55 CGF.Builder.CreateStore(V.first, CGF.Builder.CreateStructGEP(addr, 0)); in save() 56 CGF.Builder.CreateStore(V.second, CGF.Builder.CreateStructGEP(addr, 1)); in save() 65 llvm::Value *addr = CGF.CreateTempAlloca(V->getType(), "saved-rvalue"); in save() 66 CGF.Builder.CreateStore(V, addr); in save() 73 RValue DominatingValue<RValue>::saved_type::restore(CodeGenFunction &CGF) { in restore() argument 78 return RValue::get(CGF.Builder.CreateLoad(Value)); in restore() [all …]
|
D | CGDeclCXX.cpp | 25 static void EmitDeclInit(CodeGenFunction &CGF, const VarDecl &D, in EmitDeclInit() argument 31 ASTContext &Context = CGF.getContext(); in EmitDeclInit() 35 LValue lv = CGF.MakeAddrLValue(DeclPtr, type, alignment); in EmitDeclInit() 38 switch (CGF.getEvaluationKind(type)) { in EmitDeclInit() 40 CodeGenModule &CGM = CGF.CGM; in EmitDeclInit() 42 CGM.getObjCRuntime().EmitObjCGlobalAssign(CGF, CGF.EmitScalarExpr(Init), in EmitDeclInit() 45 CGM.getObjCRuntime().EmitObjCWeakAssign(CGF, CGF.EmitScalarExpr(Init), in EmitDeclInit() 48 CGF.EmitScalarInit(Init, &D, lv, false); in EmitDeclInit() 52 CGF.EmitComplexExprIntoLValue(Init, lv, /*isInit*/ true); in EmitDeclInit() 55 CGF.EmitAggExpr(Init, AggValueSlot::forLValue(lv,AggValueSlot::IsDestructed, in EmitDeclInit() [all …]
|
D | CGBlocks.cpp | 267 CodeGenFunction *CGF, in tryCaptureAsConstant() argument 288 return CGM.EmitConstantInit(*var, CGF); in tryCaptureAsConstant() 331 static void computeBlockInfo(CodeGenModule &CGM, CodeGenFunction *CGF, in computeBlockInfo() argument 358 assert(CGF && CGF->CurFuncDecl && isa<CXXMethodDecl>(CGF->CurFuncDecl) && in computeBlockInfo() 360 QualType thisType = cast<CXXMethodDecl>(CGF->CurFuncDecl)->getThisType(C); in computeBlockInfo() 395 if (llvm::Constant *constant = tryCaptureAsConstant(CGM, CGF, variable)) { in computeBlockInfo() 556 static void enterBlockScope(CodeGenFunction &CGF, BlockDecl *block) { in enterBlockScope() argument 557 assert(CGF.HaveInsertPoint()); in enterBlockScope() 561 *new CGBlockInfo(block, CGF.CurFn->getName()); in enterBlockScope() 562 blockInfo.NextBlockInfo = CGF.FirstBlockInfo; in enterBlockScope() [all …]
|
D | CGCall.cpp | 663 uint64_t DstSize, CodeGenFunction &CGF) { in EnterStructPointerForCoercedAccess() argument 672 CGF.CGM.getDataLayout().getTypeAllocSize(FirstElt); in EnterStructPointerForCoercedAccess() 674 FirstEltSize < CGF.CGM.getDataLayout().getTypeAllocSize(SrcSTy)) in EnterStructPointerForCoercedAccess() 678 SrcPtr = CGF.Builder.CreateConstGEP2_32(SrcPtr, 0, 0, "coerce.dive"); in EnterStructPointerForCoercedAccess() 684 return EnterStructPointerForCoercedAccess(SrcPtr, SrcSTy, DstSize, CGF); in EnterStructPointerForCoercedAccess() 698 CodeGenFunction &CGF) { in CoerceIntOrPtrToIntOrPtr() argument 705 return CGF.Builder.CreateBitCast(Val, Ty, "coerce.val"); in CoerceIntOrPtrToIntOrPtr() 708 Val = CGF.Builder.CreatePtrToInt(Val, CGF.IntPtrTy, "coerce.val.pi"); in CoerceIntOrPtrToIntOrPtr() 713 DestIntTy = CGF.IntPtrTy; in CoerceIntOrPtrToIntOrPtr() 716 const llvm::DataLayout &DL = CGF.CGM.getDataLayout(); in CoerceIntOrPtrToIntOrPtr() [all …]
|
D | CodeGenFunction.h | 205 virtual void EmitBody(CodeGenFunction &CGF, Stmt *S) { in EmitBody() argument 206 RegionCounter Cnt = CGF.getPGORegionCounter(S); in EmitBody() 207 Cnt.beginRegion(CGF.Builder); in EmitBody() 208 CGF.EmitStmt(S); in EmitBody() 315 void enter(CodeGenFunction &CGF, const Stmt *Finally, 318 void exit(CodeGenFunction &CGF); 470 CodeGenFunction& CGF; 474 explicit RunCleanupsScope(CodeGenFunction &CGF) in RunCleanupsScope() argument 475 : PerformCleanup(true), CGF(CGF) in RunCleanupsScope() 477 CleanupStackDepth = CGF.EHStack.stable_begin(); in RunCleanupsScope() [all …]
|
D | EHScopeStack.h | 59 static saved_type save(CodeGenFunction &CGF, type value) { return value; } in save() 60 static type restore(CodeGenFunction &CGF, saved_type value) { return value; } in restore() 175 virtual void Emit(CodeGenFunction &CGF, Flags flags) = 0; 185 void Emit(CodeGenFunction &CGF, Flags flags) override { 186 A0 a0 = DominatingValue<A0>::restore(CGF, a0_saved); 187 T(a0).Emit(CGF, flags); 202 void Emit(CodeGenFunction &CGF, Flags flags) override { 203 A0 a0 = DominatingValue<A0>::restore(CGF, a0_saved); 204 A1 a1 = DominatingValue<A1>::restore(CGF, a1_saved); 205 T(a0, a1).Emit(CGF, flags); [all …]
|