LLVM 20.0.0git
|
This file defines IR-printing pass instrumentation callbacks as well as StandardInstrumentations class that manages standard pass instrumentations. More...
#include "llvm/Passes/StandardInstrumentations.h"
#include "llvm/ADT/Any.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/CodeGen/MIRPrinter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineVerifier.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassInstrumentation.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/PrintPasses.h"
#include "llvm/IR/StructuralHash.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/Regex.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/xxhash.h"
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
Enumerations | |
enum class | IRDumpFileSuffixType { Before , After , Invalidated } |
Functions | |
template<typename IRUnitT > | |
static const IRUnitT * | unwrapIR (Any IR) |
static bool | shouldGenerateData (const Function &F) |
static bool | shouldGenerateData (const MachineFunction &MF) |
static SmallString< 32 > | getIRFileDisplayName (Any IR) |
static StringRef | getFileSuffix (IRDumpFileSuffixType Type) |
static int | prepareDumpIRFileDescriptor (const StringRef DumpIRFilename) |
static void | printBBName (raw_ostream &out, const BasicBlock *BB) |
static SmallVector< Function *, 1 > | GetFunctions (Any IR) |
Variables | |
static cl::opt< bool > | VerifyAnalysisInvalidation ("verify-analysis-invalidation", cl::Hidden, cl::init(false)) |
static cl::opt< bool > | PrintChangedBefore ("print-before-changed", cl::desc("Print before passes that change them"), cl::init(false), cl::Hidden) |
static cl::opt< std::string > | DotBinary ("print-changed-dot-path", cl::Hidden, cl::init("dot"), cl::desc("system dot used by change reporters")) |
static cl::opt< std::string > | BeforeColour ("dot-cfg-before-color", cl::desc("Color for dot-cfg before elements"), cl::Hidden, cl::init("red")) |
static cl::opt< std::string > | AfterColour ("dot-cfg-after-color", cl::desc("Color for dot-cfg after elements"), cl::Hidden, cl::init("forestgreen")) |
static cl::opt< std::string > | CommonColour ("dot-cfg-common-color", cl::desc("Color for dot-cfg common elements"), cl::Hidden, cl::init("black")) |
static cl::opt< std::string > | DotCfgDir ("dot-cfg-dir", cl::desc("Generate dot files into specified directory for changed IRs"), cl::Hidden, cl::init("./")) |
static cl::opt< std::string > | PrintOnCrashPath ("print-on-crash-path", cl::desc("Print the last form of the IR before crash to a file"), cl::Hidden) |
static cl::opt< bool > | PrintOnCrash ("print-on-crash", cl::desc("Print the last form of the IR before crash (use -print-on-crash-path to dump to a file)"), cl::Hidden) |
static cl::opt< std::string > | OptBisectPrintIRPath ("opt-bisect-print-ir-path", cl::desc("Print IR to path when opt-bisect-limit is reached"), cl::Hidden) |
static cl::opt< bool > | PrintPassNumbers ("print-pass-numbers", cl::init(false), cl::Hidden, cl::desc("Print pass names and their ordinals")) |
static cl::opt< unsigned > | PrintBeforePassNumber ("print-before-pass-number", cl::init(0), cl::Hidden, cl::desc("Print IR before the pass with this number as " "reported by print-pass-numbers")) |
static cl::opt< unsigned > | PrintAfterPassNumber ("print-after-pass-number", cl::init(0), cl::Hidden, cl::desc("Print IR after the pass with this number as " "reported by print-pass-numbers")) |
static cl::opt< std::string > | IRDumpDirectory ("ir-dump-directory", cl::desc("If specified, IR printed using the " "-print-[before|after]{-all} options will be dumped into " "files in this directory rather than written to stderr"), cl::Hidden, cl::value_desc("filename")) |
This file defines IR-printing pass instrumentation callbacks as well as StandardInstrumentations class that manages standard pass instrumentations.
Definition in file StandardInstrumentations.cpp.
|
strong |
Enumerator | |
---|---|
Before | |
After | |
Invalidated |
Definition at line 802 of file StandardInstrumentations.cpp.
|
static |
Definition at line 808 of file StandardInstrumentations.cpp.
|
static |
Definition at line 1340 of file StandardInstrumentations.cpp.
References F, IR, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::PreservedCFGCheckerInstrumentation::registerCallbacks().
|
static |
Definition at line 751 of file StandardInstrumentations.cpp.
References llvm::CallingConv::C, F, llvm::MachineFunction::getName(), IR, llvm_unreachable, llvm::Lower, llvm::write_hex(), and llvm::xxh3_64bits().
Definition at line 830 of file StandardInstrumentations.cpp.
References llvm::sys::fs::CD_OpenAlways, llvm::sys::fs::create_directories(), llvm::sys::fs::FA_Write, llvm::sys::fs::OF_Text, llvm::sys::fs::openFile(), llvm::sys::path::parent_path(), and llvm::report_fatal_error().
|
static |
Definition at line 1186 of file StandardInstrumentations.cpp.
References llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::Value::hasName(), and llvm::BasicBlock::isEntryBlock().
Referenced by llvm::PreservedCFGCheckerInstrumentation::CFG::printDiff().
Definition at line 716 of file StandardInstrumentations.cpp.
References F, and llvm::isFunctionInPrintList().
Referenced by llvm::IRComparer< T >::generateFunctionData().
|
static |
Definition at line 720 of file StandardInstrumentations.cpp.
References llvm::MachineFunction::getName(), and llvm::isFunctionInPrintList().
Definition at line 141 of file StandardInstrumentations.cpp.
References IR.
|
static |
|
static |
|
static |
|
static |
Referenced by llvm::DotCfgChangeReporter::genHTML().
|
static |
|
static |
Referenced by llvm::OptPassGateInstrumentation::shouldRun().
|
static |
|
static |
|
static |
Referenced by llvm::IRChangedPrinter::handleAfter().
|
static |
|
static |