88 std::optional<Reloc::Model> RM) {
89 if (TT.isOSBinFormatMachO())
96 if (TT.isOSBinFormatMachO())
97 return std::make_unique<RISCVMachOTargetObjectFile>();
98 return std::make_unique<RISCVELFTargetObjectFile>();
104 std::optional<Reloc::Model>
RM,
105 std::optional<CodeModel::Model> CM,
120 if (TT.isOSFuchsia() && !TT.isArch64Bit())
128 Attribute CPUAttr =
F.getFnAttribute(
"target-cpu");
129 Attribute TuneAttr =
F.getFnAttribute(
"tune-cpu");
130 Attribute FSAttr =
F.getFnAttribute(
"target-features");
134 std::string TuneCPU =
139 unsigned RVVBitsMin = CLOpts.v_vector_bits_min.value_or(-1);
140 unsigned RVVBitsMax = CLOpts.v_vector_bits_max.value_or(0);
142 Attribute VScaleRangeAttr =
F.getFnAttribute(Attribute::VScaleRange);
143 if (VScaleRangeAttr.
isValid()) {
144 if (!CLOpts.v_vector_bits_min)
147 if (VScaleMax.has_value() && !CLOpts.v_vector_bits_max)
151 if (RVVBitsMin != -1U) {
153 assert((RVVBitsMin == 0 || (RVVBitsMin >= 64 && RVVBitsMin <= 65536 &&
155 "V or Zve* extension requires vector length to be in the range of "
156 "64 to 65536 and a power 2!");
157 assert((RVVBitsMax >= RVVBitsMin || RVVBitsMax == 0) &&
158 "Minimum V extension vector length should not be larger than its "
161 assert((RVVBitsMax == 0 || (RVVBitsMax >= 64 && RVVBitsMax <= 65536 &&
163 "V or Zve* extension requires vector length to be in the range of "
164 "64 to 65536 and a power 2!");
166 if (RVVBitsMin != -1U) {
167 if (RVVBitsMax != 0) {
168 RVVBitsMin = std::min(RVVBitsMin, RVVBitsMax);
169 RVVBitsMax = std::max(RVVBitsMin, RVVBitsMax);
173 (RVVBitsMin < 64 || RVVBitsMin > 65536) ? 0 : RVVBitsMin);
176 llvm::bit_floor((RVVBitsMax < 64 || RVVBitsMax > 65536) ? 0 : RVVBitsMax);
180 << CPU << TuneCPU << FS;
181 auto &
I = SubtargetMap[
Key];
184 I = std::make_unique<RISCVSubtarget>(
185 TargetTriple, CPU, TuneCPU, FS, ABIName, RVVBitsMin, RVVBitsMax, *
this);
208 unsigned DstAS)
const {
218 const auto &MacroFusions = ST.getMacroFusions();
219 if (!MacroFusions.empty())
222 if (ST.enableMISchedLoadClustering())
226 if (ST.enableMISchedStoreClustering())
230 if (CLOpts.vector_mask_mutation && ST.hasVInstructions())
242 const auto &MacroFusions = ST.getMacroFusions();
243 if (!MacroFusions.empty())
246 if (ST.enablePostMISchedLoadClustering())
250 if (ST.enablePostMISchedStoreClustering())
279static cl::opt<RVVRegisterRegAlloc::FunctionPassCtor,
false,
283 cl::desc(
"Register allocator to use for RVV register."));
285static void initializeDefaultRVVRegisterAllocatorOnce() {
290 RVVRegisterRegAlloc::setDefault(RVVRegAlloc);
298static FunctionPass *createGreedyRVVRegisterAllocator() {
306static RVVRegisterRegAlloc basicRegAllocRVVReg(
"basic",
307 "basic register allocator",
308 createBasicRVVRegisterAllocator);
309static RVVRegisterRegAlloc
310 greedyRegAllocRVVReg(
"greedy",
"greedy register allocator",
311 createGreedyRVVRegisterAllocator);
313static RVVRegisterRegAlloc fastRegAllocRVVReg(
"fast",
"fast register allocator",
314 createFastRVVRegisterAllocator);
317 const RISCVOptions &CLOpts;
320 RISCVPassConfig(RISCVTargetMachine &TM, PassManagerBase &PM)
321 : TargetPassConfig(TM, PM), CLOpts(TM.getCLOpts()) {
324 setEnableSinkAndFold(CLOpts.enable_sink_fold);
325 EnableLoopTermFold =
true;
328 RISCVTargetMachine &getRISCVTargetMachine()
const {
332 void addIRPasses()
override;
333 bool addPreISel()
override;
334 void addCodeGenPrepare()
override;
335 bool addInstSelector()
override;
336 bool addIRTranslator()
override;
337 void addPreLegalizeMachineIR()
override;
338 bool addLegalizeMachineIR()
override;
339 void addPreRegBankSelect()
override;
340 bool addRegBankSelect()
override;
341 bool addGlobalInstructionSelect()
override;
342 void addPreEmitPass()
override;
343 void addPreEmitPass2()
override;
344 void addPreSched2()
override;
345 void addMachineSSAOptimization()
override;
346 FunctionPass *createRVVRegAllocPass(
bool Optimized);
347 bool addRegAssignAndRewriteFast()
override;
348 bool addRegAssignAndRewriteOptimized()
override;
349 void addPreRegAlloc()
override;
350 void addPostRegAlloc()
override;
351 void addFastRegAlloc()
override;
352 bool addILPOpts()
override;
354 std::unique_ptr<CSEConfigBase> getCSEConfig()
const override;
359 return new RISCVPassConfig(*
this, PM);
362std::unique_ptr<CSEConfigBase> RISCVPassConfig::getCSEConfig()
const {
366FunctionPass *RISCVPassConfig::createRVVRegAllocPass(
bool Optimized) {
369 initializeDefaultRVVRegisterAllocatorOnce);
376 return createGreedyRVVRegisterAllocator();
378 return createFastRVVRegisterAllocator();
381bool RISCVPassConfig::addRegAssignAndRewriteFast() {
382 addPass(createRVVRegAllocPass(
false));
389bool RISCVPassConfig::addRegAssignAndRewriteOptimized() {
390 addPass(createRVVRegAllocPass(
true));
398void RISCVPassConfig::addIRPasses() {
403 if (CLOpts.enable_loop_data_prefetch)
417bool RISCVPassConfig::addPreISel() {
427 if (
valueOr(CLOpts.enable_global_merge,
441void RISCVPassConfig::addCodeGenPrepare() {
447bool RISCVPassConfig::addInstSelector() {
453bool RISCVPassConfig::addIRTranslator() {
458void RISCVPassConfig::addPreLegalizeMachineIR() {
466bool RISCVPassConfig::addLegalizeMachineIR() {
471void RISCVPassConfig::addPreRegBankSelect() {
476bool RISCVPassConfig::addRegBankSelect() {
481bool RISCVPassConfig::addGlobalInstructionSelect() {
486void RISCVPassConfig::addPreSched2() {
495void RISCVPassConfig::addPreEmitPass() {
502 CLOpts.enable_copy_propagation)
514void RISCVPassConfig::addPreEmitPass2() {
525 TM->getTargetTriple().isRISCV32())
538 if (CLOpts.enable_cfi_instr_inserter)
542void RISCVPassConfig::addMachineSSAOptimization() {
561 if (TM->getTargetTriple().isRISCV64()) {
566void RISCVPassConfig::addPreRegAlloc() {
584void RISCVPassConfig::addFastRegAlloc() {
590void RISCVPassConfig::addPostRegAlloc() {
595bool RISCVPassConfig::addILPOpts() {
596 if (CLOpts.enable_machine_combiner)
616 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
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()
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, 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.
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 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.
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)
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::Global with cl::ParseCommandLineOptions.
A raw_ostream that writes to an SmallVector or SmallString.
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 * createRISCVVectorPeepholeLegacyPass()
FunctionPass * createRISCVLoadStoreOptPass()
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.
void initializeRISCVPushPopOptPass(PassRegistry &)
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 * createRISCVISelDagLegacyPass(RISCVTargetMachine &TM, CodeGenOptLevel OptLevel)
FunctionPass * createRISCVOptWInstrsLegacyPass()
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...
FunctionPass * createRISCVInsertReadWriteCSRPass()
Target & getTheRISCV32Target()
void initializeRISCVInsertVSETVLIPass(PassRegistry &)
FunctionPass * createRISCVGatherScatterLoweringLegacyPass()
LLVM_ABI char & PostRASchedulerID
PostRAScheduler - This pass performs post register allocation scheduling.
void initializeRISCVExpandPseudoPreEmitLegacyPass(PassRegistry &)
void initializeRISCVLateBranchOptPass(PassRegistry &)
FunctionPass * createRISCVExpandPseudoPostRALegacyPass()
FunctionPass * createRISCVExpandPseudoAtomicsLegacyPass()
void initializeRISCVRedundantCopyEliminationPass(PassRegistry &)
Target & getTheRISCV64beTarget()
FunctionPass * createRISCVZacasABIFixLegacyPass()
LLVM_ABI std::unique_ptr< CSEConfigBase > getStandardCSEConfigForOpt(CodeGenOptLevel Level)
FunctionPass * createRISCVDeadRegisterDefinitionsPass()
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.
FunctionPass * createRISCVMergeBaseOffsetOptPass()
Returns an instance of the Merge Base Offset Optimization pass.
FunctionPass * createRISCVPostLegalizerCombiner()
LLVM_ABI void initializeMachineKCFILegacyPass(PassRegistry &)
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)
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.
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 &)
FunctionPass * createRISCVPreAllocZilsdOptPass()
FunctionPass * createRISCVPushPopOptimizationPass()
createRISCVPushPopOptimizationPass - returns an instance of the Push/Pop optimization pass.
FunctionPass * createRISCVFoldMemOffsetLegacyPass()
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 FunctionPass * createLoopDataPrefetchPass()
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
void initializeRISCVInsertReadWriteCSRPass(PassRegistry &)
FunctionPass * createRISCVPreLegalizerCombiner()
FunctionPass * createRISCVVMV0EliminationPass()
void initializeRISCVExpandPseudoPreRALegacyPass(PassRegistry &)
FunctionPass * createRISCVInsertVSETVLIPass()
Returns an instance of the Insert VSETVLI pass.
FunctionPass * createRISCVO0PreLegalizerCombiner()
CodeGenOptLevel
Code generation optimization level.
void initializeRISCVVLOptimizerLegacyPass(PassRegistry &)
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
FunctionPass * createRISCVIndirectBranchTrackingPass()
@ Global
Append to llvm.global_dtors.
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 &)
void initializeRISCVVectorPeepholeLegacyPass(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 &)
FunctionPass * createRISCVLateBranchOptPass()
Target & getTheRISCV64Target()
FunctionPass * createRISCVExpandPseudoPreRALegacyPass()
ModulePass * createRISCVPromoteConstantPass()
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 &)
void initializeRISCVOptWInstrsLegacyPass(PassRegistry &)
void initializeRISCVGatherScatterLoweringLegacyPass(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.
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)
FunctionPass * createRISCVVLOptimizerLegacyPass()
void initializeRISCVExpandPseudoPostRALegacyPass(PassRegistry &)
void initializeRISCVPreAllocZilsdOptPass(PassRegistry &)
Target & getTheRISCV32beTarget()
void initializeRISCVPostLegalizerCombinerPass(PassRegistry &)
void initializeRISCVMoveMergePass(PassRegistry &)
FunctionPass * createRISCVQCRelaxMarkingPass()
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.