================ @@ -95,12 +107,29 @@ static const Function *findCalledFunction(const Module &M, return nullptr; } -bool RegUsageInfoPropagation::runOnMachineFunction(MachineFunction &MF) { - const Module &M = *MF.getFunction().getParent(); +bool RegUsageInfoPropagationLegacy::runOnMachineFunction(MachineFunction &MF) { PhysicalRegisterUsageInfo *PRUI = &getAnalysis<PhysicalRegisterUsageInfoWrapperLegacy>().getPRUI(); - LLVM_DEBUG(dbgs() << " ++++++++++++++++++++ " << getPassName() + RegUsageInfoPropagation RUIP(PRUI); + return RUIP.run(MF); +} + +PreservedAnalyses +RegUsageInfoPropagationPass::run(MachineFunction &MF, + MachineFunctionAnalysisManager &MFAM) { + Module &MFA = *MF.getFunction().getParent(); + auto *PRUI = MFAM.getResult<ModuleAnalysisManagerMachineFunctionProxy>(MF) + .getCachedResult<PhysicalRegisterUsageAnalysis>(MFA); + assert(PRUI && "PhysicalRegisterUsageAnalysis not available"); ---------------- optimisan wrote:
It is an outer analysis so cannot run it from an inner IR, https://github.com/llvm/llvm-project/pull/114010 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits