[New PM][PassInstrumentation] IR printing support for New Pass Manager
authorFedor Sergeev <fedor.sergeev@azul.com>
Mon, 24 Sep 2018 16:08:15 +0000 (16:08 +0000)
committerFedor Sergeev <fedor.sergeev@azul.com>
Mon, 24 Sep 2018 16:08:15 +0000 (16:08 +0000)
commit662e5686fe1c55cb5a46a960b9b00807c0c37b64
treebfa394d8cadad1bf232c8840ca9122d1746cfef3
parent8284b19c76a7bafdf4e53b3deb6cd35fcd370e92
[New PM][PassInstrumentation] IR printing support for New Pass Manager

Implementing -print-before-all/-print-after-all/-filter-print-func support
through PassInstrumentation callbacks.

- PrintIR routines implement printing callbacks.

- StandardInstrumentations class provides a central place to manage all
  the "standard" in-tree pass instrumentations. Currently it registers
  PrintIR callbacks.

Reviewers: chandlerc, paquette, philip.pfaffe
Differential Revision: https://reviews.llvm.org/D50923

llvm-svn: 342896
13 files changed:
llvm/include/llvm/IR/IRPrintingPasses.h
llvm/include/llvm/Pass.h
llvm/include/llvm/Passes/StandardInstrumentations.h [new file with mode: 0644]
llvm/lib/Analysis/CallGraphSCCPass.cpp
llvm/lib/Analysis/LoopInfo.cpp
llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
llvm/lib/IR/LegacyPassManager.cpp
llvm/lib/Passes/CMakeLists.txt
llvm/lib/Passes/StandardInstrumentations.cpp [new file with mode: 0644]
llvm/test/Other/loop-pass-printer.ll
llvm/test/Other/print-module-scope.ll
llvm/test/Other/printer.ll
llvm/tools/opt/NewPMDriver.cpp