LLVM: llvm::OptDisable Class Reference (original) (raw)

This class implements a mechanism to disable passes and individual optimizations at compile time based on a command line option (-opt-disable) in order to study how single transformations, or combinations thereof, affect the IR. More...

#include "[llvm/IR/OptBisect.h](OptBisect%5F8h%5Fsource.html)"

Public Member Functions
bool shouldRunPass (StringRef PassName, StringRef IRDescription) const override
Checks the pass name to determine if the specified pass should run.
void setDisabled (StringRef Pass)
Parses the command line argument to extract the names of the passes to be disabled.
bool isEnabled () const override
isEnabled() should return true before calling shouldRunPass().
Public Member Functions inherited from llvm::OptPassGate
virtual ~OptPassGate ()=default

This class implements a mechanism to disable passes and individual optimizations at compile time based on a command line option (-opt-disable) in order to study how single transformations, or combinations thereof, affect the IR.

Definition at line 90 of file OptBisect.h.

isEnabled()

bool llvm::OptDisable::isEnabled ( ) const inlineoverridevirtual

setDisabled()

void OptDisable::setDisabled ( StringRef Pass )

Parses the command line argument to extract the names of the passes to be disabled.

Multiple pass names can be provided with comma separation.

Definition at line 82 of file OptBisect.cpp.

shouldRunPass()

Checks the pass name to determine if the specified pass should run.

It returns true if the pass should run, i.e. if its name is was not provided via command line. If -opt-disable-enable-verbosity is given, the method prints the name of the pass, and whether or not the pass will be executed.

Most passes should not call this routine directly. Instead, it is called through helper routines provided by the base classes of the pass. For instance, function passes should call FunctionPass::skipFunction().

Reimplemented from llvm::OptPassGate.

Definition at line 84 of file OptBisect.cpp.

References assert(), isEnabled(), OptDisableVerbose, PassName, and printDisablePassMessage().


The documentation for this class was generated from the following files: