[llvm] [StandardInstrumentations] Support -print-after-pass-number option (PR #87458)

Vincent Lee via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 21:00:03 PDT 2024


================
@@ -802,6 +807,8 @@ void PrintIRInstrumentation::printBeforePass(StringRef PassID, Any IR) {
       (shouldPrintBeforePass(PassID) || shouldPrintAfterPass(PassID)))
     DumpIRFilename = fetchDumpFilename(PassID, IR);
 
+  ++CurrentPassNumber;
----------------
thevinster wrote:

Ugh nevermind, this approach doesn't work as it doesn't clean the PassRunDescriptor stack up. The new approach is to implement a separate check that only pushes the PassRunDescriptor when the you are running with `-print-after-pass-number` option. 

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


More information about the llvm-commits mailing list