|
LLVM 22.0.0git
|
This file implements support for a bisecting optimizations based on a command line option. More...
#include "llvm/IR/OptBisect.h"#include "llvm/ADT/StringExtras.h"#include "llvm/Pass.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/IntegerInclusiveInterval.h"#include "llvm/Support/raw_ostream.h"#include <cassert>#include <cstdlib>Go to the source code of this file.
Functions | |
| static OptBisect & | getOptBisector () |
| static OptDisable & | getOptDisabler () |
| 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(-1), cl::Optional, cl::cb< void, int >([](int Limit) { if(Limit==-1) getOptBisector().setIntervals({{1, std::numeric_limits< int >::max()}});else if(Limit==0) getOptBisector().setIntervals({{0, 0}});else if(Limit > 0) getOptBisector().setIntervals({{1, Limit}});else llvm_unreachable(("Invalid limit for -opt-bisect-limit: "+llvm::utostr(Limit)) .c_str());}), cl::desc("Maximum optimization to perform (equivalent to -opt-bisect=1-N)")) |
| static cl::opt< std::string > | OptBisectIntervals ("opt-bisect", cl::Hidden, cl::Optional, cl::cb< void, const std::string & >([](const std::string &IntervalStr) { if(IntervalStr=="-1") { getOptBisector().setIntervals({{1, std::numeric_limits< int >::max()}});return;} auto Intervals=IntegerInclusiveIntervalUtils::parseIntervals(IntervalStr);if(!Intervals) { handleAllErrors(Intervals.takeError(), [&](const StringError &E) { errs()<< "Error: Invalid interval specification for -opt-bisect: "<< IntervalStr<< " ("<< E.getMessage()<< ")\n";});exit(1);} getOptBisector().setIntervals(std::move(*Intervals));}), cl::desc("Run optimization passes only for the specified intervals. " "Format: '1-10,20-30,45' runs passes 1-10, 20-30, and 45, where " "index 1 is the first pass. Supply '0' to run no passes and -1 to " "run all passes.")) |
| static 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) |
| static 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)")) |
| static 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) |
This file implements support for a bisecting optimizations based on a command line option.
Definition in file OptBisect.cpp.
|
static |
Definition at line 26 of file OptBisect.cpp.
Referenced by llvm::getGlobalPassGate().
|
static |
Definition at line 31 of file OptBisect.cpp.
Referenced by llvm::getGlobalPassGate().
Definition at line 120 of file OptBisect.cpp.
References llvm::dbgs().
Referenced by llvm::OptDisable::shouldRunPass().
Definition at line 98 of file OptBisect.cpp.
References llvm::errs().
Referenced by llvm::OptBisect::shouldRunPass().
|
static |
|
static |
|
static |
Referenced by llvm::OptBisect::shouldRunPass().
|
static |
|
static |
Referenced by llvm::OptDisable::shouldRunPass().