LLVM
13.0.0git
|
This class implements a mechanism to disable passes and individual optimizations at compile time based on a command line option (-opt-bisect-limit) in order to perform a bisecting search for optimization-related problems. More...
#include "llvm/IR/OptBisect.h"
Public Member Functions | |
OptBisect () | |
Default constructor, initializes the OptBisect state based on the -opt-bisect-limit command line argument. More... | |
virtual | ~OptBisect ()=default |
bool | shouldRunPass (const Pass *P, StringRef IRDescription) override |
Checks the bisect limit to determine if the specified pass should run. More... | |
bool | isEnabled () const override |
isEnabled() should return true before calling shouldRunPass(). More... | |
bool | checkPass (const StringRef PassName, const StringRef TargetDesc) |
Checks the bisect limit to determine if the specified pass should run. More... | |
![]() | |
virtual | ~OptPassGate ()=default |
This class implements a mechanism to disable passes and individual optimizations at compile time based on a command line option (-opt-bisect-limit) in order to perform a bisecting search for optimization-related problems.
Definition at line 44 of file OptBisect.h.
OptBisect::OptBisect | ( | ) |
Default constructor, initializes the OptBisect state based on the -opt-bisect-limit command line argument.
By default, bisection is disabled.
Clients should not instantiate this class directly. All access should go through LLVMContext.
Definition at line 31 of file OptBisect.cpp.
References llvm::max(), and OptBisectLimit.
|
virtualdefault |
Checks the bisect limit to determine if the specified pass should run.
If the bisect limit is set to -1, the function prints a message describing the pass and the bisect number assigned to it and return true. Otherwise, the function prints a message with the bisect number assigned to the pass and indicating whether or not the pass will be run and return true if the bisect limit has not yet been exceeded or false if it has.
Most passes should not call this routine directly. Instead, they are called through helper routines provided by the pass base classes. For instance, function passes should call FunctionPass::skipFunction().
Definition at line 48 of file OptBisect.cpp.
References assert(), OptBisectLimit, PassName, and printPassMessage().
Referenced by shouldRunPass().
|
inlineoverridevirtual |
isEnabled() should return true before calling shouldRunPass().
Reimplemented from llvm::OptPassGate.
Definition at line 63 of file OptBisect.h.
Checks the bisect limit to determine if the specified pass should run.
This forwards to checkPass().
Reimplemented from llvm::OptPassGate.
Definition at line 42 of file OptBisect.cpp.
References assert(), checkPass(), and P.