[llvm] [CodeGen] Port mir-debugify to new pass manager (PR #193201)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 06:11:57 PDT 2026
================
@@ -405,6 +405,19 @@ AnalysisKey NoOpLoopAnalysis::Key;
namespace {
+bool applyMIRDebugify(DIBuilder &DIB, Function &F, ModuleAnalysisManager &AM) {
+ FunctionAnalysisManager &FAM =
+ AM.getResult<FunctionAnalysisManagerModuleProxy>(*F.getParent())
+ .getManager();
+
+ return applyDebugifyMetadataToMachineFunction(
+ DIB, F, [&](Function &Func) -> MachineFunction * {
+ MachineFunctionAnalysis::Result *MFA =
+ FAM.getCachedResult<MachineFunctionAnalysis>(Func);
+ return MFA ? &MFA->getMF() : nullptr;
----------------
arsenm wrote:
Why is this getCachedResult? This shouldn't be able to fail?
https://github.com/llvm/llvm-project/pull/193201
More information about the llvm-commits
mailing list