[llvm] [CodeGen] Port dot-machine-cfg to new pass manager (PR #195901)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 06:07:06 PDT 2026
================
@@ -91,3 +92,15 @@ bool MachineCFGPrinter::runOnMachineFunction(MachineFunction &MF) {
writeMCFGToDotFile(MF);
return false;
}
+
+PreservedAnalyses
+MachineCFGPrinterPass::run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &MFAM) {
+ if (!MCFGFuncName.empty() && !MF.getName().contains(MCFGFuncName))
+ return PreservedAnalyses::all();
+ errs() << "Writing Machine CFG for function ";
+ errs().write_escaped(MF.getName()) << '\n';
----------------
arsenm wrote:
This shouldn't use getName, it will be empty for an anonymous function. But the old pm has the same bug
https://github.com/llvm/llvm-project/pull/195901
More information about the llvm-commits
mailing list