89 std::optional<Reloc::Model> RM) {
90 if (TT.isOSBinFormatMachO())
97 if (TT.isOSBinFormatMachO())
98 return std::make_unique<RISCVMachOTargetObjectFile>();
99 return std::make_unique<RISCVELFTargetObjectFile>();
105 std::optional<Reloc::Model>
RM,
106 std::optional<CodeModel::Model> CM,
111 CLOpts(
cl::LibraryOptionsContext::
get<RISCVOptions>(
112 Options.MCOptions.LibraryOptions)),
125 if (TT.isOSFuchsia() && !TT.isArch64Bit())
134 const Module *M =
F.getParent();
138 SubtargetAttrs Attrs;
142 Attrs.VScaleRange = FnAttrs.
getAttribute(Attribute::VScaleRange);
144 if (
const RISCVSubtarget *ST = LastSubtarget.lookup(FnAttrs, M, Attrs))
148 Attrs.CPU.isValid() ? Attrs.CPU.getValueAsString() :
TargetCPU;
150 Attrs.TuneCPU.isValid() ? Attrs.TuneCPU.getValueAsString() : CPU;
153 unsigned RVVBitsMin = CLOpts.v_vector_bits_min.value_or(-1);
154 unsigned RVVBitsMax = CLOpts.v_vector_bits_max.value_or(0);
156 if (Attrs.VScaleRange.isValid()) {
157 if (!CLOpts.v_vector_bits_min)
160 std::optional<unsigned> VScaleMax = Attrs.VScaleRange.getVScaleRangeMax();
161 if (VScaleMax.has_value() && !CLOpts.v_vector_bits_max)
165 if (RVVBitsMin != -1U) {
167 assert((RVVBitsMin == 0 || (RVVBitsMin >= 64 && RVVBitsMin <= 65536 &&
169 "V or Zve* extension requires vector length to be in the range of "
170 "64 to 65536 and a power 2!");
171 assert((RVVBitsMax >= RVVBitsMin || RVVBitsMax == 0) &&
172 "Minimum V extension vector length should not be larger than its "
175 assert((RVVBitsMax == 0 || (RVVBitsMax >= 64 && RVVBitsMax <= 65536 &&
177 "V or Zve* extension requires vector length to be in the range of "
178 "64 to 65536 and a power 2!");
180 if (RVVBitsMin != -1U) {
181 if (RVVBitsMax != 0) {
182 RVVBitsMin = std::min(RVVBitsMin, RVVBitsMax);
183 RVVBitsMax = std::max(RVVBitsMin, RVVBitsMax);
187 (RVVBitsMin < 64 || RVVBitsMin > 65536) ? 0 : RVVBitsMin);
190 llvm::bit_floor((RVVBitsMax < 64 || RVVBitsMax > 65536) ? 0 : RVVBitsMax);
194 << CPU << TuneCPU << FS;
195 auto &
I = SubtargetMap[
Key];
198 I = std::make_unique<RISCVSubtarget>(
199 TargetTriple, CPU, TuneCPU, FS, ABIName, RVVBitsMin, RVVBitsMax, *
this);
201 LastSubtarget.set(FnAttrs, M, Attrs,
I.get());
223 unsigned DstAS)
const {
233 const auto &MacroFusions = ST.getMacroFusions();
234 if (!MacroFusions.empty())
237 if (ST.enableMISchedLoadClustering())
241 if (ST.enableMISchedStoreClustering())
245 if (CLOpts.vector_mask_mutation && ST.hasVInstructions())
257 const auto &MacroFusions = ST.getMacroFusions();
258 if (!MacroFusions.empty())
261 if (ST.enablePostMISchedLoadClustering())
265 if (ST.enablePostMISchedStoreClustering())
294static cl::opt<RVVRegisterRegAlloc::FunctionPassCtor,
false,
298 cl::desc(
"Register allocator to use for RVV register."));
300static void initializeDefaultRVVRegisterAllocatorOnce() {
305 RVVRegisterRegAlloc::setDefault(RVVRegAlloc);
313static FunctionPass *createGreedyRVVRegisterAllocator() {
321static RVVRegisterRegAlloc basicRegAllocRVVReg(
"basic",
322 "basic register allocator",
323 createBasicRVVRegisterAllocator);
324static RVVRegisterRegAlloc
325 greedyRegAllocRVVReg(
"greedy",
"greedy register allocator",
326 createGreedyRVVRegisterAllocator);
328static RVVRegisterRegAlloc fastRegAllocRVVReg(
"fast",
"fast register allocator",
329 createFastRVVRegisterAllocator);
332 const RISCVOptions &CLOpts;
335 RISCVPassConfig(RISCVTargetMachine &TM, PassManagerBase &PM)
336 : TargetPassConfig(TM, PM), CLOpts(TM.
getCLOpts()) {
339 setEnableSinkAndFold(CLOpts.enable_sink_fold);
340 EnableLoopTermFold =
true;
343 RISCVTargetMachine &getRISCVTargetMachine()
const {
347 void addIRPasses()
override;
348 bool addPreISel()
override;
349 void addCodeGenPrepare()
override;
350 bool addInstSelector()
override;
351 bool addIRTranslator()
override;
352 void addPreLegalizeMachineIR()
override;
353 bool addLegalizeMachineIR()
override;
354 void addPreRegBankSelect()
override;
355 bool addRegBankSelect()
override;
356 bool addGlobalInstructionSelect()
override;
357 void addPreEmitPass()
override;
358 void addPreEmitPass2()
override;
359 void addPreSched2()
override;
360 void addMachineSSAOptimization()
override;
361 FunctionPass *createRVVRegAllocPass(
bool Optimized);
362 bool addRegAssignAndRewriteFast()
override;
363 bool addRegAssignAndRewriteOptimized()
override;
364 void addPreRegAlloc()
override;
365 void addPostRegAlloc()
override;
366 void addFastRegAlloc()
override;
367 bool addILPOpts()
override;
369 std::unique_ptr<CSEConfigBase> getCSEConfig()
const override;
374 return new RISCVPassConfig(*
this, PM);
377std::unique_ptr<CSEConfigBase> RISCVPassConfig::getCSEConfig()
const {
381FunctionPass *RISCVPassConfig::createRVVRegAllocPass(
bool Optimized) {
384 initializeDefaultRVVRegisterAllocatorOnce);
391 return createGreedyRVVRegisterAllocator();
393 return createFastRVVRegisterAllocator();
396bool RISCVPassConfig::addRegAssignAndRewriteFast() {
397 addPass(createRVVRegAllocPass(
false));
404bool RISCVPassConfig::addRegAssignAndRewriteOptimized() {
405 addPass(createRVVRegAllocPass(
true));
413void RISCVPassConfig::addIRPasses() {
418 if (CLOpts.enable_loop_data_prefetch)
432bool RISCVPassConfig::addPreISel() {
442 if (
valueOr(CLOpts.enable_global_merge,
456void RISCVPassConfig::addCodeGenPrepare() {
462bool RISCVPassConfig::addInstSelector() {
468bool RISCVPassConfig::addIRTranslator() {
473void RISCVPassConfig::addPreLegalizeMachineIR() {
481bool RISCVPassConfig::addLegalizeMachineIR() {
486void RISCVPassConfig::addPreRegBankSelect() {
491bool RISCVPassConfig::addRegBankSelect() {
496bool RISCVPassConfig::addGlobalInstructionSelect() {
501void RISCVPassConfig::addPreSched2() {
510void RISCVPassConfig::addPreEmitPass() {
517 CLOpts.enable_copy_propagation)
529void RISCVPassConfig::addPreEmitPass2() {
540 TM->getTargetTriple().isRISCV32())
553 if (CLOpts.enable_cfi_instr_inserter)
557void RISCVPassConfig::addMachineSSAOptimization() {
576 if (TM->getTargetTriple().isRISCV64()) {
581void RISCVPassConfig::addPreRegAlloc() {
594void RISCVPassConfig::addFastRegAlloc() {
600void RISCVPassConfig::addPostRegAlloc() {
605bool RISCVPassConfig::addILPOpts() {
606 if (CLOpts.enable_machine_combiner)
626 const auto &YamlMFI =
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static std::unique_ptr< TargetLoweringObjectFile > createTLOF(const Triple &TT)
static Reloc::Model getEffectiveRelocModel()
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
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
This file declares the IRTranslator pass.
Register const TargetRegisterInfo * TRI
MachineRegisterInfo & MRI
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget()
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()
This class holds the attributes for a particular argument, parameter, function, or return value.
LLVM_ABI Attribute getAttribute(Attribute::AttrKind Kind) const
Return the attribute object.
CodeGenTargetMachineImpl(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOptLevel OL)
A parsed version of the target data layout string in and methods for querying it.
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.
static void setUseExtended(bool Enable)
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.
A Module instance is used to store all the information related to an LLVM module.
Metadata * getModuleFlag(StringRef Key) const
Return the corresponding value if Key appears in module flags, otherwise return null.
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 ...
TargetTransformInfo getTargetTransformInfo(const Function &F) const override
Get a TargetTransformInfo implementation for the target.
bool isNoopAddrSpaceCast(const DataLayout &DL, unsigned SrcAS, unsigned DstAS) const override
Returns true if a cast between SrcAS and DestAS is a noop.
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.
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)
StringRef getTargetABIName(const Module &M) const
Returns the effective target ABI name: the "target-abi" module flag if present, otherwise the -target...
const DataLayout DL
DataLayout for the target: keep ABI type size and alignment.
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 ...
Registers T with cl::parseCommandLineOptions.
A raw_ostream that writes to an SmallVector or SmallString.
const AArch64MCOptions & getCLOpts(const MCTargetOptions &Options)
static constexpr unsigned RVVBitsPerBlock
This namespace contains all of the command line option processing machinery.
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 * createRISCVVectorPeepholeLegacyPass()
void initializeRISCVO0PreLegalizerCombinerLegacyPass(PassRegistry &)
LLVM_ABI FunctionPass * createFastRegisterAllocator()
FastRegisterAllocation Pass - This pass register allocates as fast as possible.
void initializeRISCVFoldMemOffsetLegacyPass(PassRegistry &)
LLVM_ABI char & EarlyMachineLICMID
This pass performs loop invariant code motion on machine instructions.
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...
void initializeRISCVLateBranchOptLegacyPass(PassRegistry &)
LLVM_ABI FunctionPass * createTypePromotionLegacyPass()
Create IR Type Promotion pass.
LLVM_ABI FunctionPass * createGreedyRegisterAllocator()
Greedy register allocation pass - This pass implements a global register allocator for optimized buil...
FunctionPass * createRISCVCodeGenPrepareLegacyPass()
FunctionPass * createRISCVISelDagLegacyPass(RISCVTargetMachine &TM, CodeGenOptLevel OptLevel)
FunctionPass * createRISCVOptWInstrsLegacyPass()
void initializeRISCVQCRelaxMarkingLegacyPass(PassRegistry &)
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...
LLVM_ABI std::unique_ptr< ScheduleDAGMutation > createLoadClusterDAGMutation(const TargetInstrInfo *TII, bool ReorderWhileClustering=false)
If ReorderWhileClustering is set to true, no attempt will be made to reduce reordering due to store c...
Target & getTheRISCV32Target()
FunctionPass * createRISCVGatherScatterLoweringLegacyPass()
FunctionPass * createRISCVMoveMergeLegacyPass()
Returns an instance of the move merge pass.
FunctionPass * createRISCVLandingPadSetupLegacyPass()
void initializeRISCVPromoteConstantLegacyPass(PassRegistry &)
LLVM_ABI char & PostRASchedulerID
PostRAScheduler - This pass performs post register allocation scheduling.
void initializeRISCVExpandPseudoPreEmitLegacyPass(PassRegistry &)
FunctionPass * createRISCVExpandPseudoPostRALegacyPass()
FunctionPass * createRISCVExpandPseudoAtomicsLegacyPass()
Target & getTheRISCV64beTarget()
FunctionPass * createRISCVZacasABIFixLegacyPass()
LLVM_ABI std::unique_ptr< CSEConfigBase > getStandardCSEConfigForOpt(CodeGenOptLevel Level)
LLVM_ABI char & PostMachineSchedulerID
PostMachineScheduler - This pass schedules machine instructions postRA.
LLVM_ABI std::unique_ptr< ScheduleDAGMutation > createStoreClusterDAGMutation(const TargetInstrInfo *TII, bool ReorderWhileClustering=false)
If ReorderWhileClustering is set to true, no attempt will be made to reduce reordering due to store c...
void initializeRISCVCodeGenPrepareLegacyPass(PassRegistry &)
LLVM_ABI FunctionPass * createCFIInstrInserterLegacy()
Creates CFI Instruction Inserter pass.
void initializeRISCVRedundantCopyEliminationLegacyPass(PassRegistry &)
FunctionPass * createRISCVLateBranchOptLegacyPass()
ModulePass * createRISCVPromoteConstantLegacyPass()
FunctionPass * createRISCVIndirectBranchTrackingLegacyPass()
FunctionPass * createRISCVDeadRegisterDefinitionsLegacyPass()
void initializeRISCVPostLegalizerCombinerLegacyPass(PassRegistry &)
LLVM_ABI void initializeMachineKCFILegacyPass(PassRegistry &)
LLVM_ABI char & MachineCombinerID
This pass performs instruction combining using trace metrics to estimate critical-path and resource d...
FunctionPass * createRISCVMakeCompressibleLegacyPass()
Returns an instance of the Make Compressible Optimization pass.
LLVM_ABI FunctionPass * createUnpackMachineBundlesLegacy(std::function< bool(const MachineFunction &)> Ftor)
static Reloc::Model getEffectiveRelocModel(std::optional< Reloc::Model > RM)
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.
FunctionPass * createRISCVPreLegalizerCombinerLegacyPass()
void initializeRISCVLoadStoreOptLegacyPass(PassRegistry &)
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
void initializeRISCVExpandPseudoAtomicsLegacyPass(PassRegistry &)
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...
FunctionPass * createRISCVExpandPseudoPreEmitLegacyPass()
void initializeRISCVDAGToDAGISelLegacyPass(PassRegistry &)
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
void initializeRISCVInsertVSETVLILegacyPass(PassRegistry &)
FunctionPass * createRISCVFoldMemOffsetLegacyPass()
LLVM_ABI FunctionPass * createKCFIPass()
Lowers KCFI operand bundles for indirect calls.
void initializeRISCVMakeCompressibleLegacyPass(PassRegistry &)
LLVM_ABI FunctionPass * createLoopDataPrefetchPass()
FunctionPass * createRISCVMergeBaseOffsetLegacyPass()
Returns an instance of the Merge Base Offset Optimization pass.
void initializeRISCVPushPopOptLegacyPass(PassRegistry &)
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
FunctionPass * createRISCVPushPopOptLegacyPass()
createRISCVPushPopOptimizationPass - returns an instance of the Push/Pop optimization pass.
FunctionPass * createRISCVQCRelaxMarkingLegacyPass()
FunctionPass * createRISCVLoadStoreOptLegacyPass()
void initializeRISCVExpandPseudoPreRALegacyPass(PassRegistry &)
void initializeRISCVInsertWriteVXRMLegacyPass(PassRegistry &)
CodeGenOptLevel
Code generation optimization level.
void initializeRISCVLandingPadSetupLegacyPass(PassRegistry &)
FunctionPass * createRISCVInsertWriteVXRMLegacyPass()
void initializeRISCVVLOptimizerLegacyPass(PassRegistry &)
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
FunctionPass * createRISCVPostLegalizerCombinerLegacyPass()
void initializeRISCVDeadRegisterDefinitionsLegacyPass(PassRegistry &)
LLVM_ABI FunctionPass * createInterleavedAccessPass()
InterleavedAccess Pass - This pass identifies and matches interleaved memory accesses to target speci...
void initializeRISCVPreAllocZilsdOptLegacyPass(PassRegistry &)
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.
FunctionPass * createRISCVRedundantCopyEliminationLegacyPass()
void initializeRISCVVectorPeepholeLegacyPass(PassRegistry &)
void initializeRISCVVMV0EliminationLegacyPass(PassRegistry &)
LLVM_ABI ModulePass * createBarrierNoopPass()
createBarrierNoopPass - This pass is purely a module pass barrier in a pass manager.
void initializeRISCVIndirectBranchTrackingLegacyPass(PassRegistry &)
Target & getTheRISCV64Target()
FunctionPass * createRISCVExpandPseudoPreRALegacyPass()
FunctionPass * createRISCVVMV0EliminationLegacyPass()
void call_once(once_flag &flag, Function &&F, Args &&... ArgList)
Execute the function specified as a parameter once.
FunctionPass * createRISCVO0PreLegalizerCombinerLegacyPass()
void initializeRISCVMergeBaseOffsetLegacyPass(PassRegistry &)
void initializeRISCVAsmPrinterPass(PassRegistry &)
FunctionPass * createRISCVInsertReadWriteCSRLegacyPass()
void initializeRISCVOptWInstrsLegacyPass(PassRegistry &)
void initializeRISCVGatherScatterLoweringLegacyPass(PassRegistry &)
void initializeRISCVInsertReadWriteCSRLegacyPass(PassRegistry &)
void initializeRISCVZacasABIFixLegacyPass(PassRegistry &)
LLVM_ABI FunctionPass * createVirtRegRewriter(bool ClearVirtRegs=true)
constexpr bool valueOr(BoolOrDefault X, bool Default)
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.
void initializeRISCVPreLegalizerCombinerLegacyPass(PassRegistry &)
T bit_floor(T Value)
Returns the largest integral power of two no greater than Value if Value is nonzero.
LLVM_ABI MachineFunctionPass * createMachineCopyPropagationPass(bool UseCopyInstr)
FunctionPass * createRISCVVLOptimizerLegacyPass()
void initializeRISCVExpandPseudoPostRALegacyPass(PassRegistry &)
FunctionPass * createRISCVPreAllocZilsdOptLegacyPass()
FunctionPass * createRISCVInsertVSETVLILegacyPass()
Returns an instance of the Insert VSETVLI pass.
Target & getTheRISCV32beTarget()
void initializeRISCVMoveMergeLegacyPass(PassRegistry &)
MCRegisterClass TargetRegisterClass
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.