/external/clang/lib/CodeGen/ |
CGCUDARuntime.cpp | 27 RValue CGCUDARuntime::EmitCUDAKernelCallExpr(CodeGenFunction &CGF, 30 llvm::BasicBlock *ConfigOKBlock = CGF.createBasicBlock("kcall.configok"); 31 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("kcall.end"); 33 CodeGenFunction::ConditionalEvaluation eval(CGF); 34 CGF.EmitBranchOnBoolExpr(E->getConfig(), ContBlock, ConfigOKBlock, 37 eval.begin(CGF); 38 CGF.EmitBlock(ConfigOKBlock); 47 llvm::Value *Callee = CGF.EmitScalarExpr(E->getCallee()); 48 CGF.EmitCall(E->getCallee()->getType(), Callee, E, ReturnValue, TargetDecl); 49 CGF.EmitBranch(ContBlock) [all...] |
CGOpenMPRuntimeNVPTX.cpp | 24 llvm::Value *CGOpenMPRuntimeNVPTX::getNVPTXWarpSize(CodeGenFunction &CGF) { 25 CGBuilderTy &Bld = CGF.Builder; 33 llvm::Value *CGOpenMPRuntimeNVPTX::getNVPTXThreadID(CodeGenFunction &CGF) { 34 CGBuilderTy &Bld = CGF.Builder; 42 llvm::Value *CGOpenMPRuntimeNVPTX::getNVPTXNumThreads(CodeGenFunction &CGF) { 43 CGBuilderTy &Bld = CGF.Builder; 51 void CGOpenMPRuntimeNVPTX::getNVPTXCTABarrier(CodeGenFunction &CGF) { 52 CGBuilderTy &Bld = CGF.Builder; 58 void CGOpenMPRuntimeNVPTX::syncCTAThreads(CodeGenFunction &CGF) { 59 getNVPTXCTABarrier(CGF); [all...] |
CGCXXABI.cpp | 23 void CGCXXABI::ErrorUnsupportedABI(CodeGenFunction &CGF, StringRef S) { 24 DiagnosticsEngine &Diags = CGF.CGM.getDiags(); 27 Diags.Report(CGF.getContext().getFullLoc(CGF.CurCodeDecl->getLocation()), 77 CodeGenFunction &CGF, const Expr *E, Address This, 80 ErrorUnsupportedABI(CGF, "calls through member pointers"); 93 CGCXXABI::EmitMemberDataPointerAddress(CodeGenFunction &CGF, const Expr *E, 96 ErrorUnsupportedABI(CGF, "loads of member pointers"); 97 llvm::Type *Ty = CGF.ConvertType(MPT->getPointeeType()) 102 llvm::Value *CGCXXABI::EmitMemberPointerConversion(CodeGenFunction &CGF, [all...] |
CGObjCRuntime.cpp | 86 LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF, 94 llvm::Type *LTy = CGF.CGM.getTypes().ConvertTypeForMem(IvarTy); 95 llvm::Value *V = CGF.Builder.CreateBitCast(BaseValue, CGF.Int8PtrTy); 96 V = CGF.Builder.CreateInBoundsGEP(V, Offset, "add.ptr"); 99 V = CGF.Builder.CreateBitCast(V, llvm::PointerType::getUnqual(LTy)); 100 LValue LV = CGF.MakeNaturalAlignAddrLValue(V, IvarTy); 119 uint64_t FieldBitOffset = LookupFieldBitOffset(CGF.CGM, OID, nullptr, Ivar); 120 uint64_t BitOffset = FieldBitOffset % CGF.CGM.getContext().getCharWidth(); 121 uint64_t AlignmentBits = CGF.CGM.getTarget().getCharAlign() [all...] |
CGOpenMPRuntimeNVPTX.h | 48 void emitEntryHeader(CodeGenFunction &CGF, EntryFunctionState &EST, 52 void emitEntryFooter(CodeGenFunction &CGF, EntryFunctionState &EST); 60 llvm::Value *getNVPTXWarpSize(CodeGenFunction &CGF); 63 llvm::Value *getNVPTXThreadID(CodeGenFunction &CGF); 66 llvm::Value *getNVPTXNumThreads(CodeGenFunction &CGF); 69 void getNVPTXCTABarrier(CodeGenFunction &CGF); 72 void syncCTAThreads(CodeGenFunction &CGF); 85 llvm::Value *getMasterThreadID(CodeGenFunction &CGF); 104 void emitWorkerLoop(CodeGenFunction &CGF, WorkerFunctionState &WST); 145 void emitNumTeamsClause(CodeGenFunction &CGF, const Expr *NumTeams [all...] |
CGOpenMPRuntime.cpp | 69 void EmitBody(CodeGenFunction &CGF, const Stmt *S) override; 73 virtual LValue getThreadIDVariableLValue(CodeGenFunction &CGF); 75 virtual void emitUntiedSwitch(CodeGenFunction & /*CGF*/) {} 140 void Enter(CodeGenFunction &CGF) override { 143 auto PartIdLVal = CGF.EmitLoadOfPointerLValue( 144 CGF.GetAddrOfLocalVar(PartIDVar), 146 auto *Res = CGF.EmitLoadOfScalar(PartIdLVal, SourceLocation()); 147 auto *DoneBB = CGF.createBasicBlock(".untied.done."); 148 UntiedSwitch = CGF.Builder.CreateSwitch(Res, DoneBB); 149 CGF.EmitBlock(DoneBB) [all...] |
CGCXXABI.h | 52 ImplicitParamDecl *getThisDecl(CodeGenFunction &CGF) { 53 return CGF.CXXABIThisDecl; 55 llvm::Value *getThisValue(CodeGenFunction &CGF) { 56 return CGF.CXXABIThisValue; 58 Address getThisAddress(CodeGenFunction &CGF) { 59 return Address(CGF.CXXABIThisValue, CGF.CXXABIThisAlignment); 63 void ErrorUnsupportedABI(CodeGenFunction &CGF, StringRef S); 68 ImplicitParamDecl *&getStructorImplicitParamDecl(CodeGenFunction &CGF) { 69 return CGF.CXXStructorImplicitParamDecl [all...] |
CGExprAgg.cpp | 34 CodeGenFunction &CGF; 58 return CGF.CreateAggTemp(T, "agg.tmp.ensured"); 62 Dest = CGF.CreateAggTemp(T, "agg.tmp.ensured"); 66 AggExprEmitter(CodeGenFunction &cgf, AggValueSlot Dest, bool IsResultUnused) 67 : CGF(cgf), Builder(CGF.Builder), Dest(Dest), 91 if (CGF.getLangOpts().getGC() && TypeRequiresGCollection(T)) 103 ApplyDebugLocation DL(CGF, E); 108 CGF.ErrorUnsupported(S, "aggregate expression") [all...] |
CGObjCRuntime.h | 85 LValue EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF, 98 void EmitTryCatchStmt(CodeGenFunction &CGF, 104 void EmitInitOfCatchParam(CodeGenFunction &CGF, llvm::Value *exn, 111 void EmitAtSynchronizedStmt(CodeGenFunction &CGF, 125 virtual llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel) = 0; 132 virtual Address GetAddrOfSelector(CodeGenFunction &CGF, Selector Sel) = 0; 135 virtual llvm::Value *GetSelector(CodeGenFunction &CGF, 162 GenerateMessageSend(CodeGen::CodeGenFunction &CGF, 178 GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF, 191 virtual llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF, [all...] |
CGStmtOpenMP.cpp | 30 void emitPreInitStmt(CodeGenFunction &CGF, const OMPExecutableDirective &S) { 36 CGF.EmitVarDecl(cast<VarDecl>(*I)); 39 CGF.EmitAutoVarAlloca(cast<VarDecl>(*I)); 40 CGF.EmitAutoVarCleanups(Emission); 49 static bool isCapturedVar(CodeGenFunction &CGF, const VarDecl *VD) { 50 return CGF.LambdaCaptureFields.lookup(VD) || 51 (CGF.CapturedStmtInfo && CGF.CapturedStmtInfo->lookup(VD)) || 52 (CGF.CurCodeDecl && isa<BlockDecl>(CGF.CurCodeDecl)) [all...] |
ItaniumCXXABI.cpp | 116 EmitLoadOfMemberFunctionPointer(CodeGenFunction &CGF, 124 EmitMemberDataPointerAddress(CodeGenFunction &CGF, const Expr *E, 129 llvm::Value *EmitMemberPointerConversion(CodeGenFunction &CGF, 144 llvm::Value *EmitMemberPointerComparison(CodeGenFunction &CGF, 149 llvm::Value *EmitMemberPointerIsNotNull(CodeGenFunction &CGF, 153 void emitVirtualObjectDelete(CodeGenFunction &CGF, const CXXDeleteExpr *DE, 162 void emitRethrow(CodeGenFunction &CGF, bool isNoReturn) override; 163 void emitThrow(CodeGenFunction &CGF, const CXXThrowExpr *E) override; 165 void emitBeginCatch(CodeGenFunction &CGF, const CXXCatchStmt *C) override; 168 emitTerminateForUnexpectedException(CodeGenFunction &CGF, [all...] |
CGAtomic.cpp | 30 CodeGenFunction &CGF; 43 AtomicInfo(CodeGenFunction &CGF, LValue &lvalue) 44 : CGF(CGF), AtomicSizeInBits(0), ValueSizeInBits(0), 47 ASTContext &C = CGF.getContext(); 54 EvaluationKind = CGF.getEvaluationKind(ValueTy); 83 auto VoidPtrAddr = CGF.EmitCastToVoidPtr(lvalue.getBitFieldPointer()); 87 VoidPtrAddr = CGF.Builder.CreateConstGEP1_64( 89 auto Addr = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( 91 CGF.Builder.getIntNTy(AtomicSizeInBits)->getPointerTo() [all...] |
CGExprScalar.cpp | 62 CodeGenFunction &CGF; 68 ScalarExprEmitter(CodeGenFunction &cgf, bool ira=false) 69 : CGF(cgf), Builder(CGF.Builder), IgnoreResultAssign(ira), 70 VMContext(cgf.getLLVMContext()) { 83 llvm::Type *ConvertType(QualType T) { return CGF.ConvertType(T); } 84 LValue EmitLValue(const Expr *E) { return CGF.EmitLValue(E); } 86 return CGF.EmitCheckedLValue(E, TCK); 93 return CGF.EmitLoadOfLValue(LV, Loc).getScalarVal() [all...] |
CGExprComplex.cpp | 48 CodeGenFunction &CGF; 53 ComplexExprEmitter(CodeGenFunction &cgf, bool ir=false, bool ii=false) 54 : CGF(cgf), Builder(CGF.Builder), IgnoreReal(ir), IgnoreImag(ii) { 77 return EmitLoadOfLValue(CGF.EmitLValue(E), E->getExprLoc()); 98 ApplyDebugLocation DL(CGF, E); 103 S->dump(CGF.getContext().getSourceManager()); 119 if (CodeGenFunction::ConstantEmission result = CGF.tryEmitAsConstant(E)) { 121 return EmitLoadOfLValue(result.getReferenceLValue(CGF, E) [all...] |
CGCUDARuntime.h | 50 virtual RValue EmitCUDAKernelCallExpr(CodeGenFunction &CGF, 55 virtual void emitDeviceStub(CodeGenFunction &CGF, FunctionArgList &Args) = 0;
|
CGOpenMPRuntime.h | 57 virtual void Enter(CodeGenFunction &CGF) {} 58 virtual void Exit(CodeGenFunction &CGF) {} 72 static void CallbackFn(intptr_t CodeGen, CodeGenFunction &CGF, 74 return (*reinterpret_cast<Callable *>(CodeGen))(CGF, Action); 88 void operator()(CodeGenFunction &CGF) const; 386 llvm::Value *emitUpdateLocation(CodeGenFunction &CGF, SourceLocation Loc, 425 virtual Address emitThreadIDAddress(CodeGenFunction &CGF, SourceLocation Loc); 429 llvm::Value *getThreadID(CodeGenFunction &CGF, SourceLocation Loc); 449 void emitThreadPrivateVarInit(CodeGenFunction &CGF, Address VDAddr, 490 TaskResultTy emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc [all...] |
CGException.cpp | 218 const EHPersonality &EHPersonality::get(CodeGenFunction &CGF) { 219 return get(CGF.CGM, dyn_cast_or_null<FunctionDecl>(CGF.CurCodeDecl)); 336 static llvm::Constant *getCatchAllValue(CodeGenFunction &CGF) { 338 return llvm::ConstantPointerNull::get(CGF.Int8PtrTy); 347 void Emit(CodeGenFunction &CGF, Flags flags) override { 348 CGF.EmitNounwindRuntimeCall(getFreeExceptionFn(CGF.CGM), exn); 466 static void emitFilterDispatchBlock(CodeGenFunction &CGF, 475 CGF.EmitBlockAfterUses(dispatchBlock) [all...] |
MicrosoftCXXABI.cpp | 115 void emitVirtualObjectDelete(CodeGenFunction &CGF, const CXXDeleteExpr *DE, 119 void emitRethrow(CodeGenFunction &CGF, bool isNoReturn) override; 120 void emitThrow(CodeGenFunction &CGF, const CXXThrowExpr *E) override; 122 void emitBeginCatch(CodeGenFunction &CGF, const CXXCatchStmt *C) override; 137 void EmitBadTypeidCall(CodeGenFunction &CGF) override; 138 llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy, 145 llvm::Value *EmitDynamicCastCall(CodeGenFunction &CGF, Address Value, 150 llvm::Value *EmitDynamicCastToVoid(CodeGenFunction &CGF, Address Value, 154 bool EmitBadCastCall(CodeGenFunction &CGF) override; 160 GetVirtualBaseClassOffset(CodeGenFunction &CGF, Address This [all...] |
CGObjCMac.cpp | [all...] |
TargetInfo.h | 96 virtual bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, 106 virtual llvm::Value *decodeReturnAddress(CodeGen::CodeGenFunction &CGF, 116 virtual llvm::Value *encodeReturnAddress(CodeGen::CodeGenFunction &CGF, 126 virtual llvm::Type *adjustInlineAsmType(CodeGen::CodeGenFunction &CGF, 134 CodeGen::CodeGenFunction &CGF, CodeGen::LValue ReturnValue,
|
CGExprCXX.cpp | 28 commonEmitCXXMemberOrOperatorCall(CodeGenFunction &CGF, const CXXMethodDecl *MD, 43 CGF.EmitTypeCheck( 46 CallLoc, This, CGF.getContext().getRecordType(MD->getParent())); 49 Args.add(RValue::get(This), MD->getThisType(CGF.getContext())); 63 CGF.EmitCallArgs(Args, FPT, drop_begin(CE->arguments(), ArgsToSkip), 352 static void EmitNullBaseClassInitialization(CodeGenFunction &CGF, 358 DestPtr = CGF.Builder.CreateElementBitCast(DestPtr, CGF.Int8Ty); 360 const ASTRecordLayout &Layout = CGF.getContext().getASTRecordLayout(Base); 370 CharUnits VBPtrWidth = CGF.getPointerSize() [all...] |
CGObjC.cpp | 33 tryEmitARCRetainScalarExpr(CodeGenFunction &CGF, const Expr *e); 34 static RValue AdjustObjCObjectType(CodeGenFunction &CGF, 251 static RValue AdjustObjCObjectType(CodeGenFunction &CGF, QualType ExpT, 257 llvm::Type *ExpLLVMTy = CGF.ConvertType(ExpT); 262 return RValue::get(CGF.Builder.CreateBitCast(Result.getScalarVal(), 489 void Emit(CodeGenFunction &CGF, Flags flags) override { 490 const ObjCMethodDecl *method = cast<ObjCMethodDecl>(CGF.CurCodeDecl); 499 llvm::Value *self = CGF.LoadObjCSelf(); 502 CGF.CGM.getObjCRuntime().GenerateMessageSendSuper(CGF, ReturnValueSlot() [all...] |
TargetInfo.cpp | 90 Address ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, 241 static llvm::Value *emitRoundPointerUpToAlignment(CodeGenFunction &CGF, 246 PtrAsInt = CGF.Builder.CreatePtrToInt(PtrAsInt, CGF.IntPtrTy); 247 PtrAsInt = CGF.Builder.CreateAdd(PtrAsInt, 248 llvm::ConstantInt::get(CGF.IntPtrTy, Align.getQuantity() - 1)); 249 PtrAsInt = CGF.Builder.CreateAnd(PtrAsInt, 250 llvm::ConstantInt::get(CGF.IntPtrTy, -Align.getQuantity())); 251 PtrAsInt = CGF.Builder.CreateIntToPtr(PtrAsInt, 271 static Address emitVoidPtrDirectVAArg(CodeGenFunction &CGF, [all...] |
CGOpenCLRuntime.h | 42 /// an entry to CGF's LocalDeclMap for D. The base class does this using 44 virtual void EmitWorkGroupLocalVarDecl(CodeGenFunction &CGF,
|
CGCUDANV.cpp | 66 void emitDeviceStubBody(CodeGenFunction &CGF, FunctionArgList &Args); 71 void emitDeviceStub(CodeGenFunction &CGF, FunctionArgList &Args) override; 113 void CGNVCUDARuntime::emitDeviceStub(CodeGenFunction &CGF, 115 EmittedKernels.push_back(CGF.CurFn); 116 emitDeviceStubBody(CGF, Args); 119 void CGNVCUDARuntime::emitDeviceStubBody(CodeGenFunction &CGF, 126 llvm::Value *V = CGF.GetAddrOfLocalVar(*I).getPointer(); 133 llvm::BasicBlock *EndBlock = CGF.createBasicBlock("setup.end"); 139 llvm::BasicBlock *NextBlock = CGF.createBasicBlock("setup.next"); 140 Args[0] = CGF.Builder.CreatePointerCast(ArgValues[I], VoidPtrTy) [all...] |