Lines Matching refs:CGM
129 CGM.getLLVMLinkageVarDefinition(&D, /*isConstant=*/false); in EmitVarDecl()
143 return CGM.getOpenCLRuntime().EmitWorkGroupLocalVarDecl(*this, D); in EmitVarDecl()
151 CodeGenModule &CGM = CGF.CGM; in GetStaticDeclName() local
154 return CGM.getMangledName(&D).str(); in GetStaticDeclName()
162 ContextName = CGM.getBlockMangledName(GlobalDecl(), BD); in GetStaticDeclName()
166 ContextName = CGM.getMangledName(FD); in GetStaticDeclName()
185 Name = CGM.getMangledName(&D); in CreateStaticVarDecl()
189 llvm::Type *LTy = CGM.getTypes().ConvertTypeForMem(Ty); in CreateStaticVarDecl()
191 CGM.GetGlobalVarAddressSpace(&D, CGM.getContext().getTargetAddressSpace(Ty)); in CreateStaticVarDecl()
193 new llvm::GlobalVariable(CGM.getModule(), LTy, in CreateStaticVarDecl()
195 CGM.EmitNullConstant(D.getType()), Name, nullptr, in CreateStaticVarDecl()
199 CGM.setGlobalVisibility(GV, &D); in CreateStaticVarDecl()
202 CGM.setTLSMode(GV, D); in CreateStaticVarDecl()
212 unsigned ExpectedAddrSpace = CGM.getContext().getTargetAddressSpace(Ty); in CreateStaticVarDecl()
236 llvm::Constant *Init = CGM.EmitConstantInit(D, this); in AddInitializerToStaticVarDecl()
242 CGM.ErrorUnsupported(D.getInit(), "constant l-value expression"); in AddInitializerToStaticVarDecl()
260 GV = new llvm::GlobalVariable(CGM.getModule(), Init->getType(), in AddInitializerToStaticVarDecl()
265 CGM.getContext().getTargetAddressSpace(D.getType())); in AddInitializerToStaticVarDecl()
280 GV->setConstant(CGM.isTypeConstant(D.getType(), true)); in AddInitializerToStaticVarDecl()
302 CGM.getStaticLocalDeclAddress(&D); in EmitStaticVarDecl()
310 CGM.setStaticLocalDeclAddress(&D, addr); in EmitStaticVarDecl()
330 CGM.AddGlobalAnnotations(&D, var); in EmitStaticVarDecl()
336 CGM.addUsedGlobal(var); in EmitStaticVarDecl()
346 CGM.setStaticLocalDeclAddress(&D, castedAddr); in EmitStaticVarDecl()
348 CGM.reportGlobalToASan(var, D.getLocation()); in EmitStaticVarDecl()
353 CGM.getCodeGenOpts().getDebugInfo() >= CodeGenOptions::LimitedDebugInfo) { in EmitStaticVarDecl()
419 llvm::Value *F = CGF.CGM.getIntrinsic(llvm::Intrinsic::stackrestore); in Emit()
482 CGF.Builder.CreateCall2(CGF.CGM.getLLVMLifetimeEndFn(), in Emit()
808 if (CGF.CGM.getCodeGenOpts().OptimizationLevel == 0) in shouldUseLifetimeMarkers()
868 if (CGM.getCodeGenOpts().MergeAllConstants && !NRVO && !isByRef && in EmitAutoVarAlloca()
869 CGM.isTypeConstant(Ty, true)) { in EmitAutoVarAlloca()
922 uint64_t size = CGM.getDataLayout().getTypeAllocSize(LTy); in EmitAutoVarAlloca()
928 Builder.CreateCall2(CGM.getLLVMLifetimeStartFn(), sizeV, castAddr) in EmitAutoVarAlloca()
941 llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::stacksave); in EmitAutoVarAlloca()
974 if (CGM.getCodeGenOpts().getDebugInfo() in EmitAutoVarAlloca()
1090 constant = CGM.EmitConstantInit(D, this); in EmitAutoVarInit()
1121 CGM.getDataLayout().getTypeAllocSize(constant->getType()))) { in EmitAutoVarInit()
1134 new llvm::GlobalVariable(CGM.getModule(), constant->getType(), true, in EmitAutoVarInit()
1292 llvm::Constant *F = CGM.GetAddrOfFunction(FD); in EmitAutoVarCleanups()
1295 const CGFunctionInfo &Info = CGM.getTypes().arrangeFunctionDeclaration(FD); in EmitAutoVarCleanups()
1625 if (CGM.getCodeGenOpts().OptimizationLevel == 0) { in EmitParmDecl()
1636 if (CGM.getCodeGenOpts().getDebugInfo() in EmitParmDecl()
1698 if (CGM.getCodeGenOpts().OptimizationLevel == 0) { in EmitParmDecl()
1702 llvm::Value *Null = CGM.EmitNullConstant(D.getType()); in EmitParmDecl()
1743 if (CGM.getCodeGenOpts().getDebugInfo() in EmitParmDecl()