[PATCH] D149345: [Utils] Added the ability to print the pass number and IR after it is triggered

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 10:15:04 PDT 2023


aeubanks added inline comments.


================
Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:772
+  if (shouldPrintPassNumbers())
+    dbgs() << " Running pass " << CurrentPassNumber << " " << PassID << "\n";
+
----------------
aeubanks wrote:
> extra space?
ditto for the one in printAfterPass, but actually shouldn't this go in printBeforePass?


================
Comment at: llvm/test/Other/print-at-pass-number.ll:8-9
+; AT-SAME: (i32 [[ARG:%.*]]) {
+; AT-NEXT:  bb:
+; AT-NEXT:    [[SMAX:%.*]] = call i32 @llvm.smax.i32(i32 [[ARG]], i32 0)
+; AT-NEXT:    [[TMP0:%.*]] = shl nuw i32 [[SMAX]], 1
----------------
again, we shouldn't be checking the exact IR, that's prone to changes in the passes

and there should be a test for invalidated IR


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149345/new/

https://reviews.llvm.org/D149345



More information about the llvm-commits mailing list