[llvm] [CodeGen][NewPM] Port `AsmPrinter` to new pass manager (PR #99320)
Akshat Oke via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 01:52:02 PDT 2025
================
@@ -440,9 +440,13 @@ void AMDGPUAsmPrinter::validateMCResourceInfo(Function &F) {
RI.getSymbol(FnSym->getName(), RIK::RIK_NumAGPR, OutContext, IsLocal);
uint64_t NumVgpr, NumAgpr;
- MachineModuleInfo &MMI =
- getAnalysis<MachineModuleInfoWrapperPass>().getMMI();
- MachineFunction *MF = MMI.getMachineFunction(F);
+ MachineFunction *MF =
+ !MAM ? MMI->getMachineFunction(F)
+ : &MAM->getResult<FunctionAnalysisManagerModuleProxy>(
+ *F.getParent())
+ .getManager()
+ .getResult<MachineFunctionAnalysis>(F)
+ .getMF();
----------------
optimisan wrote:
Didn't get that; free-machine-function runs before asm-finalize in NPM also
https://github.com/llvm/llvm-project/pull/99320
More information about the llvm-commits
mailing list