Lines Matching refs:OutContext

28                                     MCContext &OutContext, bool IsLocal) {  in getSymbol()  argument
29 auto GOCS = [FuncName, &OutContext, IsLocal](StringRef Suffix) { in getSymbol()
31 IsLocal ? OutContext.getAsmInfo()->getPrivateGlobalPrefix() : ""; in getSymbol()
32 return OutContext.getOrCreateSymbol(Twine(Prefix) + FuncName + in getSymbol()
64 void MCResourceInfo::assignMaxRegs(MCContext &OutContext) { in assignMaxRegs() argument
66 MCSymbol *MaxVGPRSym = getMaxVGPRSymbol(OutContext); in assignMaxRegs()
67 MCSymbol *MaxAGPRSym = getMaxAGPRSymbol(OutContext); in assignMaxRegs()
68 MCSymbol *MaxSGPRSym = getMaxSGPRSymbol(OutContext); in assignMaxRegs()
70 auto assignMaxRegSym = [&OutContext](MCSymbol *Sym, int32_t RegCount) { in assignMaxRegs()
71 const MCExpr *MaxExpr = MCConstantExpr::create(RegCount, OutContext); in assignMaxRegs()
82 void MCResourceInfo::finalize(MCContext &OutContext) { in finalize() argument
85 assignMaxRegs(OutContext); in finalize()
88 MCSymbol *MCResourceInfo::getMaxVGPRSymbol(MCContext &OutContext) { in getMaxVGPRSymbol() argument
89 return OutContext.getOrCreateSymbol("amdgpu.max_num_vgpr"); in getMaxVGPRSymbol()
92 MCSymbol *MCResourceInfo::getMaxAGPRSymbol(MCContext &OutContext) { in getMaxAGPRSymbol() argument
93 return OutContext.getOrCreateSymbol("amdgpu.max_num_agpr"); in getMaxAGPRSymbol()
96 MCSymbol *MCResourceInfo::getMaxSGPRSymbol(MCContext &OutContext) { in getMaxSGPRSymbol() argument
97 return OutContext.getOrCreateSymbol("amdgpu.max_num_sgpr"); in getMaxSGPRSymbol()
109 MCContext &OutContext) { in flattenedCycleMax() argument
133 return MCSymbolRefExpr::create(getMaxVGPRSymbol(OutContext), in flattenedCycleMax()
134 OutContext); in flattenedCycleMax()
137 return MCSymbolRefExpr::create(getMaxSGPRSymbol(OutContext), in flattenedCycleMax()
138 OutContext); in flattenedCycleMax()
141 return MCSymbolRefExpr::create(getMaxAGPRSymbol(OutContext), in flattenedCycleMax()
142 OutContext); in flattenedCycleMax()
177 return MCConstantExpr::create(Maximum, OutContext); in flattenedCycleMax()
183 MCContext &OutContext) { in assignResourceInfoExpr() argument
188 MCConstantExpr::create(LocalValue, OutContext); in assignResourceInfoExpr()
190 MCSymbol *Sym = getSymbol(FnSym->getName(), RIK, OutContext, IsLocal); in assignResourceInfoExpr()
205 getSymbol(CalleeFnSym->getName(), RIK, OutContext, IsCalleeLocal); in assignResourceInfoExpr()
214 ArgExprs.push_back(MCSymbolRefExpr::create(CalleeValSym, OutContext)); in assignResourceInfoExpr()
228 ArgExprs.push_back(flattenedCycleMax(CalleeValSym, RIK, OutContext)); in assignResourceInfoExpr()
234 SymVal = AMDGPUMCExpr::create(Kind, ArgExprs, OutContext); in assignResourceInfoExpr()
242 MCContext &OutContext) { in gatherResourceInfo() argument
244 MCSymbol *MaxVGPRSym = getMaxVGPRSymbol(OutContext); in gatherResourceInfo()
245 MCSymbol *MaxAGPRSym = getMaxAGPRSymbol(OutContext); in gatherResourceInfo()
246 MCSymbol *MaxSGPRSym = getMaxSGPRSymbol(OutContext); in gatherResourceInfo()
274 FRI.Callees, OutContext); in gatherResourceInfo()
276 const MCExpr *SymRef = MCSymbolRefExpr::create(MaxSym, OutContext); in gatherResourceInfo()
278 getSymbol(FnSym->getName(), RIK, OutContext, IsLocal); in gatherResourceInfo()
280 {MCConstantExpr::create(numRegs, OutContext), SymRef}, OutContext); in gatherResourceInfo()
297 getSymbol(FnSym->getName(), RIK_PrivateSegSize, OutContext, IsLocal); in gatherResourceInfo()
303 MCConstantExpr::create(FRI.CalleeSegmentSize, OutContext)); in gatherResourceInfo()
315 getSymbol(CalleeFnSym->getName(), RIK_PrivateSegSize, OutContext, in gatherResourceInfo()
325 ArgExprs.push_back(MCSymbolRefExpr::create(CalleeValSym, OutContext)); in gatherResourceInfo()
330 MCConstantExpr::create(FRI.PrivateSegmentSize, OutContext); in gatherResourceInfo()
336 AMDGPUMCExpr::createMax(ArgExprs, OutContext); in gatherResourceInfo()
338 MCBinaryExpr::createAdd(localConstExpr, transitiveExpr, OutContext); in gatherResourceInfo()
344 MCSymbol *Sym = getSymbol(FnSym->getName(), RIK, OutContext, IsLocal); in gatherResourceInfo()
348 Sym->setVariableValue(MCConstantExpr::create(LocalValue, OutContext)); in gatherResourceInfo()
353 AMDGPUMCExpr::AGVK_Or, MF, FRI.Callees, OutContext); in gatherResourceInfo()
356 AMDGPUMCExpr::AGVK_Or, MF, FRI.Callees, OutContext); in gatherResourceInfo()
359 AMDGPUMCExpr::AGVK_Or, MF, FRI.Callees, OutContext); in gatherResourceInfo()
361 AMDGPUMCExpr::AGVK_Or, MF, FRI.Callees, OutContext); in gatherResourceInfo()
364 AMDGPUMCExpr::AGVK_Or, MF, FRI.Callees, OutContext); in gatherResourceInfo()