47 "riscv-enable-copyelim",
54 cl::desc(
"Enable the global merge pass"));
58 cl::desc(
"Enable the machine combiner pass"),
62 "riscv-v-vector-bits-max",
63 cl::desc(
"Assume V extension vector registers are at most this big, "
64 "with zero meaning no maximum size is assumed."),
68 "riscv-v-vector-bits-min",
69 cl::desc(
"Assume V extension vector registers are at least this big, "
70 "with zero meaning no minimum size is assumed. A value of -1 "
71 "means use Zvl*b extension. This is primarily used to enable "
72 "autovectorization with fixed width vectors."),
76 "riscv-enable-copy-propagation",
77 cl::desc(
"Enable the copy propagation with RISC-V copy instr"),
82 cl::desc(
"Enable the pass that removes dead"
83 " definitions and replaces stores to"
84 " them with stores to x0"),
89 cl::desc(
"Enable sinking and folding of instruction copies"),
94 cl::desc(
"Enable the loop data prefetch pass"),
98 "riscv-disable-vector-mask-mutation",
104 cl::desc(
"Enable Machine Pipeliner for RISC-V"),
108 "riscv-enable-cfi-instr-inserter",
114 cl::desc(
"Enable select to branch optimizations"),
159 std::optional<Reloc::Model> RM) {
160 if (TT.isOSBinFormatMachO())
167 if (TT.isOSBinFormatMachO())
168 return std::make_unique<RISCVMachOTargetObjectFile>();
169 return std::make_unique<RISCVELFTargetObjectFile>();
175 std::optional<Reloc::Model>
RM,
176 std::optional<CodeModel::Model> CM,
179 T, TT.computeDataLayout(
Options.MCOptions.getABIName()), TT, CPU, FS,
192 if (TT.isOSFuchsia() && !TT.isArch64Bit())
200 Attribute CPUAttr =
F.getFnAttribute(
"target-cpu");
201 Attribute TuneAttr =
F.getFnAttribute(
"tune-cpu");
202 Attribute FSAttr =
F.getFnAttribute(
"target-features");
206 std::string TuneCPU =
214 Attribute VScaleRangeAttr =
F.getFnAttribute(Attribute::VScaleRange);
215 if (VScaleRangeAttr.
isValid()) {
223 if (RVVBitsMin != -1U) {
225 assert((RVVBitsMin == 0 || (RVVBitsMin >= 64 && RVVBitsMin <= 65536 &&
227 "V or Zve* extension requires vector length to be in the range of "
228 "64 to 65536 and a power 2!");
229 assert((RVVBitsMax >= RVVBitsMin || RVVBitsMax == 0) &&
230 "Minimum V extension vector length should not be larger than its "
233 assert((RVVBitsMax == 0 || (RVVBitsMax >= 64 && RVVBitsMax <= 65536 &&
235 "V or Zve* extension requires vector length to be in the range of "
236 "64 to 65536 and a power 2!");
238 if (RVVBitsMin != -1U) {
239 if (RVVBitsMax != 0) {
240 RVVBitsMin = std::min(RVVBitsMin, RVVBitsMax);
241 RVVBitsMax = std::max(RVVBitsMin, RVVBitsMax);
245 (RVVBitsMin < 64 || RVVBitsMin > 65536) ? 0 : RVVBitsMin);
248 llvm::bit_floor((RVVBitsMax < 64 || RVVBitsMax > 65536) ? 0 : RVVBitsMax);
252 << CPU << TuneCPU << FS;
253 auto &
I = SubtargetMap[
Key];
255 auto ABIName =
Options.MCOptions.getABIName();
257 F.getParent()->getModuleFlag(
"target-abi"))) {
260 ModuleTargetABI->getString() != ABIName) {
263 ABIName = ModuleTargetABI->getString();
265 I = std::make_unique<RISCVSubtarget>(
266 TargetTriple, CPU, TuneCPU, FS, ABIName, RVVBitsMin, RVVBitsMax, *
this);
288 unsigned DstAS)
const {
298 const auto &MacroFusions = ST.getMacroFusions();
299 if (!MacroFusions.empty())
302 if (ST.enableMISchedLoadClustering())
304 DAG->TII, DAG->TRI,
true));
306 if (ST.enableMISchedStoreClustering())
308 DAG->TII, DAG->TRI,
true));
322 const auto &MacroFusions = ST.getMacroFusions();
323 if (!MacroFusions.empty())
326 if (ST.enablePostMISchedLoadClustering())
328 DAG->TII, DAG->TRI,
true));
330 if (ST.enablePostMISchedStoreClustering())
332 DAG->TII, DAG->TRI,
true));
359static cl::opt<RVVRegisterRegAlloc::FunctionPassCtor,
false,
363 cl::desc(
"Register allocator to use for RVV register."));
365static void initializeDefaultRVVRegisterAllocatorOnce() {
370 RVVRegisterRegAlloc::setDefault(RVVRegAlloc);
378static FunctionPass *createGreedyRVVRegisterAllocator() {
386static RVVRegisterRegAlloc basicRegAllocRVVReg(
"basic",
387 "basic register allocator",
388 createBasicRVVRegisterAllocator);
389static RVVRegisterRegAlloc
390 greedyRegAllocRVVReg(
"greedy",
"greedy register allocator",
391 createGreedyRVVRegisterAllocator);
393static RVVRegisterRegAlloc fastRegAllocRVVReg(
"fast",
"fast register allocator",
394 createFastRVVRegisterAllocator);
398 RISCVPassConfig(RISCVTargetMachine &TM, PassManagerBase &PM)
399 : TargetPassConfig(TM, PM) {
403 EnableLoopTermFold =
true;
406 RISCVTargetMachine &getRISCVTargetMachine()
const {
410 void addIRPasses()
override;
411 bool addPreISel()
override;
412 void addCodeGenPrepare()
override;
413 bool addInstSelector()
override;
414 bool addIRTranslator()
override;
415 void addPreLegalizeMachineIR()
override;
416 bool addLegalizeMachineIR()
override;
417 void addPreRegBankSelect()
override;
418 bool addRegBankSelect()
override;
419 bool addGlobalInstructionSelect()
override;
420 void addPreEmitPass()
override;
421 void addPreEmitPass2()
override;
422 void addPreSched2()
override;
423 void addMachineSSAOptimization()
override;
424 FunctionPass *createRVVRegAllocPass(
bool Optimized);
425 bool addRegAssignAndRewriteFast()
override;
426 bool addRegAssignAndRewriteOptimized()
override;
427 void addPreRegAlloc()
override;
428 void addPostRegAlloc()
override;
429 void addFastRegAlloc()
override;
430 bool addILPOpts()
override;
432 std::unique_ptr<CSEConfigBase> getCSEConfig()
const override;
437 return new RISCVPassConfig(*
this, PM);
440std::unique_ptr<CSEConfigBase> RISCVPassConfig::getCSEConfig()
const {
444FunctionPass *RISCVPassConfig::createRVVRegAllocPass(
bool Optimized) {
447 initializeDefaultRVVRegisterAllocatorOnce);
454 return createGreedyRVVRegisterAllocator();
456 return createFastRVVRegisterAllocator();
459bool RISCVPassConfig::addRegAssignAndRewriteFast() {
460 addPass(createRVVRegAllocPass(
false));
468bool RISCVPassConfig::addRegAssignAndRewriteOptimized() {
469 addPass(createRVVRegAllocPass(
true));
478void RISCVPassConfig::addIRPasses() {
497bool RISCVPassConfig::addPreISel() {
522void RISCVPassConfig::addCodeGenPrepare() {
528bool RISCVPassConfig::addInstSelector() {
534bool RISCVPassConfig::addIRTranslator() {
539void RISCVPassConfig::addPreLegalizeMachineIR() {
547bool RISCVPassConfig::addLegalizeMachineIR() {
552void RISCVPassConfig::addPreRegBankSelect() {
557bool RISCVPassConfig::addRegBankSelect() {
562bool RISCVPassConfig::addGlobalInstructionSelect() {
567void RISCVPassConfig::addPreSched2() {
576void RISCVPassConfig::addPreEmitPass() {
595void RISCVPassConfig::addPreEmitPass2() {
606 TM->getTargetTriple().isRISCV32())
623void RISCVPassConfig::addMachineSSAOptimization() {
634 if (TM->getTargetTriple().isRISCV64()) {
639void RISCVPassConfig::addPreRegAlloc() {
657void RISCVPassConfig::addFastRegAlloc() {
663void RISCVPassConfig::addPostRegAlloc() {
669bool RISCVPassConfig::addILPOpts() {
677#define GET_PASS_REGISTRY "RISCVPassRegistry.def"
701 const auto &YamlMFI =
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static cl::opt< bool > EnableSinkFold("aarch64-enable-sink-fold", cl::desc("Enable sinking and folding of instruction copies"), cl::init(true), cl::Hidden)
static cl::opt< bool > EnableSelectOpt("aarch64-select-opt", cl::Hidden, cl::desc("Enable select to branch optimizations"), cl::init(true))
static cl::opt< bool > EnableRedundantCopyElimination("aarch64-enable-copyelim", cl::desc("Enable the redundant copy elimination pass"), cl::init(true), cl::Hidden)
static cl::opt< bool > EnableLoopDataPrefetch("aarch64-enable-loop-data-prefetch", cl::Hidden, cl::desc("Enable the loop data prefetch pass"), cl::init(true))
static cl::opt< bool > EnableMachinePipeliner("aarch64-enable-pipeliner", cl::desc("Enable Machine Pipeliner for AArch64"), cl::init(false), cl::Hidden)
static std::unique_ptr< TargetLoweringObjectFile > createTLOF(const Triple &TT)
static Reloc::Model getEffectiveRelocModel()
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
Provides analysis for continuously CSEing during GISel passes.
#define LLVM_EXTERNAL_VISIBILITY
static cl::opt< bool > EnableGlobalMerge("enable-global-merge", cl::Hidden, cl::desc("Enable the global merge pass"), cl::init(true))
This file declares the IRTranslator pass.
Register const TargetRegisterInfo * TRI
PassBuilder PB(Machine, PassOpts->PTO, std::nullopt, &PIC)
static cl::opt< bool > EnableRedundantCopyElimination("riscv-enable-copyelim", cl::desc("Enable the redundant copy elimination pass"), cl::init(true), cl::Hidden)
static cl::opt< bool > EnableMachinePipeliner("riscv-enable-pipeliner", cl::desc("Enable Machine Pipeliner for RISC-V"), cl::init(false), cl::Hidden)
static cl::opt< bool > EnableSinkFold("riscv-enable-sink-fold", cl::desc("Enable sinking and folding of instruction copies"), cl::init(true), cl::Hidden)
static cl::opt< bool > EnableLoopDataPrefetch("riscv-enable-loop-data-prefetch", cl::Hidden, cl::desc("Enable the loop data prefetch pass"), cl::init(true))
static cl::opt< unsigned > RVVVectorBitsMaxOpt("riscv-v-vector-bits-max", cl::desc("Assume V extension vector registers are at most this big, " "with zero meaning no maximum size is assumed."), cl::init(0), cl::Hidden)
static cl::opt< cl::boolOrDefault > EnableGlobalMerge("riscv-enable-global-merge", cl::Hidden, cl::desc("Enable the global merge pass"))
static cl::opt< bool > EnableRISCVCopyPropagation("riscv-enable-copy-propagation", cl::desc("Enable the copy propagation with RISC-V copy instr"), cl::init(true), cl::Hidden)
static cl::opt< int > RVVVectorBitsMinOpt("riscv-v-vector-bits-min", cl::desc("Assume V extension vector registers are at least this big, " "with zero meaning no minimum size is assumed. A value of -1 " "means use Zvl*b extension. This is primarily used to enable " "autovectorization with fixed width vectors."), cl::init(-1), cl::Hidden)
static cl::opt< bool > DisableVectorMaskMutation("riscv-disable-vector-mask-mutation", cl::desc("Disable the vector mask scheduling mutation"), cl::init(false), cl::Hidden)
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget()
static cl::opt< bool > EnableRISCVDeadRegisterElimination("riscv-enable-dead-defs", cl::Hidden, cl::desc("Enable the pass that removes dead" " definitions and replaces stores to" " them with stores to x0"), cl::init(true))
static cl::opt< bool > EnableCFIInstrInserter("riscv-enable-cfi-instr-inserter", cl::desc("Enable CFI Instruction Inserter for RISC-V"), cl::init(false), cl::Hidden)
static cl::opt< bool > EnableMachineCombiner("riscv-enable-machine-combiner", cl::desc("Enable the machine combiner pass"), cl::init(true), cl::Hidden)
static cl::opt< bool > EnableSelectOpt("riscv-select-opt", cl::Hidden, cl::desc("Enable select to branch optimizations"), cl::init(true))
This file describes the interface of the MachineFunctionPass responsible for assigning the generic vi...
const GCNTargetMachine & getTM(const GCNSubtarget *STI)
static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")
static FunctionPass * useDefaultRegisterAllocator()
-regalloc=... command line option.
Target-Independent Code Generator Pass Configuration Options pass.
static std::unique_ptr< TargetLoweringObjectFile > createTLOF()
Functions, function parameters, and return types can have attributes to indicate how they should be t...
LLVM_ABI std::optional< unsigned > getVScaleRangeMax() const
Returns the maximum value for the vscale_range attribute or std::nullopt when unknown.
LLVM_ABI unsigned getVScaleRangeMin() const
Returns the minimum value for the vscale_range attribute.
LLVM_ABI StringRef getValueAsString() const
Return the attribute's value as a string.
bool isValid() const
Return true if the attribute is any kind of attribute.
CodeGenTargetMachineImpl(const Target &T, StringRef DataLayoutString, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOptLevel OL)
Lightweight error class with error context and mandatory checking.
FunctionPass class - This class is used to implement most global optimizations.
Module * getParent()
Get the module that this global value is contained inside of...
This pass is responsible for selecting generic machine instructions to target-specific instructions.
Function & getFunction()
Return the LLVM function that this machine code represents.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
const TargetRegisterClass * getRegClass(Register Reg) const
Return the register class of the specified virtual register.
Metadata * getModuleFlag(StringRef Key) const
Return the corresponding value if Key appears in module flags, otherwise return null.
static LLVM_ABI const OptimizationLevel O0
Disable as many optimizations as possible.
This class provides access to building LLVM's passes.
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
RISCVMachineFunctionInfo - This class is derived from MachineFunctionInfo and contains private RISCV-...
yaml::MachineFunctionInfo * createDefaultFuncInfoYAML() const override
Allocate and return a default initialized instance of the YAML representation for the MachineFunction...
RISCVTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM, CodeGenOptLevel OL, bool JIT)
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
void registerPassBuilderCallbacks(PassBuilder &PB) override
Allow the target to modify the pass pipeline.
bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DstAS) const override
Returns true if a cast between SrcAS and DestAS is a noop.
TargetTransformInfo getTargetTransformInfo(const Function &F) const override
Get a TargetTransformInfo implementation for the target.
ScheduleDAGInstrs * createMachineScheduler(MachineSchedContext *C) const override
Create an instance of ScheduleDAGInstrs to be run within the standard MachineScheduler pass for this ...
ScheduleDAGInstrs * createPostMachineScheduler(MachineSchedContext *C) const override
Similar to createMachineScheduler but used when postRA machine scheduling is enabled.
MachineFunctionInfo * createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F, const TargetSubtargetInfo *STI) const override
Create the target's instance of MachineFunctionInfo.
yaml::MachineFunctionInfo * convertFuncInfoToYAML(const MachineFunction &MF) const override
Allocate and initialize an instance of the YAML representation of the MachineFunctionInfo.
bool parseMachineFunctionInfo(const yaml::MachineFunctionInfo &, PerFunctionMIParsingState &PFS, SMDiagnostic &Error, SMRange &SourceRange) const override
Parse out the target's MachineFunctionInfo from the YAML reprsentation.
const RISCVSubtarget * getSubtargetImpl() const =delete
This pass implements the reg bank selector pass used in the GlobalISel pipeline.
RegisterPassParser class - Handle the addition of new machine passes.
RegisterRegAllocBase class - Track the registration of register allocators.
FunctionPass *(*)() FunctionPassCtor
Wrapper class representing virtual and physical registers.
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
Represents a range in source code.
A ScheduleDAG for scheduling lists of MachineInstr.
ScheduleDAGMILive is an implementation of ScheduleDAGInstrs that schedules machine instructions while...
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
Represent a constant reference to a string, i.e.
std::string str() const
Get the contents as an std::string.
CodeGenOptLevel getOptLevel() const
Returns the optimization level: None, Less, Default, or Aggressive.
void setSupportsDebugEntryValues(bool Enable)
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with.
void setMachineOutliner(bool Enable)
void setCFIFixup(bool Enable)
void setSupportsDefaultOutlining(bool Enable)
std::unique_ptr< const MCSubtargetInfo > STI
Target-Independent Code Generator Pass Configuration Options.
virtual void addCodeGenPrepare()
Add pass to prepare the LLVM IR for code generation.
virtual bool addRegAssignAndRewriteFast()
Add core register allocator passes which do the actual register assignment and rewriting.
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
virtual void addFastRegAlloc()
addFastRegAlloc - Add the minimum set of target-independent passes that are required for fast registe...
virtual void addMachineSSAOptimization()
addMachineSSAOptimization - Add standard passes that optimize machine instructions in SSA form.
virtual bool addRegAssignAndRewriteOptimized()
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
TargetSubtargetInfo - Generic base class for all target subtargets.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
A raw_ostream that writes to an SmallVector or SmallString.
Interfaces for registering analysis passes, producing common pass manager configurations,...
@ C
The default llvm calling convention, compatible with C.
ABI getTargetABI(StringRef ABIName)
static constexpr unsigned RVVBitsPerBlock
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
ScheduleDAGMILive * createSchedLive(MachineSchedContext *C)
Create the standard converging machine scheduler.
FunctionPass * createRISCVLandingPadSetupPass()
FunctionPass * createRISCVLoadStoreOptPass()
LLVM_ABI FunctionPass * createFastRegisterAllocator()
FastRegisterAllocation Pass - This pass register allocates as fast as possible.
void initializeRISCVPushPopOptPass(PassRegistry &)
void initializeRISCVExpandPseudoPass(PassRegistry &)
FunctionPass * createRISCVFoldMemOffsetPass()
FunctionPass * createRISCVMoveMergePass()
createRISCVMoveMergePass - returns an instance of the move merge pass.
LLVM_ABI char & InitUndefID
LLVM_ABI std::unique_ptr< ScheduleDAGMutation > createMacroFusionDAGMutation(ArrayRef< MacroFusionPredTy > Predicates, bool BranchOnly=false)
Create a DAG scheduling mutation to pair instructions back to back for instructions that benefit acco...
LLVM_ABI FunctionPass * createTypePromotionLegacyPass()
Create IR Type Promotion pass.
void initializeRISCVDeadRegisterDefinitionsPass(PassRegistry &)
LLVM_ABI FunctionPass * createGreedyRegisterAllocator()
Greedy register allocation pass - This pass implements a global register allocator for optimized buil...
void initializeRISCVPreLegalizerCombinerPass(PassRegistry &)
FunctionPass * createRISCVCodeGenPrepareLegacyPass()
FunctionPass * createRISCVExpandAtomicPseudoPass()
FunctionPass * createRISCVPostRAExpandPseudoPass()
LLVM_ABI FunctionPass * createSelectOptimizePass()
This pass converts conditional moves to conditional jumps when profitable.
LLVM_ABI Pass * createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset, bool OnlyOptimizeForSize=false, bool MergeExternalByDefault=false, bool MergeConstantByDefault=false, bool MergeConstAggressiveByDefault=false)
GlobalMerge - This pass merges internal (by default) globals into structs to enable reuse of a base p...
FunctionPass * createRISCVInsertReadWriteCSRPass()
Target & getTheRISCV32Target()
void initializeRISCVFoldMemOffsetPass(PassRegistry &)
void initializeRISCVInsertVSETVLIPass(PassRegistry &)
FunctionPass * createRISCVVLOptimizerPass()
LLVM_ABI char & PostRASchedulerID
PostRAScheduler - This pass performs post register allocation scheduling.
void initializeRISCVLateBranchOptPass(PassRegistry &)
void initializeRISCVRedundantCopyEliminationPass(PassRegistry &)
Target & getTheRISCV64beTarget()
LLVM_ABI std::unique_ptr< CSEConfigBase > getStandardCSEConfigForOpt(CodeGenOptLevel Level)
FunctionPass * createRISCVDeadRegisterDefinitionsPass()
LLVM_ABI char & PostMachineSchedulerID
PostMachineScheduler - This pass schedules machine instructions postRA.
FunctionPass * createRISCVGatherScatterLoweringPass()
FunctionPass * createRISCVMergeBaseOffsetOptPass()
Returns an instance of the Merge Base Offset Optimization pass.
auto dyn_cast_or_null(const Y &Val)
FunctionPass * createRISCVPostLegalizerCombiner()
LLVM_ABI void initializeMachineKCFILegacyPass(PassRegistry &)
PassManager< Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater & > LoopPassManager
The Loop pass manager.
LLVM_ABI char & MachineCombinerID
This pass performs instruction combining using trace metrics to estimate critical-path and resource d...
LLVM_ABI FunctionPass * createUnpackMachineBundlesLegacy(std::function< bool(const MachineFunction &)> Ftor)
static Reloc::Model getEffectiveRelocModel(std::optional< Reloc::Model > RM)
void initializeRISCVPostRAExpandPseudoPass(PassRegistry &)
CodeModel::Model getEffectiveCodeModel(std::optional< CodeModel::Model > CM, CodeModel::Model Default)
Helper method for getting the code model, returning Default if CM does not have a value.
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
ScheduleDAGMI * createSchedPostRA(MachineSchedContext *C)
Create a generic scheduler with no vreg liveness or DAG mutation passes.
LLVM_ABI char & BranchRelaxationPassID
BranchRelaxation - This pass replaces branches that need to jump further than is supported by a branc...
void initializeRISCVDAGToDAGISelLegacyPass(PassRegistry &)
FunctionPass * createRISCVPreAllocZilsdOptPass()
FunctionPass * createRISCVPushPopOptimizationPass()
createRISCVPushPopOptimizationPass - returns an instance of the Push/Pop optimization pass.
FunctionPass * createRISCVMakeCompressibleOptPass()
Returns an instance of the Make Compressible Optimization pass.
FunctionPass * createRISCVRedundantCopyEliminationPass()
LLVM_ABI FunctionPass * createKCFIPass()
Lowers KCFI operand bundles for indirect calls.
void initializeRISCVVMV0EliminationPass(PassRegistry &)
void initializeRISCVInsertWriteVXRMPass(PassRegistry &)
void initializeRISCVLoadStoreOptPass(PassRegistry &)
LLVM_ABI std::unique_ptr< ScheduleDAGMutation > createStoreClusterDAGMutation(const TargetInstrInfo *TII, const TargetRegisterInfo *TRI, bool ReorderWhileClustering=false)
If ReorderWhileClustering is set to true, no attempt will be made to reduce reordering due to store c...
LLVM_ABI FunctionPass * createLoopDataPrefetchPass()
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
void initializeRISCVInsertReadWriteCSRPass(PassRegistry &)
void initializeRISCVExpandAtomicPseudoPass(PassRegistry &)
FunctionPass * createRISCVPreLegalizerCombiner()
void initializeRISCVCodeGenPrepareLegacyPassPass(PassRegistry &)
FunctionPass * createRISCVVMV0EliminationPass()
FunctionPass * createRISCVInsertVSETVLIPass()
Returns an instance of the Insert VSETVLI pass.
FunctionPass * createRISCVO0PreLegalizerCombiner()
CodeGenOptLevel
Code generation optimization level.
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
FunctionPass * createRISCVIndirectBranchTrackingPass()
FunctionPass * createRISCVOptWInstrsPass()
LLVM_ABI FunctionPass * createInterleavedAccessPass()
InterleavedAccess Pass - This pass identifies and matches interleaved memory accesses to target speci...
std::unique_ptr< ScheduleDAGMutation > createRISCVVectorMaskDAGMutation(const TargetRegisterInfo *TRI)
LLVM_ABI FunctionPass * createBasicRegisterAllocator()
BasicRegisterAllocation Pass - This pass implements a degenerate global register allocator using the ...
LLVM_ABI void initializeGlobalISel(PassRegistry &)
Initialize all passes linked into the GlobalISel library.
void initializeRISCVMakeCompressibleOptPass(PassRegistry &)
LLVM_ABI char & MachinePipelinerID
This pass performs software pipelining on machine instructions.
LLVM_ABI ModulePass * createBarrierNoopPass()
createBarrierNoopPass - This pass is purely a module pass barrier in a pass manager.
void initializeRISCVQCRelaxMarkingPass(PassRegistry &)
void initializeRISCVVLOptimizerPass(PassRegistry &)
LLVM_ABI std::unique_ptr< ScheduleDAGMutation > createLoadClusterDAGMutation(const TargetInstrInfo *TII, const TargetRegisterInfo *TRI, bool ReorderWhileClustering=false)
If ReorderWhileClustering is set to true, no attempt will be made to reduce reordering due to store c...
void initializeRISCVOptWInstrsPass(PassRegistry &)
FunctionPass * createRISCVLateBranchOptPass()
Target & getTheRISCV64Target()
ModulePass * createRISCVPromoteConstantPass()
FunctionPass * createRISCVVectorPeepholePass()
void call_once(once_flag &flag, Function &&F, Args &&... ArgList)
Execute the function specified as a parameter once.
void initializeRISCVO0PreLegalizerCombinerPass(PassRegistry &)
void initializeRISCVMergeBaseOffsetOptPass(PassRegistry &)
void initializeRISCVIndirectBranchTrackingPass(PassRegistry &)
void initializeRISCVPromoteConstantPass(PassRegistry &)
void initializeRISCVAsmPrinterPass(PassRegistry &)
FunctionPass * createRISCVISelDag(RISCVTargetMachine &TM, CodeGenOptLevel OptLevel)
LLVM_ABI FunctionPass * createVirtRegRewriter(bool ClearVirtRegs=true)
void initializeRISCVGatherScatterLoweringPass(PassRegistry &)
FunctionPass * createRISCVExpandPseudoPass()
FunctionPass * createRISCVPreRAExpandPseudoPass()
LLVM_ABI FunctionPass * createAtomicExpandLegacyPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
T bit_floor(T Value)
Returns the largest integral power of two no greater than Value if Value is nonzero.
FunctionPass * createRISCVInsertWriteVXRMPass()
LLVM_ABI MachineFunctionPass * createMachineCopyPropagationPass(bool UseCopyInstr)
void initializeRISCVVectorPeepholePass(PassRegistry &)
FunctionPass * createRISCVZacasABIFixPass()
LLVM_ABI FunctionPass * createCFIInstrInserter()
Creates CFI Instruction Inserter pass.
void initializeRISCVPreRAExpandPseudoPass(PassRegistry &)
void initializeRISCVPreAllocZilsdOptPass(PassRegistry &)
Target & getTheRISCV32beTarget()
void initializeRISCVPostLegalizerCombinerPass(PassRegistry &)
void initializeRISCVMoveMergePass(PassRegistry &)
FunctionPass * createRISCVQCRelaxMarkingPass()
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
static FuncInfoTy * create(BumpPtrAllocator &Allocator, const Function &F, const SubtargetTy *STI)
Factory function: default behavior is to call new using the supplied allocator.
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
static bool isRVVRegClass(const TargetRegisterClass *RC)
RegisterTargetMachine - Helper template for registering a target machine implementation,...
The llvm::once_flag structure.
Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.