[llvm] Add flags to dump IR to a file before and after LLVM passes (PR #65179)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 16:46:12 PDT 2023
================
@@ -69,6 +69,62 @@ class PrintIRInstrumentation {
unsigned CurrentPassNumber = 0;
};
+class DumpIRInstrumentation {
+public:
+ void registerCallbacks(PassInstrumentationCallbacks &PIC);
+
+private:
+ void dumpBeforePass(StringRef PassID, Any IR);
+ void dumpAfterPass(StringRef PassID, Any IR);
+
+ bool shouldDumpBeforePass(StringRef PassID);
----------------
mshockwave wrote:
Please mark these `shouldDump*` functions as `const`
https://github.com/llvm/llvm-project/pull/65179
More information about the llvm-commits
mailing list