diff options
author | Fangrui Song <i@maskray.me> | 2022-07-26 10:16:49 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-07-26 10:16:49 -0700 |
commit | f106525de2bb1be9cd055c45de6d9cf1b46b3c45 (patch) | |
tree | 97c60cbfb5630bb7a57a85013e6425bf5a905999 /llvm/include | |
parent | 8b7775a472e3665dc0a9e5953f84c43da295eddd (diff) | |
download | llvm-f106525de2bb1be9cd055c45de6d9cf1b46b3c45.zip llvm-f106525de2bb1be9cd055c45de6d9cf1b46b3c45.tar.gz llvm-f106525de2bb1be9cd055c45de6d9cf1b46b3c45.tar.bz2 |
[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
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/IR/PrintPasses.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/PrintPasses.h b/llvm/include/llvm/IR/PrintPasses.h index 1fa7c18..e721db9 100644 --- a/llvm/include/llvm/IR/PrintPasses.h +++ b/llvm/include/llvm/IR/PrintPasses.h @@ -10,10 +10,25 @@ #define LLVM_IR_PRINTPASSES_H #include "llvm/ADT/StringRef.h" +#include "llvm/Support/CommandLine.h" #include <vector> namespace llvm { +enum class ChangePrinter { + None, + Verbose, + Quiet, + DiffVerbose, + DiffQuiet, + ColourDiffVerbose, + ColourDiffQuiet, + DotCfgVerbose, + DotCfgQuiet +}; + +extern cl::opt<ChangePrinter> PrintChanged; + // Returns true if printing before/after some pass is enabled, whether all // passes or a specific pass. bool shouldPrintBeforeSomePass(); |