[llvm] [CodeGen] Port PrintMIR to new pass manager (PR #79440)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 22:28:27 PST 2024
================
@@ -14,14 +14,33 @@
#ifndef LLVM_CODEGEN_MIRPRINTER_H
#define LLVM_CODEGEN_MIRPRINTER_H
+#include "llvm/CodeGen/MachinePassManager.h"
+#include "llvm/Support/Debug.h"
+
namespace llvm {
class MachineBasicBlock;
class MachineFunction;
class Module;
-class raw_ostream;
template <typename T> class SmallVectorImpl;
+class PrintMIRPreparePass : public MachinePassInfoMixin<PrintMIRPreparePass> {
+ raw_ostream &OS;
+
+public:
+ PrintMIRPreparePass(raw_ostream &OS = dbgs()) : OS(OS) {}
----------------
aeubanks wrote:
actually `errs()` makes more sense, it's less debugging and more something you're actually expecting to be output
https://github.com/llvm/llvm-project/pull/79440
More information about the llvm-commits
mailing list