[llvm] [CodeGen] Port mir-debugify to new pass manager (PR #193201)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 05:10:17 PDT 2026
================
@@ -205,6 +211,28 @@ INITIALIZE_PASS_BEGIN(DebugifyMachineModule, DEBUG_TYPE,
INITIALIZE_PASS_END(DebugifyMachineModule, DEBUG_TYPE,
"Machine Debugify Module", false, false)
-ModulePass *llvm::createDebugifyMachineModulePass() {
+ModulePass *llvm::createDebugifyMachineModuleLegacyPass() {
return new DebugifyMachineModule();
}
+
+PreservedAnalyses DebugifyMachineModulePass::run(Module &M,
+ ModuleAnalysisManager &AM) {
+ FunctionAnalysisManager &FAM =
+ AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
+ const bool Changed = applyDebugifyMetadata(
+ M, M.functions(),
+ "ModuleDebugify: ", [&](DIBuilder &DIB, Function &F) -> bool {
+ return applyDebugifyMetadataToMachineFunction(
+ DIB, F, [&FAM](Function &F) -> MachineFunction * {
+ return &FAM.getResult<MachineFunctionAnalysis>(F).getMF();
+ });
----------------
juanvazquez wrote:
I'm having a hard time finding something actionable for me to do about this comment in this PR.
If you think there is something I should do in the context of this PR, I'd appreciate if you could clarify for me :-) I'd be happy of trying to give it a shot.
https://github.com/llvm/llvm-project/pull/193201
More information about the llvm-commits
mailing list