29 cl::desc(
"Maximum optimization to perform"));
38 errs() <<
"BISECT: " << Status <<
"running pass "
39 <<
"(" << PassNum <<
") " << Name <<
" on " << TargetDesc <<
"\n";
44 errs() <<
"BISECT: running case (";
46 errs() <<
"BISECT: NOT running case (";
47 errs() << CaseNum <<
"): " << Msg <<
"\n";
59 return "basic block (" + BB.
getName().
str() +
") in function (" +
71 std::string
Desc =
"SCC (";
82 Desc +=
"<<null function>>";
95 template <
class UnitT>
102 bool OptBisect::checkPass(
const StringRef PassName,
106 int CurBisectNum = ++LastBisectNum;
115 int CurFuelNum = ++LastBisectNum;
static void printCaseMessage(int CaseNum, StringRef Msg, bool Running)
Pass interface - Implemented by all 'passes'.
bool shouldRunPass(const Pass *P, const UnitT &U)
Checks the bisect limit to determine if the specified pass should run.
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
bool shouldRunCase(const Twine &Desc)
Checks the bisect limit to determine if the optimization described by the /p Desc argument should run...
A Module instance is used to store all the information related to an LLVM module. ...
Implements a lazy call graph analysis and related passes for the new pass manager.
MachineInstrBuilder MachineInstrBuilder &DefMI const MCInstrDesc & Desc
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
const Function * getParent() const
Return the enclosing method, or null if none.
A node in the call graph for a module.
StringRef getName() const
Return a constant reference to the value's name.
std::string str() const
Return the twine contents as a std::string.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
StringRef getName() const
Get a short "name" for the module.
static void printPassMessage(const StringRef &Name, int PassNum, StringRef TargetDesc, bool Running)
initializer< Ty > init(const Ty &Val)
LLVM Basic Block Representation.
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
OptBisect()
Default constructor, initializes the OptBisect state based on the -opt-bisect-limit command line argu...
Module.h This file contains the declarations for the Module class.
This file declares the interface for bisecting optimizations.
static std::string getDescription(const Module &M)
Represents a single loop in the control flow graph.
static cl::opt< int > OptBisectLimit("opt-bisect-limit", cl::Hidden, cl::init(INT_MAX), cl::Optional, cl::desc("Maximum optimization to perform"))
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on.
StringRef - Represent a constant reference to a string, i.e.