Lines Matching refs:CGM
41 : CodeGenTypeCache(cgm), CGM(cgm), Target(cgm.getTarget()), in CodeGenFunction()
46 SanOpts(CGM.getLangOpts().Sanitize), IsSanitizerScope(false), in CodeGenFunction()
53 DebugInfo(CGM.getModuleDebugInfo()), in CodeGenFunction()
64 CGM.getCXXABI().getMangleContext().startNewFunction(); in CodeGenFunction()
67 if (CGM.getLangOpts().FastMath) in CodeGenFunction()
69 if (CGM.getLangOpts().FiniteMathOnly) { in CodeGenFunction()
73 if (CGM.getCodeGenOpts().NoNaNsFPMath) { in CodeGenFunction()
76 if (CGM.getCodeGenOpts().NoSignedZeros) { in CodeGenFunction()
79 if (CGM.getCodeGenOpts().ReciprocalMath) { in CodeGenFunction()
95 CGM.getOpenMPRuntime().functionFinished(*this); in ~CodeGenFunction()
129 Alignment = CGM.getClassPointerAlignment(RD); in getNaturalTypeAlignment()
149 CGM.getTBAAInfo(T)); in MakeNaturalAlignAddrLValue()
163 return CGM.getTypes().ConvertTypeForMem(T); in ConvertTypeForMem()
167 return CGM.getTypes().ConvertType(T); in ConvertType()
354 &CGM.getModule(), llvm::Intrinsic::localescape); in FinishFunction()
378 if (CGM.getCodeGenOpts().EmitDeclMetadata) in FinishFunction()
393 if (!CGM.getCodeGenOpts().InstrumentFunctions) in ShouldInstrumentFunction()
403 return CGM.getCodeGenOpts().XRayInstrumentFunctions; in ShouldXRayInstrumentFunction()
417 llvm::Constant *F = CGM.CreateRuntimeFunction(FunctionTy, Fn); in EmitFunctionInstrumentation()
419 CGM.getIntrinsic(llvm::Intrinsic::returnaddress), in EmitFunctionInstrumentation()
435 CGM.CreateRuntimeFunction(FTy, getTarget().getMCountName()); in EmitMCountInstrumentation()
443 CodeGenModule &CGM, llvm::LLVMContext &Context, in GenOpenCLArgMetadata() argument
517 CGM.getContext().getTargetAddressSpace(LangAS::opencl_global); in GenOpenCLArgMetadata()
590 if (CGM.getCodeGenOpts().EmitOpenCLArgMetadata) in GenOpenCLArgMetadata()
603 GenOpenCLArgMetadata(FD, Fn, CGM, Context, Builder, getContext()); in EmitOpenCLKernelMetadata()
613 CGM.getTypes().ConvertType(A->getTypeHint()))), in EmitOpenCLKernelMetadata()
676 if (CGM.isInSanitizerBlacklist(Fn, Loc)) in StartFunction()
705 llvm::itostr(CGM.getCodeGenOpts().XRayInstructionThreshold)); in StartFunction()
715 const CodeGenOptions& CodeGenOpts = CGM.getCodeGenOpts(); in StartFunction()
727 if (CGM.getLangOpts().OpenMP && FD->hasAttr<OMPDeclareSimdDeclAttr>()) in StartFunction()
728 CGM.getOpenMPRuntime().emitDeclareSimdFunction(FD, Fn); in StartFunction()
733 llvm::toStringRef(CGM.getCodeGenOpts().NoUseJumpTables)); in StartFunction()
746 CGM.getTargetCodeGenInfo().getUBSanFunctionSignature(CGM)) { in StartFunction()
748 CGM.GetAddrOfRTTIDescriptor(FD->getType(), /*ForEH=*/true); in StartFunction()
797 if (CGM.getCodeGenOpts().InstrumentForProfiling) in StartFunction()
842 CGM.getCXXABI().EmitInstanceFunctionProlog(*this); in StartFunction()
922 if (HaveInsertPoint() && CGM.getCodeGenOpts().hasProfileClangInstr()) { in EmitBlockWithFallThrough()
960 if (CGM.getCXXABI().HasThisReturn(GD)) in BuildFunctionArgList()
962 else if (CGM.getCXXABI().hasMostDerivedReturn(GD)) in BuildFunctionArgList()
963 ResTy = CGM.getContext().VoidPtrTy; in BuildFunctionArgList()
964 CGM.getCXXABI().buildThisParam(*this, Args); in BuildFunctionArgList()
992 CGM.getCXXABI().addImplicitStructorParams(*this, ResTy, Args); in BuildFunctionArgList()
1038 CGM.getCUDARuntime().emitDeviceStub(*this, Args); in GenerateCode()
1074 } else if (CGM.getCodeGenOpts().OptimizationLevel == 0) { in GenerateCode()
1358 if (Call && CGM.getCodeGenOpts().OptimizationLevel != 0) { in EmitBranchOnBoolExpr()
1384 CGM.ErrorUnsupported(S, Type); in ErrorUnsupported()
1471 SizeVal = Builder.CreateNUWMul(SizeVal, CGM.getSize(eltSize)); in EmitNullInitialization()
1477 SizeVal = CGM.getSize(size); in EmitNullInitialization()
1485 if (!CGM.getTypes().isZeroInitializable(Ty)) { in EmitNullInitialization()
1489 llvm::Constant *NullConstant = CGM.EmitNullConstant(Ty); in EmitNullInitialization()
1492 new llvm::GlobalVariable(CGM.getModule(), NullConstant->getType(), in EmitNullInitialization()
1821 if (CGM.getCodeGenOpts().getDebugInfo() >= codegenoptions::LimitedDebugInfo) in EmitDeclRefExprDbgValue()
1858 Builder.CreateBitCast(CGM.EmitAnnotationString(AnnotationStr), Int8PtrTy), in EmitAnnotationCall()
1859 Builder.CreateBitCast(CGM.EmitAnnotationUnit(Location), Int8PtrTy), in EmitAnnotationCall()
1860 CGM.EmitAnnotationLineNo(Location) in EmitAnnotationCall()
1870 EmitAnnotationCall(CGM.getIntrinsic(llvm::Intrinsic::var_annotation), in EmitVarAnnotations()
1871 Builder.CreateBitCast(V, CGM.Int8PtrTy, V->getName()), in EmitVarAnnotations()
1880 llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::ptr_annotation, in EmitFieldAnnotations()
1881 CGM.Int8PtrTy); in EmitFieldAnnotations()
1887 if (VTy != CGM.Int8PtrTy) in EmitFieldAnnotations()
1888 V = Builder.Insert(new llvm::BitCastInst(V, CGM.Int8PtrTy)); in EmitFieldAnnotations()
1914 CGM.getSanitizerMetadata()->disableSanitizerForInstruction(I); in InsertHelper()
1926 CodeGenModule &CGM, const FunctionDecl *FD, in hasRequiredFeatures() argument
1935 CGM.getFunctionFeatureMap(CallerFeatureMap, FD); in hasRequiredFeatures()
1976 CGM.getContext().BuiltinInfo.getRequiredFeatures(BuiltinID); in checkTargetFeatures()
1981 if (!hasRequiredFeatures(ReqFeatures, CGM, FD, MissingFeature)) in checkTargetFeatures()
1982 CGM.getDiags().Report(E->getLocStart(), diag::err_builtin_needs_feature) in checkTargetFeatures()
1984 << CGM.getContext().BuiltinInfo.getRequiredFeatures(BuiltinID); in checkTargetFeatures()
1990 CGM.getFunctionFeatureMap(CalleeFeatureMap, TargetDecl); in checkTargetFeatures()
1996 if (!hasRequiredFeatures(ReqFeatures, CGM, FD, MissingFeature)) in checkTargetFeatures()
1997 CGM.getDiags().Report(E->getLocStart(), diag::err_function_needs_feature) in checkTargetFeatures()
2003 if (!CGM.getCodeGenOpts().SanitizeStats) in EmitSanitizerStatReport()
2008 CGM.getSanStats().create(IRB, SSK); in EmitSanitizerStatReport()