[llvm] [CodeGen][NewPM] Port LiveDebugVariables to NPM (PR #115468)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 05:17:18 PST 2024


================
@@ -63,6 +88,16 @@ class LiveDebugVariables : public MachineFunctionPass {
   }
 };
 
+class LiveDebugVariablesAnalysis
+    : public AnalysisInfoMixin<LiveDebugVariablesAnalysis> {
+  friend AnalysisInfoMixin<LiveDebugVariablesAnalysis>;
+  static AnalysisKey Key;
+
+public:
+  using Result = LiveDebugVariables;
+  Result run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM);
+};
+
----------------
paperchalice wrote:

Oh, I see it. `DEBUG_TYPE` and `LLVM_DEBUG` works in debug build and `-debug-only` options, a printer pass should work anyway, we could keep the `LLVM_DEBUG` in `runOnMachineFunction ` as is and expose the hidden print method.

https://github.com/llvm/llvm-project/pull/115468


More information about the llvm-commits mailing list