LLVM 20.0.0git
Classes | Namespaces | Macros | Functions | Variables
TargetPassConfig.cpp File Reference
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/BasicAliasAnalysis.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/Analysis/ScopedNoAliasAA.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
#include "llvm/CodeGen/BasicBlockSectionsProfileReader.h"
#include "llvm/CodeGen/CSEConfigBase.h"
#include "llvm/CodeGen/CodeGenTargetMachineImpl.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachinePassRegistry.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/RegAllocRegistry.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/PassInstrumentation.h"
#include "llvm/IR/Verifier.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/Pass.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Discriminator.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Target/CGPassBuilderOption.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/ObjCARC.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils.h"
#include <cassert>
#include <optional>
#include <string>

Go to the source code of this file.

Classes

struct  INITIALIZE_PASS::InsertedPass
 
class  llvm::PassConfigImpl
 

Namespaces

namespace  INITIALIZE_PASS
 TargetPassConfig.
 
namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define SET_OPTION(Option)
 
#define SET_BOOLEAN_OPTION(Option)   Opt.Option = Option;
 
#define DISABLE_PASS(Option, Name)
 

Functions

static IdentifyingPassPtr applyDisable (IdentifyingPassPtr PassID, bool Override)
 Allow standard passes to be disabled by command line options.
 
static IdentifyingPassPtr overridePass (AnalysisID StandardID, IdentifyingPassPtr TargetID)
 Allow standard passes to be disabled by the command line, regardless of who is adding the pass.
 
static std::string getFSProfileFile (const TargetMachine *TM)
 
static std::string getFSRemappingFile (const TargetMachine *TM)
 
static const PassInfogetPassInfo (StringRef PassName)
 
static AnalysisID getPassIDFromName (StringRef PassName)
 
static std::pair< StringRef, unsignedgetPassNameAndInstanceNum (StringRef PassName)
 
static FunctionPassuseDefaultRegisterAllocator ()
 -regalloc=... command line option.
 
static void initializeDefaultRegisterAllocatorOnce ()
 

Variables

static cl::opt< boolEnableIPRA ("enable-ipra", cl::init(false), cl::Hidden, cl::desc("Enable interprocedural register allocation " "to reduce load/store at procedure calls."))
 
static cl::opt< boolDisablePostRASched ("disable-post-ra", cl::Hidden, cl::desc("Disable Post Regalloc Scheduler"))
 
static cl::opt< boolDisableBranchFold ("disable-branch-fold", cl::Hidden, cl::desc("Disable branch folding"))
 
static cl::opt< boolDisableTailDuplicate ("disable-tail-duplicate", cl::Hidden, cl::desc("Disable tail duplication"))
 
static cl::opt< boolDisableEarlyTailDup ("disable-early-taildup", cl::Hidden, cl::desc("Disable pre-register allocation tail duplication"))
 
static cl::opt< boolDisableBlockPlacement ("disable-block-placement", cl::Hidden, cl::desc("Disable probability-driven block placement"))
 
static cl::opt< boolEnableBlockPlacementStats ("enable-block-placement-stats", cl::Hidden, cl::desc("Collect probability-driven block placement stats"))
 
static cl::opt< boolDisableSSC ("disable-ssc", cl::Hidden, cl::desc("Disable Stack Slot Coloring"))
 
static cl::opt< boolDisableMachineDCE ("disable-machine-dce", cl::Hidden, cl::desc("Disable Machine Dead Code Elimination"))
 
static cl::opt< boolDisableEarlyIfConversion ("disable-early-ifcvt", cl::Hidden, cl::desc("Disable Early If-conversion"))
 
static cl::opt< boolDisableMachineLICM ("disable-machine-licm", cl::Hidden, cl::desc("Disable Machine LICM"))
 
static cl::opt< boolDisableMachineCSE ("disable-machine-cse", cl::Hidden, cl::desc("Disable Machine Common Subexpression Elimination"))
 
static cl::opt< cl::boolOrDefaultOptimizeRegAlloc ("optimize-regalloc", cl::Hidden, cl::desc("Enable optimized register allocation compilation path."))
 
static cl::opt< boolDisablePostRAMachineLICM ("disable-postra-machine-licm", cl::Hidden, cl::desc("Disable Machine LICM"))
 
static cl::opt< boolDisableMachineSink ("disable-machine-sink", cl::Hidden, cl::desc("Disable Machine Sinking"))
 
static cl::opt< boolDisablePostRAMachineSink ("disable-postra-machine-sink", cl::Hidden, cl::desc("Disable PostRA Machine Sinking"))
 
static cl::opt< boolDisableLSR ("disable-lsr", cl::Hidden, cl::desc("Disable Loop Strength Reduction Pass"))
 
static cl::opt< boolDisableConstantHoisting ("disable-constant-hoisting", cl::Hidden, cl::desc("Disable ConstantHoisting"))
 
static cl::opt< boolDisableCGP ("disable-cgp", cl::Hidden, cl::desc("Disable Codegen Prepare"))
 
static cl::opt< boolDisableCopyProp ("disable-copyprop", cl::Hidden, cl::desc("Disable Copy Propagation pass"))
 
static cl::opt< boolDisablePartialLibcallInlining ("disable-partial-libcall-inlining", cl::Hidden, cl::desc("Disable Partial Libcall Inlining"))
 
static cl::opt< boolDisableAtExitBasedGlobalDtorLowering ("disable-atexit-based-global-dtor-lowering", cl::Hidden, cl::desc("For MachO, disable atexit()-based global destructor lowering"))
 
static cl::opt< boolEnableImplicitNullChecks ("enable-implicit-null-checks", cl::desc("Fold null checks into faulting memory operations"), cl::init(false), cl::Hidden)
 
static cl::opt< boolDisableMergeICmps ("disable-mergeicmps", cl::desc("Disable MergeICmps Pass"), cl::init(false), cl::Hidden)
 
static cl::opt< boolPrintLSR ("print-lsr-output", cl::Hidden, cl::desc("Print LLVM IR produced by the loop-reduce pass"))
 
static cl::opt< boolPrintISelInput ("print-isel-input", cl::Hidden, cl::desc("Print LLVM IR input to isel pass"))
 
static cl::opt< cl::boolOrDefaultVerifyMachineCode ("verify-machineinstrs", cl::Hidden, cl::desc("Verify generated machine code"))
 
static cl::opt< cl::boolOrDefaultDebugifyAndStripAll ("debugify-and-strip-all-safe", cl::Hidden, cl::desc("Debugify MIR before and Strip debug after " "each pass except those known to be unsafe " "when debug info is present"))
 
static cl::opt< cl::boolOrDefaultDebugifyCheckAndStripAll ("debugify-check-and-strip-all-safe", cl::Hidden, cl::desc("Debugify MIR before, by checking and stripping the debug info after, " "each pass except those known to be unsafe when debug info is " "present"))
 
static cl::opt< RunOutlinerEnableMachineOutliner ("enable-machine-outliner", cl::desc("Enable the machine outliner"), cl::Hidden, cl::ValueOptional, cl::init(RunOutliner::TargetDefault), cl::values(clEnumValN(RunOutliner::AlwaysOutline, "always", "Run on all functions guaranteed to be beneficial"), clEnumValN(RunOutliner::NeverOutline, "never", "Disable all outlining"), clEnumValN(RunOutliner::AlwaysOutline, "", "")))
 
static cl::opt< boolEnableGlobalMergeFunc ("enable-global-merge-func", cl::Hidden, cl::desc("Enable global merge functions that are based on hash function"))
 
static cl::opt< boolDisableCFIFixup ("disable-cfi-fixup", cl::Hidden, cl::desc("Disable the CFI fixup pass"))
 
static cl::opt< cl::boolOrDefaultEnableFastISelOption ("fast-isel", cl::Hidden, cl::desc("Enable the \"fast\" instruction selector"))
 
static cl::opt< cl::boolOrDefaultEnableGlobalISelOption ("global-isel", cl::Hidden, cl::desc("Enable the \"global\" instruction selector"))
 
static cl::opt< boolPrintAfterISel ("print-after-isel", cl::init(false), cl::Hidden, cl::desc("Print machine instrs after ISel"))
 
static cl::opt< GlobalISelAbortModeEnableGlobalISelAbort ("global-isel-abort", cl::Hidden, cl::desc("Enable abort calls when \"global\" instruction selection " "fails to lower/select an instruction"), cl::values(clEnumValN(GlobalISelAbortMode::Disable, "0", "Disable the abort"), clEnumValN(GlobalISelAbortMode::Enable, "1", "Enable the abort"), clEnumValN(GlobalISelAbortMode::DisableWithDiag, "2", "Disable the abort but emit a diagnostic on failure")))
 
static cl::opt< boolDisableRAFSProfileLoader ("disable-ra-fsprofile-loader", cl::init(false), cl::Hidden, cl::desc("Disable MIRProfileLoader before RegAlloc"))
 
static cl::opt< boolDisableLayoutFSProfileLoader ("disable-layout-fsprofile-loader", cl::init(false), cl::Hidden, cl::desc("Disable MIRProfileLoader before BlockPlacement"))
 
static cl::opt< std::string > FSProfileFile ("fs-profile-file", cl::init(""), cl::value_desc("filename"), cl::desc("Flow Sensitive profile file name."), cl::Hidden)
 
static cl::opt< std::string > FSRemappingFile ("fs-remapping-file", cl::init(""), cl::value_desc("filename"), cl::desc("Flow Sensitive profile remapping file name."), cl::Hidden)
 
static cl::opt< boolMISchedPostRA ("misched-postra", cl::Hidden, cl::desc("Run MachineScheduler post regalloc (independent of preRA sched)"))
 
static cl::opt< boolEarlyLiveIntervals ("early-live-intervals", cl::Hidden, cl::desc("Run live interval analysis earlier in the pipeline"))
 
static cl::opt< boolDisableReplaceWithVecLib ("disable-replace-with-vec-lib", cl::Hidden, cl::desc("Disable replace with vector math call pass"))
 
static const char StartAfterOptName [] = "start-after"
 Option names for limiting the codegen pipeline.
 
static const char StartBeforeOptName [] = "start-before"
 
static const char StopAfterOptName [] = "stop-after"
 
static const char StopBeforeOptName [] = "stop-before"
 
static cl::opt< std::string > StartAfterOpt (StringRef(StartAfterOptName), cl::desc("Resume compilation after a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden)
 
static cl::opt< std::string > StartBeforeOpt (StringRef(StartBeforeOptName), cl::desc("Resume compilation before a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden)
 
static cl::opt< std::string > StopAfterOpt (StringRef(StopAfterOptName), cl::desc("Stop compilation after a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden)
 
static cl::opt< std::string > StopBeforeOpt (StringRef(StopBeforeOptName), cl::desc("Stop compilation before a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden)
 
static cl::opt< boolEnableMachineFunctionSplitter ("enable-split-machine-functions", cl::Hidden, cl::desc("Split out cold blocks from machine functions based on profile " "information."))
 Enable the machine function splitter pass.
 
static cl::opt< boolDisableExpandReductions ("disable-expand-reductions", cl::init(false), cl::Hidden, cl::desc("Disable the expand reduction intrinsics pass from running"))
 Disable the expand reductions pass for testing.
 
static cl::opt< boolDisableSelectOptimize ("disable-select-optimize", cl::init(true), cl::Hidden, cl::desc("Disable the select-optimization pass from running"))
 Disable the select optimization pass.
 
static cl::opt< boolGCEmptyBlocks ("gc-empty-basic-blocks", cl::init(false), cl::Hidden, cl::desc("Enable garbage-collecting empty basic blocks"))
 Enable garbage-collecting empty basic blocks.
 
static cl::opt< RegisterRegAlloc::FunctionPassCtor, false, RegisterPassParser< RegisterRegAlloc > > RegAlloc ("regalloc", cl::Hidden, cl::init(&useDefaultRegisterAllocator), cl::desc("Register allocator to use"))
 
static llvm::once_flag InitializeDefaultRegisterAllocatorFlag
 A dummy default pass factory indicates whether the register allocator is overridden on the command line.
 
static RegisterRegAlloc defaultRegAlloc ("default", "pick register allocator based on -O option", useDefaultRegisterAllocator)
 

Macro Definition Documentation

◆ DISABLE_PASS

#define DISABLE_PASS (   Option,
  Name 
)
Value:
if (Option && P.contains(#Name)) \
return false;
std::string Name
#define P(N)

◆ SET_BOOLEAN_OPTION

#define SET_BOOLEAN_OPTION (   Option)    Opt.Option = Option;

◆ SET_OPTION

#define SET_OPTION (   Option)
Value:
if (Option.getNumOccurrences()) \
Opt.Option = Option;

Function Documentation

◆ applyDisable()

static IdentifyingPassPtr applyDisable ( IdentifyingPassPtr  PassID,
bool  Override 
)
static

Allow standard passes to be disabled by command line options.

This supports simple binary flags that either suppress the pass or do nothing. i.e. -disable-mypass=false has no effect. These should be converted to boolOrDefault in order to use applyOverride.

Definition at line 270 of file TargetPassConfig.cpp.

Referenced by overridePass().

◆ getFSProfileFile()

static std::string getFSProfileFile ( const TargetMachine TM)
static

◆ getFSRemappingFile()

static std::string getFSRemappingFile ( const TargetMachine TM)
static

◆ getPassIDFromName()

static AnalysisID getPassIDFromName ( StringRef  PassName)
static

Definition at line 426 of file TargetPassConfig.cpp.

References getPassInfo(), llvm::PassInfo::getTypeInfo(), and PassName.

◆ getPassInfo()

static const PassInfo * getPassInfo ( StringRef  PassName)
static

◆ getPassNameAndInstanceNum()

static std::pair< StringRef, unsigned > getPassNameAndInstanceNum ( StringRef  PassName)
static

◆ initializeDefaultRegisterAllocatorOnce()

static void initializeDefaultRegisterAllocatorOnce ( )
static

◆ overridePass()

static IdentifyingPassPtr overridePass ( AnalysisID  StandardID,
IdentifyingPassPtr  TargetID 
)
static

Allow standard passes to be disabled by the command line, regardless of who is adding the pass.

StandardID is the pass identified in the standard pass pipeline and provided to addPass(). It may be a target-specific ID in the case that the target directly adds its own pass, but in that case we harmlessly fall through.

TargetID is the pass that the target has configured to override StandardID.

StandardID may be a pseudo ID. In that case TargetID is the name of the real pass to run. This allows multiple options to control a single pass depending on where in the pipeline that pass is added.

Definition at line 289 of file TargetPassConfig.cpp.

References applyDisable(), llvm::BranchFolderPassID, llvm::DeadMachineInstructionElimID, DisableBlockPlacement, DisableBranchFold, DisableCopyProp, DisableEarlyIfConversion, DisableEarlyTailDup, DisableMachineCSE, DisableMachineDCE, DisableMachineLICM, DisableMachineSink, DisablePostRAMachineLICM, DisablePostRAMachineSink, DisablePostRASched, DisableSSC, DisableTailDuplicate, llvm::EarlyIfConverterLegacyID, llvm::EarlyMachineLICMID, llvm::EarlyTailDuplicateLegacyID, llvm::MachineBlockPlacementID, llvm::MachineCopyPropagationID, llvm::MachineCSELegacyID, llvm::MachineLICMID, llvm::MachineSinkingID, llvm::PostRAMachineSinkingID, llvm::PostRASchedulerID, llvm::StackSlotColoringID, and llvm::TailDuplicateLegacyID.

Referenced by llvm::TargetPassConfig::addPass(), and llvm::TargetPassConfig::isPassSubstitutedOrOverridden().

◆ useDefaultRegisterAllocator()

static FunctionPass * useDefaultRegisterAllocator ( )
static

Variable Documentation

◆ DebugifyAndStripAll

cl::opt< cl::boolOrDefault > DebugifyAndStripAll("debugify-and-strip-all-safe", cl::Hidden, cl::desc("Debugify MIR before and Strip debug after " "each pass except those known to be unsafe " "when debug info is present")) ( "debugify-and-strip-all-safe"  ,
cl::Hidden  ,
cl::desc("Debugify MIR before and Strip debug after " "each pass except those known to be unsafe " "when debug info is present")   
)
static

◆ DebugifyCheckAndStripAll

cl::opt< cl::boolOrDefault > DebugifyCheckAndStripAll("debugify-check-and-strip-all-safe", cl::Hidden, cl::desc( "Debugify MIR before, by checking and stripping the debug info after, " "each pass except those known to be unsafe when debug info is " "present")) ( "debugify-check-and-strip-all-safe"  ,
cl::Hidden  ,
cl::desc( "Debugify MIR before, by checking and stripping the debug info after, " "each pass except those known to be unsafe when debug info is " "present")   
)
static

◆ defaultRegAlloc

RegisterRegAlloc defaultRegAlloc("default", "pick register allocator based on -O option", useDefaultRegisterAllocator) ( "default"  ,
"pick register allocator based on -O option"  ,
useDefaultRegisterAllocator   
)
static

◆ DisableAtExitBasedGlobalDtorLowering

cl::opt< bool > DisableAtExitBasedGlobalDtorLowering("disable-atexit-based-global-dtor-lowering", cl::Hidden, cl::desc("For MachO, disable atexit()-based global destructor lowering")) ( "disable-atexit-based-global-dtor-lowering"  ,
cl::Hidden  ,
cl::desc("For MachO, disable atexit()-based global destructor lowering")   
)
static

◆ DisableBlockPlacement

cl::opt< bool > DisableBlockPlacement("disable-block-placement", cl::Hidden, cl::desc("Disable probability-driven block placement")) ( "disable-block-placement"  ,
cl::Hidden  ,
cl::desc("Disable probability-driven block placement")   
)
static

◆ DisableBranchFold

cl::opt< bool > DisableBranchFold("disable-branch-fold", cl::Hidden, cl::desc("Disable branch folding")) ( "disable-branch-fold"  ,
cl::Hidden  ,
cl::desc("Disable branch folding")   
)
static

◆ DisableCFIFixup

cl::opt< bool > DisableCFIFixup("disable-cfi-fixup", cl::Hidden, cl::desc("Disable the CFI fixup pass")) ( "disable-cfi-fixup"  ,
cl::Hidden  ,
cl::desc("Disable the CFI fixup pass")   
)
static

◆ DisableCGP

cl::opt< bool > DisableCGP("disable-cgp", cl::Hidden, cl::desc("Disable Codegen Prepare")) ( "disable-cgp"  ,
cl::Hidden  ,
cl::desc("Disable Codegen Prepare")   
)
static

◆ DisableConstantHoisting

cl::opt< bool > DisableConstantHoisting("disable-constant-hoisting", cl::Hidden, cl::desc("Disable ConstantHoisting")) ( "disable-constant-hoisting"  ,
cl::Hidden  ,
cl::desc("Disable ConstantHoisting")   
)
static

◆ DisableCopyProp

cl::opt< bool > DisableCopyProp("disable-copyprop", cl::Hidden, cl::desc("Disable Copy Propagation pass")) ( "disable-copyprop"  ,
cl::Hidden  ,
cl::desc("Disable Copy Propagation pass")   
)
static

◆ DisableEarlyIfConversion

cl::opt< bool > DisableEarlyIfConversion("disable-early-ifcvt", cl::Hidden, cl::desc("Disable Early If-conversion")) ( "disable-early-ifcvt"  ,
cl::Hidden  ,
cl::desc("Disable Early If-conversion")   
)
static

◆ DisableEarlyTailDup

cl::opt< bool > DisableEarlyTailDup("disable-early-taildup", cl::Hidden, cl::desc("Disable pre-register allocation tail duplication")) ( "disable-early-taildup"  ,
cl::Hidden  ,
cl::desc("Disable pre-register allocation tail duplication")   
)
static

◆ DisableExpandReductions

cl::opt< bool > DisableExpandReductions("disable-expand-reductions", cl::init(false), cl::Hidden, cl::desc("Disable the expand reduction intrinsics pass from running")) ( "disable-expand-reductions"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Disable the expand reduction intrinsics pass from running")   
)
static

Disable the expand reductions pass for testing.

Referenced by llvm::TargetPassConfig::addIRPasses(), and llvm::getCGPassBuilderOption().

◆ DisableLayoutFSProfileLoader

cl::opt< bool > DisableLayoutFSProfileLoader("disable-layout-fsprofile-loader", cl::init(false), cl::Hidden, cl::desc("Disable MIRProfileLoader before BlockPlacement")) ( "disable-layout-fsprofile-loader"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Disable MIRProfileLoader before BlockPlacement")   
)
static

◆ DisableLSR

cl::opt< bool > DisableLSR("disable-lsr", cl::Hidden, cl::desc("Disable Loop Strength Reduction Pass")) ( "disable-lsr"  ,
cl::Hidden  ,
cl::desc("Disable Loop Strength Reduction Pass")   
)
static

◆ DisableMachineCSE

cl::opt< bool > DisableMachineCSE("disable-machine-cse", cl::Hidden, cl::desc("Disable Machine Common Subexpression Elimination")) ( "disable-machine-cse"  ,
cl::Hidden  ,
cl::desc("Disable Machine Common Subexpression Elimination")   
)
static

◆ DisableMachineDCE

cl::opt< bool > DisableMachineDCE("disable-machine-dce", cl::Hidden, cl::desc("Disable Machine Dead Code Elimination")) ( "disable-machine-dce"  ,
cl::Hidden  ,
cl::desc("Disable Machine Dead Code Elimination")   
)
static

◆ DisableMachineLICM

cl::opt< bool > DisableMachineLICM("disable-machine-licm", cl::Hidden, cl::desc("Disable Machine LICM")) ( "disable-machine-licm"  ,
cl::Hidden  ,
cl::desc("Disable Machine LICM")   
)
static

◆ DisableMachineSink

cl::opt< bool > DisableMachineSink("disable-machine-sink", cl::Hidden, cl::desc("Disable Machine Sinking")) ( "disable-machine-sink"  ,
cl::Hidden  ,
cl::desc("Disable Machine Sinking")   
)
static

◆ DisableMergeICmps

cl::opt< bool > DisableMergeICmps("disable-mergeicmps", cl::desc("Disable MergeICmps Pass"), cl::init(false), cl::Hidden) ( "disable-mergeicmps"  ,
cl::desc("Disable MergeICmps Pass")  ,
cl::init(false)  ,
cl::Hidden   
)
static

◆ DisablePartialLibcallInlining

cl::opt< bool > DisablePartialLibcallInlining("disable-partial-libcall-inlining", cl::Hidden, cl::desc("Disable Partial Libcall Inlining")) ( "disable-partial-libcall-inlining"  ,
cl::Hidden  ,
cl::desc("Disable Partial Libcall Inlining")   
)
static

◆ DisablePostRAMachineLICM

cl::opt< bool > DisablePostRAMachineLICM("disable-postra-machine-licm", cl::Hidden, cl::desc("Disable Machine LICM")) ( "disable-postra-machine-licm"  ,
cl::Hidden  ,
cl::desc("Disable Machine LICM")   
)
static

◆ DisablePostRAMachineSink

cl::opt< bool > DisablePostRAMachineSink("disable-postra-machine-sink", cl::Hidden, cl::desc("Disable PostRA Machine Sinking")) ( "disable-postra-machine-sink"  ,
cl::Hidden  ,
cl::desc("Disable PostRA Machine Sinking")   
)
static

◆ DisablePostRASched

cl::opt< bool > DisablePostRASched("disable-post-ra", cl::Hidden, cl::desc("Disable Post Regalloc Scheduler")) ( "disable-post-ra"  ,
cl::Hidden  ,
cl::desc("Disable Post Regalloc Scheduler")   
)
static

◆ DisableRAFSProfileLoader

cl::opt< bool > DisableRAFSProfileLoader("disable-ra-fsprofile-loader", cl::init(false), cl::Hidden, cl::desc("Disable MIRProfileLoader before RegAlloc")) ( "disable-ra-fsprofile-loader"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Disable MIRProfileLoader before RegAlloc")   
)
static

◆ DisableReplaceWithVecLib

cl::opt< bool > DisableReplaceWithVecLib("disable-replace-with-vec-lib", cl::Hidden, cl::desc("Disable replace with vector math call pass")) ( "disable-replace-with-vec-lib"  ,
cl::Hidden  ,
cl::desc("Disable replace with vector math call pass")   
)
static

◆ DisableSelectOptimize

cl::opt< bool > DisableSelectOptimize("disable-select-optimize", cl::init(true), cl::Hidden, cl::desc("Disable the select-optimization pass from running")) ( "disable-select-optimize"  ,
cl::init(true ,
cl::Hidden  ,
cl::desc("Disable the select-optimization pass from running")   
)
static

Disable the select optimization pass.

Referenced by llvm::TargetPassConfig::addIRPasses(), and llvm::getCGPassBuilderOption().

◆ DisableSSC

cl::opt< bool > DisableSSC("disable-ssc", cl::Hidden, cl::desc("Disable Stack Slot Coloring")) ( "disable-ssc"  ,
cl::Hidden  ,
cl::desc("Disable Stack Slot Coloring")   
)
static

◆ DisableTailDuplicate

cl::opt< bool > DisableTailDuplicate("disable-tail-duplicate", cl::Hidden, cl::desc("Disable tail duplication")) ( "disable-tail-duplicate"  ,
cl::Hidden  ,
cl::desc("Disable tail duplication")   
)
static

◆ EarlyLiveIntervals

cl::opt< bool > EarlyLiveIntervals("early-live-intervals", cl::Hidden, cl::desc("Run live interval analysis earlier in the pipeline")) ( "early-live-intervals"  ,
cl::Hidden  ,
cl::desc("Run live interval analysis earlier in the pipeline")   
)
static

◆ EnableBlockPlacementStats

cl::opt< bool > EnableBlockPlacementStats("enable-block-placement-stats", cl::Hidden, cl::desc("Collect probability-driven block placement stats")) ( "enable-block-placement-stats"  ,
cl::Hidden  ,
cl::desc("Collect probability-driven block placement stats")   
)
static

◆ EnableFastISelOption

cl::opt< cl::boolOrDefault > EnableFastISelOption("fast-isel", cl::Hidden, cl::desc("Enable the \"fast\" instruction selector")) ( "fast-isel"  ,
cl::Hidden  ,
cl::desc("Enable the \"fast\" instruction selector")   
)
static

◆ EnableGlobalISelAbort

cl::opt< GlobalISelAbortMode > EnableGlobalISelAbort("global-isel-abort", cl::Hidden, cl::desc("Enable abort calls when \"global\" instruction selection " "fails to lower/select an instruction"), cl::values( clEnumValN(GlobalISelAbortMode::Disable, "0", "Disable the abort"), clEnumValN(GlobalISelAbortMode::Enable, "1", "Enable the abort"), clEnumValN(GlobalISelAbortMode::DisableWithDiag, "2", "Disable the abort but emit a diagnostic on failure"))) ( "global-isel-abort"  ,
cl::Hidden  ,
cl::desc("Enable abort calls when \"global\" instruction selection " "fails to lower/select an instruction")  ,
cl::values( clEnumValN(GlobalISelAbortMode::Disable, "0", "Disable the abort"), clEnumValN(GlobalISelAbortMode::Enable, "1", "Enable the abort"), clEnumValN(GlobalISelAbortMode::DisableWithDiag, "2", "Disable the abort but emit a diagnostic on failure"))   
)
static

◆ EnableGlobalISelOption

cl::opt< cl::boolOrDefault > EnableGlobalISelOption("global-isel", cl::Hidden, cl::desc("Enable the \"global\" instruction selector")) ( "global-isel"  ,
cl::Hidden  ,
cl::desc("Enable the \"global\" instruction selector")   
)
static

◆ EnableGlobalMergeFunc

cl::opt< bool > EnableGlobalMergeFunc("enable-global-merge-func", cl::Hidden, cl::desc("Enable global merge functions that are based on hash function")) ( "enable-global-merge-func"  ,
cl::Hidden  ,
cl::desc("Enable global merge functions that are based on hash function")   
)
static

◆ EnableImplicitNullChecks

cl::opt< bool > EnableImplicitNullChecks("enable-implicit-null-checks", cl::desc("Fold null checks into faulting memory operations"), cl::init(false), cl::Hidden) ( "enable-implicit-null-checks"  ,
cl::desc("Fold null checks into faulting memory operations")  ,
cl::init(false)  ,
cl::Hidden   
)
static

◆ EnableIPRA

cl::opt< bool > EnableIPRA("enable-ipra", cl::init(false), cl::Hidden, cl::desc("Enable interprocedural register allocation " "to reduce load/store at procedure calls.")) ( "enable-ipra"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Enable interprocedural register allocation " "to reduce load/store at procedure calls.")   
)
static

◆ EnableMachineFunctionSplitter

cl::opt< bool > EnableMachineFunctionSplitter("enable-split-machine-functions", cl::Hidden, cl::desc("Split out cold blocks from machine functions based on profile " "information.")) ( "enable-split-machine-functions"  ,
cl::Hidden  ,
cl::desc("Split out cold blocks from machine functions based on profile " "information.")   
)
static

◆ EnableMachineOutliner

cl::opt< RunOutliner > EnableMachineOutliner("enable-machine-outliner", cl::desc("Enable the machine outliner"), cl::Hidden, cl::ValueOptional, cl::init(RunOutliner::TargetDefault), cl::values(clEnumValN(RunOutliner::AlwaysOutline, "always", "Run on all functions guaranteed to be beneficial"), clEnumValN(RunOutliner::NeverOutline, "never", "Disable all outlining"), clEnumValN(RunOutliner::AlwaysOutline, "", ""))) ( "enable-machine-outliner"  ,
cl::desc("Enable the machine outliner")  ,
cl::Hidden  ,
cl::ValueOptional  ,
cl::init(RunOutliner::TargetDefault)  ,
cl::values(clEnumValN(RunOutliner::AlwaysOutline, "always", "Run on all functions guaranteed to be beneficial"), clEnumValN(RunOutliner::NeverOutline, "never", "Disable all outlining"), clEnumValN(RunOutliner::AlwaysOutline, "", ""))   
)
static

◆ FSProfileFile

cl::opt< std::string > FSProfileFile("fs-profile-file", cl::init(""), cl::value_desc("filename"), cl::desc("Flow Sensitive profile file name."), cl::Hidden) ( "fs-profile-file"  ,
cl::init("")  ,
cl::value_desc("filename")  ,
cl::desc("Flow Sensitive profile file name.")  ,
cl::Hidden   
)
static

◆ FSRemappingFile

cl::opt< std::string > FSRemappingFile("fs-remapping-file", cl::init(""), cl::value_desc("filename"), cl::desc("Flow Sensitive profile remapping file name."), cl::Hidden) ( "fs-remapping-file"  ,
cl::init("")  ,
cl::value_desc("filename")  ,
cl::desc("Flow Sensitive profile remapping file name.")  ,
cl::Hidden   
)
static

Referenced by getFSRemappingFile().

◆ GCEmptyBlocks

cl::opt< bool > GCEmptyBlocks("gc-empty-basic-blocks", cl::init(false), cl::Hidden, cl::desc("Enable garbage-collecting empty basic blocks")) ( "gc-empty-basic-blocks"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Enable garbage-collecting empty basic blocks")   
)
static

Enable garbage-collecting empty basic blocks.

Referenced by llvm::TargetPassConfig::addMachinePasses(), and llvm::getCGPassBuilderOption().

◆ InitializeDefaultRegisterAllocatorFlag

llvm::once_flag InitializeDefaultRegisterAllocatorFlag
static

A dummy default pass factory indicates whether the register allocator is overridden on the command line.

Definition at line 1341 of file TargetPassConfig.cpp.

Referenced by llvm::TargetPassConfig::createRegAllocPass().

◆ MISchedPostRA

cl::opt< bool > MISchedPostRA("misched-postra", cl::Hidden, cl::desc( "Run MachineScheduler post regalloc (independent of preRA sched)")) ( "misched-postra"  ,
cl::Hidden  ,
cl::desc( "Run MachineScheduler post regalloc (independent of preRA sched)")   
)
static

◆ OptimizeRegAlloc

cl::opt< cl::boolOrDefault > OptimizeRegAlloc("optimize-regalloc", cl::Hidden, cl::desc("Enable optimized register allocation compilation path.")) ( "optimize-regalloc"  ,
cl::Hidden  ,
cl::desc("Enable optimized register allocation compilation path.")   
)
static

◆ PrintAfterISel

cl::opt< bool > PrintAfterISel("print-after-isel", cl::init(false), cl::Hidden, cl::desc("Print machine instrs after ISel")) ( "print-after-isel"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Print machine instrs after ISel")   
)
static

◆ PrintISelInput

cl::opt< bool > PrintISelInput("print-isel-input", cl::Hidden, cl::desc("Print LLVM IR input to isel pass")) ( "print-isel-input"  ,
cl::Hidden  ,
cl::desc("Print LLVM IR input to isel pass")   
)
static

◆ PrintLSR

cl::opt< bool > PrintLSR("print-lsr-output", cl::Hidden, cl::desc("Print LLVM IR produced by the loop-reduce pass")) ( "print-lsr-output"  ,
cl::Hidden  ,
cl::desc("Print LLVM IR produced by the loop-reduce pass")   
)
static

◆ RegAlloc

cl::opt< RegisterRegAlloc::FunctionPassCtor, false, RegisterPassParser< RegisterRegAlloc > > RegAlloc("regalloc", cl::Hidden, cl::init(&useDefaultRegisterAllocator), cl::desc("Register allocator to use")) ( "regalloc"  ,
cl::Hidden  ,
cl::init &  useDefaultRegisterAllocator,
cl::desc("Register allocator to use")   
)
static

◆ StartAfterOpt

cl::opt< std::string > StartAfterOpt(StringRef(StartAfterOptName), cl::desc("Resume compilation after a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden) ( StringRef(StartAfterOptName ,
cl::desc("Resume compilation after a specific pass")  ,
cl::value_desc("pass-name")  ,
cl::init("")  ,
cl::Hidden   
)
static

◆ StartAfterOptName

const char StartAfterOptName[] = "start-after"
static

Option names for limiting the codegen pipeline.

Those are used in error reporting and we didn't want to duplicate their names all over the place.

Definition at line 220 of file TargetPassConfig.cpp.

Referenced by llvm::TargetPassConfig::getLimitedCodeGenPipelineReason(), and llvm::TargetPassConfig::getStartStopInfo().

◆ StartBeforeOpt

cl::opt< std::string > StartBeforeOpt(StringRef(StartBeforeOptName), cl::desc("Resume compilation before a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden) ( StringRef(StartBeforeOptName ,
cl::desc("Resume compilation before a specific pass")  ,
cl::value_desc("pass-name")  ,
cl::init("")  ,
cl::Hidden   
)
static

◆ StartBeforeOptName

const char StartBeforeOptName[] = "start-before"
static

◆ StopAfterOpt

cl::opt< std::string > StopAfterOpt(StringRef(StopAfterOptName), cl::desc("Stop compilation after a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden) ( StringRef(StopAfterOptName ,
cl::desc("Stop compilation after a specific pass")  ,
cl::value_desc("pass-name")  ,
cl::init("")  ,
cl::Hidden   
)
static

◆ StopAfterOptName

const char StopAfterOptName[] = "stop-after"
static

◆ StopBeforeOpt

cl::opt< std::string > StopBeforeOpt(StringRef(StopBeforeOptName), cl::desc("Stop compilation before a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden) ( StringRef(StopBeforeOptName ,
cl::desc("Stop compilation before a specific pass")  ,
cl::value_desc("pass-name")  ,
cl::init("")  ,
cl::Hidden   
)
static

◆ StopBeforeOptName

const char StopBeforeOptName[] = "stop-before"
static

◆ VerifyMachineCode

cl::opt< cl::boolOrDefault > VerifyMachineCode("verify-machineinstrs", cl::Hidden, cl::desc("Verify generated machine code")) ( "verify-machineinstrs"  ,
cl::Hidden  ,
cl::desc("Verify generated machine code")   
)
static