[MachineFunctionPass] Support -print-changed and -print-changed=quiet
authorFangrui Song <i@maskray.me>
Tue, 26 Jul 2022 17:16:49 +0000 (10:16 -0700)
committerFangrui Song <i@maskray.me>
Tue, 26 Jul 2022 17:16:49 +0000 (10:16 -0700)
commitf106525de2bb1be9cd055c45de6d9cf1b46b3c45
tree97c60cbfb5630bb7a57a85013e6425bf5a905999
parent8b7775a472e3665dc0a9e5953f84c43da295eddd
[MachineFunctionPass] Support -print-changed and -print-changed=quiet

-print-changed for new pass manager is handy beside -print-after-all.
Port it to MachineFunctionPass.

Note: lib/Passes/StandardInstrumentations.cpp implements a number of
misc features. If we want to use them for codegen, we may need to lift
some functionality to LLVMIR.

Reviewed By: aeubanks, jamieschmeiser

Differential Revision: https://reviews.llvm.org/D130434
llvm/include/llvm/IR/PrintPasses.h
llvm/lib/CodeGen/MachineFunctionPass.cpp
llvm/lib/IR/PrintPasses.cpp
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/test/Other/print-changed-machine.ll [new file with mode: 0644]