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

Dmitry Bakunevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 03:21:50 PDT 2023


dbakunevich marked 4 inline comments as done.
dbakunevich added inline comments.


================
Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:809
+bool PrintIRInstrumentation::shouldPrintPassNumbers() {
+  return PrintPassNumbers;
+}
----------------
aeubanks wrote:
> isn't 0 a valid value? maybe make -1 the sentinel value
PrintPassNumbers is a bool variable that is either true or false. Perhaps you meant PrintAfterPassNumber. If so, then inside this tool it was customary to count passes starting from 1. This is more convenient from the point of view of human perception. Therefore, the value 0 is not valid.


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