|
LLVM 24.0.0git
|
#include "llvm/CodeGen/TargetPassConfig.h"#include "CodeGenOptions.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/MachineBlockHashInfo.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 | DISABLE_PASS(Option, Name) |
Variables | |
| static 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::OptimisticPGO, "optimistic-pgo", "Outline cold code only. If a code block does not have " "profile data, optimistically assume it is cold."), clEnumValN(RunOutliner::ConservativePGO, "conservative-pgo", "Outline cold code only. If a code block does not have " "profile, data, conservatively assume it is hot."), clEnumValN(RunOutliner::NeverOutline, "never", "Disable all outlining"), clEnumValN(RunOutliner::AlwaysOutline, "", ""))) |
| 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< RegisterRegAlloc::FunctionPassCtor, false, RegisterPassParser< RegisterRegAlloc > > | RegAlloc ("regalloc", cl::Hidden, cl::init(&useDefaultRegisterAllocator), cl::desc("Register allocator to use")) |
| static llvm::once_flag | InitializeDefaultRegisterAllocatorFlag |
| Register Allocation Pass Configuration. | |
| static RegisterRegAlloc | defaultRegAlloc ("default", "pick register allocator based on -O option", useDefaultRegisterAllocator) |
| #define DISABLE_PASS | ( | Option, | |
| Name ) |
Referenced by llvm::registerCodeGenCallback().
|
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 110 of file TargetPassConfig.cpp.
Referenced by overridePass().
|
static |
Definition at line 322 of file TargetPassConfig.cpp.
References llvm::Each, llvm::End, llvm::None, and VerifyEach.
Referenced by llvm::getCGPassBuilderOption(), and llvm::TargetPassConfig::TargetPassConfig().
|
static |
Definition at line 517 of file TargetPassConfig.cpp.
References StartAfterOptName, StartBeforeOptName, StopAfterOptName, and StopBeforeOptName.
Referenced by llvm::TargetPassConfig::getLimitedCodeGenPipelineReason(), and llvm::TargetPassConfig::StartStopInfo::getLimitReason().
|
static |
Definition at line 179 of file TargetPassConfig.cpp.
References llvm::TargetMachine::getPGOOption(), and llvm::PGOOptions::SampleUse.
Referenced by llvm::TargetPassConfig::addBlockPlacement(), and llvm::TargetPassConfig::addMachinePasses().
|
static |
Definition at line 191 of file TargetPassConfig.cpp.
References llvm::TargetMachine::getPGOOption(), and llvm::PGOOptions::SampleUse.
Referenced by llvm::TargetPassConfig::addBlockPlacement(), and llvm::TargetPassConfig::addMachinePasses().
|
static |
Definition at line 61 of file TargetPassConfig.cpp.
References llvm::cl::LibraryOptionsContext::get(), llvm::MCTargetOptions::LibraryOptions, llvm::TargetOptions::MCOptions, and llvm::TargetMachine::Options.
Referenced by llvm::getCGPassBuilderOption(), llvm::TargetPassConfig::getStartStopInfo(), llvm::LoopVectorizationCostModel::LoopVectorizationCostModel(), llvm::LoopVectorizationPlanner::LoopVectorizationPlanner(), llvm::registerCodeGenCallback(), llvm::TargetPassConfig::TargetPassConfig(), and llvm::VPCostContext::VPCostContext().
|
static |
Definition at line 267 of file TargetPassConfig.cpp.
References getPassInfo(), llvm::PassInfo::getTypeInfo(), and PassName.
Definition at line 255 of file TargetPassConfig.cpp.
References llvm::PassRegistry::getPassInfo(), llvm::PassRegistry::getPassRegistry(), PassName, and llvm::reportFatalUsageError().
Referenced by llvm::PMTopLevelManager::findAnalysisPassInfo(), and getPassIDFromName().
Definition at line 273 of file TargetPassConfig.cpp.
References llvm::StringRef::empty(), llvm::StringRef::getAsInteger(), PassName, and llvm::reportFatalUsageError().
Referenced by llvm::TargetPassConfig::getStartStopInfo().
|
static |
Definition at line 1224 of file TargetPassConfig.cpp.
References llvm::RegisterRegAllocBase< RegisterRegAlloc >::getDefault(), RegAlloc, and llvm::RegisterRegAllocBase< RegisterRegAlloc >::setDefault().
Referenced by llvm::TargetPassConfig::getOptimizeRegAlloc().
|
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 129 of file TargetPassConfig.cpp.
References applyDisable(), llvm::BranchFolderPassID, llvm::DeadMachineInstructionElimID, llvm::EarlyIfConverterLegacyID, llvm::EarlyMachineLICMID, llvm::EarlyTailDuplicateLegacyID, llvm::MachineBlockPlacementID, llvm::MachineCopyPropagationID, llvm::MachineCSELegacyID, llvm::MachineLICMID, llvm::MachineSinkingLegacyID, llvm::PostRAMachineSinkingID, llvm::PostRASchedulerID, llvm::StackSlotColoringID, and llvm::TailDuplicateLegacyID.
Referenced by llvm::TargetPassConfig::addPass(), and llvm::TargetPassConfig::isPassSubstitutedOrOverridden().
|
static |
Definition at line 314 of file TargetPassConfig.cpp.
References B(), llvm::cl::BOU_FALSE, llvm::cl::BOU_TRUE, llvm::cl::BOU_UNSET, llvm::Default, and llvm::True.
Referenced by llvm::getCGPassBuilderOption().
|
static |
-regalloc=... command line option.
Definition at line 957 of file TargetPassConfig.cpp.
Referenced by llvm::TargetPassConfig::addRegAssignAndRewriteFast(), llvm::TargetPassConfig::createRegAllocPass(), llvm::TargetPassConfig::getOptimizeRegAlloc(), and llvm::TargetPassConfig::isCustomizedRegAlloc().
|
static |
|
static |
Referenced by llvm::TargetPassConfig::addMachinePasses(), and llvm::getCGPassBuilderOption().
|
static |
Register Allocation Pass Configuration.
A dummy default pass factory indicates whether the register allocator is overridden on the command line.
Definition at line 1217 of file TargetPassConfig.cpp.
Referenced by llvm::TargetPassConfig::getOptimizeRegAlloc().
|
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 101 of file TargetPassConfig.cpp.
Referenced by formatLimitReason(), and llvm::TargetPassConfig::getStartStopInfo().
Definition at line 102 of file TargetPassConfig.cpp.
Referenced by formatLimitReason(), and llvm::TargetPassConfig::getStartStopInfo().
Definition at line 103 of file TargetPassConfig.cpp.
Referenced by formatLimitReason(), and llvm::TargetPassConfig::getStartStopInfo().
Definition at line 104 of file TargetPassConfig.cpp.
Referenced by formatLimitReason(), and llvm::TargetPassConfig::getStartStopInfo().