LLVM 22.0.0git
OptBisect.cpp File Reference

This file implements support for a bisecting optimizations based on a command line option. More...

#include "llvm/IR/OptBisect.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>

Go to the source code of this file.

Functions

static OptBisectgetOptBisector ()
static OptDisablegetOptDisabler ()
static void printPassMessage (StringRef Name, int PassNum, StringRef TargetDesc, bool Running)
static void printDisablePassMessage (const StringRef &Name, StringRef TargetDesc, bool Running)

Variables

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"))
static cl::opt< boolOptBisectVerbose ("opt-bisect-verbose", cl::desc("Show verbose output when opt-bisect-limit is set"), cl::Hidden, cl::init(true), cl::Optional)
static cl::list< std::stringOptDisablePasses ("opt-disable", cl::Hidden, cl::CommaSeparated, cl::Optional, cl::cb< void, std::string >([](const std::string &Pass) { getOptDisabler().setDisabled(Pass);}), cl::desc("Optimization pass(es) to disable (comma-separated list)"))
static cl::opt< boolOptDisableVerbose ("opt-disable-enable-verbosity", cl::desc("Show verbose output when opt-disable is set"), cl::Hidden, cl::init(false), cl::Optional)

Detailed Description

This file implements support for a bisecting optimizations based on a command line option.

Definition in file OptBisect.cpp.

Function Documentation

◆ getOptBisector()

OptBisect & getOptBisector ( )
static

Definition at line 23 of file OptBisect.cpp.

Referenced by llvm::getGlobalPassGate().

◆ getOptDisabler()

OptDisable & getOptDisabler ( )
static

Definition at line 28 of file OptBisect.cpp.

Referenced by llvm::getGlobalPassGate().

◆ printDisablePassMessage()

void printDisablePassMessage ( const StringRef & Name,
StringRef TargetDesc,
bool Running )
static

Definition at line 75 of file OptBisect.cpp.

References llvm::dbgs().

Referenced by llvm::OptDisable::shouldRunPass().

◆ printPassMessage()

void printPassMessage ( StringRef Name,
int PassNum,
StringRef TargetDesc,
bool Running )
static

Definition at line 57 of file OptBisect.cpp.

References llvm::errs().

Referenced by llvm::OptBisect::shouldRunPass().

Variable Documentation

◆ OptBisectLimit

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")) ( "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")  )
static

◆ OptBisectVerbose

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) ( "opt-bisect-verbose" ,
cl::desc("Show verbose output when opt-bisect-limit is set") ,
cl::Hidden ,
cl::init(true) ,
cl::Optional  )
static

◆ OptDisablePasses

cl::list< std::string > OptDisablePasses("opt-disable", cl::Hidden, cl::CommaSeparated, cl::Optional, cl::cb< void, std::string >([](const std::string &Pass) { getOptDisabler().setDisabled(Pass); }), cl::desc("Optimization pass(es) to disable (comma-separated list)")) ( "opt-disable" ,
cl::Hidden ,
cl::CommaSeparated ,
cl::Optional ,
cl::cb< void, std::string > [](const std::string &Pass) { getOptDisabler().setDisabled(Pass); },
cl::desc("Optimization pass(es) to disable (comma-separated list)")  )
static

◆ OptDisableVerbose

cl::opt< bool > OptDisableVerbose("opt-disable-enable-verbosity", cl::desc("Show verbose output when opt-disable is set"), cl::Hidden, cl::init(false), cl::Optional) ( "opt-disable-enable-verbosity" ,
cl::desc("Show verbose output when opt-disable is set") ,
cl::Hidden ,
cl::init(false) ,
cl::Optional  )
static