OSDN Git Service

[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)
commita7c2370e954d69a72e51e5b8e8d23a7989ed2003
treef6665a1186fcf8f7c7803ef7c1fad9e6f3510058
parent166505c19de1bd1f9d1ea619ab98a0862c42e032
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342896 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/llvm/IR/IRPrintingPasses.h
include/llvm/Pass.h
include/llvm/Passes/StandardInstrumentations.h [new file with mode: 0644]
lib/Analysis/CallGraphSCCPass.cpp
lib/Analysis/LoopInfo.cpp
lib/CodeGen/MachineFunctionPrinterPass.cpp
lib/IR/LegacyPassManager.cpp
lib/Passes/CMakeLists.txt
lib/Passes/StandardInstrumentations.cpp [new file with mode: 0644]
test/Other/loop-pass-printer.ll
test/Other/print-module-scope.ll
test/Other/printer.ll
tools/opt/NewPMDriver.cpp