33 cl::desc(
"Maximum optimization to perform"));
43 errs() <<
"BISECT: " <<
Status <<
"running pass "
44 <<
"(" << PassNum <<
") " <<
Name <<
" on " << TargetDesc <<
"\n";
51 int CurBisectNum = ++LastBisectNum;
52 bool ShouldRun = (BisectLimit == -1 || CurBisectNum <= BisectLimit);
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 void printPassMessage(const StringRef &Name, int PassNum, 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"))
This file declares the interface for bisecting optimizations.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static const char PassName[]
This class implements a mechanism to disable passes and individual optimizations at compile time base...
bool shouldRunPass(const StringRef PassName, StringRef IRDescription) override
Checks the bisect limit to determine if the specified pass should run.
static const int Disabled
void setLimit(int Limit)
Set the new optimization limit and reset the counter.
bool isEnabled() const override
isEnabled() should return true before calling shouldRunPass().
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
StringRef - Represent a constant reference to a string, i.e.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
OptPassGate & getGlobalPassGate()
Singleton instance of the OptBisect class, so multiple pass managers don't need to coordinate their u...
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.