38 cl::desc(
"Maximum optimization to perform"));
50 cl::desc(
"Optimization pass(es) to disable (comma-separated list)"));
54 cl::desc(
"Show verbose output when opt-disable is set"),
60 errs() <<
"BISECT: " <<
Status <<
"running pass (" << PassNum <<
") " <<
Name
61 <<
" on " << TargetDesc <<
'\n';
68 int CurBisectNum = ++LastBisectNum;
69 bool ShouldRun = (BisectLimit == -1 || CurBisectNum <= BisectLimit);
78 dbgs() <<
"OptDisable: " <<
Status <<
"running pass " <<
Name <<
" on "
79 << TargetDesc <<
"\n";
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static void printPassMessage(StringRef Name, int PassNum, StringRef TargetDesc, bool Running)
static cl::opt< bool > OptBisectVerbose("opt-bisect-verbose", cl::desc("Show verbose output when opt-bisect-limit is set"), cl::Hidden, cl::init(true), cl::Optional)
static cl::opt< bool > OptDisableVerbose("opt-disable-enable-verbosity", cl::desc("Show verbose output when opt-disable is set"), cl::Hidden, cl::init(false), cl::Optional)
static void printDisablePassMessage(const StringRef &Name, StringRef TargetDesc, bool Running)
static OptBisect & getOptBisector()
static cl::opt< int > OptBisectLimit("opt-bisect-limit", cl::Hidden, cl::init(OptBisect::Disabled), cl::Optional, cl::cb< void, int >([](int Limit) { getOptBisector().setLimit(Limit);}), cl::desc("Maximum optimization to perform"))
static OptDisable & getOptDisabler()
static cl::list< std::string > OptDisablePasses("opt-disable", cl::Hidden, cl::CommaSeparated, cl::Optional, cl::cb< void, std::string >([](const std::string &Pass) { getOptDisabler().setDisabled(Pass);}), cl::desc("Optimization pass(es) to disable (comma-separated list)"))
This file declares the interface for bisecting optimizations.
static const char PassName[]
This class implements a mechanism to disable passes and individual optimizations at compile time base...
static constexpr int Disabled
void setLimit(int Limit)
Set the new optimization limit and reset the counter.
bool shouldRunPass(StringRef PassName, StringRef IRDescription) const override
Checks the bisect limit to determine if the specified pass should run.
bool isEnabled() const override
isEnabled() should return true before calling shouldRunPass().
This class implements a mechanism to disable passes and individual optimizations at compile time base...
bool shouldRunPass(StringRef PassName, StringRef IRDescription) const override
Checks the pass name to determine if the specified pass should run.
bool isEnabled() const override
isEnabled() should return true before calling shouldRunPass().
void setDisabled(StringRef Pass)
Parses the command line argument to extract the names of the passes to be disabled.
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
Pass interface - Implemented by all 'passes'.
StringRef - Represent a constant reference to a string, i.e.
bool contains(StringRef key) const
Check if the set contains the given key.
std::pair< typename Base::iterator, bool > insert(StringRef key)
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI OptPassGate & getGlobalPassGate()
Singleton instance of the OptPassGate class, so multiple pass managers don't need to coordinate their...
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
LLVM_ABI raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.