class OptBisect
Declaration
class OptBisect : public OptPassGate { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/IR/OptBisect.h:43
Inherits from: OptPassGate
Method Overview
- public OptBisect()
- public bool isEnabled() const
- public bool shouldRunPass(const llvm::Pass * P, llvm::StringRef IRDescription)
- public virtual ~OptBisect()
Inherited from OptPassGate:
Methods
¶OptBisect()
OptBisect()
Description
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.
Declared at: llvm/include/llvm/IR/OptBisect.h:52
¶bool isEnabled() const
bool isEnabled() const
Description
isEnabled should return true before calling shouldRunPass
Declared at: llvm/include/llvm/IR/OptBisect.h:70
¶bool shouldRunPass(const llvm::Pass* P,
llvm::StringRef IRDescription)
bool shouldRunPass(const llvm::Pass* P,
llvm::StringRef IRDescription)
Description
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().
Declared at: llvm/include/llvm/IR/OptBisect.h:67
Parameters
- const llvm::Pass* P
- llvm::StringRef IRDescription
¶virtual ~OptBisect()
virtual ~OptBisect()
Declared at: llvm/include/llvm/IR/OptBisect.h:54