[llvm] [StandardInstrumentations] Support -print-after-pass-number option (PR #87458)
Vincent Lee via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 20:13:59 PDT 2024
================
@@ -802,6 +807,8 @@ void PrintIRInstrumentation::printBeforePass(StringRef PassID, Any IR) {
(shouldPrintBeforePass(PassID) || shouldPrintAfterPass(PassID)))
DumpIRFilename = fetchDumpFilename(PassID, IR);
+ ++CurrentPassNumber;
----------------
thevinster wrote:
Moved the `CurrentPassNumber` back to where it was to preserve the behavior of consecutive pass numbers for printing filtered IR. I also added a test for it in the same file. The new solution is to push a new PassRunDescriptor after `CurrentPassNumber` has been incremented.
https://github.com/llvm/llvm-project/pull/87458
More information about the llvm-commits
mailing list