[PM] Show the pass argument in pre/post-pass IR dumps
authorNicolas Guillemot <nguillemot@apple.com>
Thu, 25 Feb 2021 19:56:48 +0000 (11:56 -0800)
committerNicolas Guillemot <nguillemot@apple.com>
Thu, 25 Feb 2021 22:02:00 +0000 (14:02 -0800)
commit3573a90b8aec082b8d7a1e2fc35f7103a0df7cb6
treee2ddad8a658ae2428792e62cc49af057073c06e4
parent1df6e58e55a33991054f4041d87200bf1b217197
[PM] Show the pass argument in pre/post-pass IR dumps

This patch adds each pass' pass argument in the header for IR dumps.
For example:

Before:

```
    *** IR Dump Before InstructionSelect ***
```

After:

```
    *** IR Dump Before InstructionSelect (instruction-select) ***
```

The goal is to make it easier to know what argument to pass to
command line options like `debug-only` or `run-pass` to further
investigate a given pass.
clang/test/Misc/pr32207.c
llvm/lib/IR/LegacyPassManager.cpp
llvm/test/CodeGen/SystemZ/frame-26.mir
llvm/test/Transforms/Inline/null-function.ll