[Utils] Added the ability to print the pass number and IR after it is triggered
authordbakunevich <dbakunevich@azul.com>
Thu, 11 May 2023 09:30:07 +0000 (16:30 +0700)
committerdbakunevich <dbakunevich@azul.com>
Fri, 26 May 2023 10:34:48 +0000 (17:34 +0700)
commitf97ea77506aaee42af856bfde4d4fb3cc4311c12
treea3b4a68ae73cade5081bad210c341018c06d07a7
parent596887da2e90d43ac2c08131229197a1e3a3a4f5
[Utils] Added the ability to print the pass number and IR after it is triggered

As part of this patch, 2 options have been added:
print-pass-numbers and print-after-pass-number.

1) The print-pass-numbers option allows to print the pass names and their ordinals.
   The output of the option looks like this:
                Running pass ORDINAL PASS_NAME

2) The print-after-pass-number option allows to print IR after pass with the number
   which reported by print-passes-names.

Reviewed By: apilipenko, aeubanks

Differential Revision: https://reviews.llvm.org/D149345
llvm/include/llvm/Passes/StandardInstrumentations.h
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/test/Other/print-at-pass-number.ll [new file with mode: 0644]