LLVM  16.0.0git
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::RISCVSubtarget Class Reference

#include "Target/RISCV/RISCVSubtarget.h"

Inheritance diagram for llvm::RISCVSubtarget:
Inheritance graph
[legend]
Collaboration diagram for llvm::RISCVSubtarget:
Collaboration graph
[legend]

Public Types

enum  RISCVProcFamilyEnum : uint8_t { Others, SiFive7 }
 

Public Member Functions

 RISCVSubtarget (const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName, const TargetMachine &TM)
 
void ParseSubtargetFeatures (StringRef CPU, StringRef TuneCPU, StringRef FS)
 
const RISCVFrameLoweringgetFrameLowering () const override
 
const RISCVInstrInfogetInstrInfo () const override
 
const RISCVRegisterInfogetRegisterInfo () const override
 
const RISCVTargetLoweringgetTargetLowering () const override
 
const SelectionDAGTargetInfogetSelectionDAGInfo () const override
 
bool enableMachineScheduler () const override
 
RISCVProcFamilyEnum getProcFamily () const
 Returns RISCV processor family. More...
 
bool hasStdExtM () const
 
bool hasStdExtA () const
 
bool hasStdExtF () const
 
bool hasStdExtD () const
 
bool hasStdExtC () const
 
bool hasStdExtV () const
 
bool hasStdExtZihintpause () const
 
bool hasStdExtZihintntl () const
 
bool hasStdExtZba () const
 
bool hasStdExtZbb () const
 
bool hasStdExtZbc () const
 
bool hasStdExtZbs () const
 
bool hasStdExtZca () const
 
bool hasStdExtZvl () const
 
bool hasStdExtZvfh () const
 
bool hasStdExtZfhmin () const
 
bool hasStdExtZfh () const
 
bool hasStdExtZfinx () const
 
bool hasStdExtZdinx () const
 
bool hasStdExtZhinxmin () const
 
bool hasStdExtZhinx () const
 
bool hasStdExtZbkb () const
 
bool hasStdExtZbkc () const
 
bool hasStdExtZbkx () const
 
bool hasStdExtZknd () const
 
bool hasStdExtZkne () const
 
bool hasStdExtZknh () const
 
bool hasStdExtZksed () const
 
bool hasStdExtZksh () const
 
bool hasStdExtZkr () const
 
bool hasStdExtZicbom () const
 
bool hasStdExtZicboz () const
 
bool hasStdExtZicbop () const
 
bool hasStdExtZawrs () const
 
bool hasStdExtZmmul () const
 
bool hasStdExtZtso () const
 
bool is64Bit () const
 
bool isRV32E () const
 
bool enableLinkerRelax () const
 
bool enableRVCHintInstrs () const
 
bool enableDefaultUnroll () const
 
bool enableSaveRestore () const
 
bool enableUnalignedScalarMem () const
 
bool hasLUIADDIFusion () const
 
bool hasForcedAtomics () const
 
MVT getXLenVT () const
 
unsigned getXLen () const
 
unsigned getFLen () const
 
unsigned getELEN () const
 
unsigned getRealMinVLen () const
 
unsigned getRealMaxVLen () const
 
RISCVABI::ABI getTargetABI () const
 
bool isRegisterReservedByUser (Register i) const
 
bool hasMacroFusion () const
 
bool hasVInstructions () const
 
bool hasVInstructionsI64 () const
 
bool hasVInstructionsF16 () const
 
bool hasVInstructionsF32 () const
 
bool hasVInstructionsF64 () const
 
bool hasVInstructionsAnyF () const
 
unsigned getMaxInterleaveFactor () const
 
const CallLoweringgetCallLowering () const override
 
InstructionSelectorgetInstructionSelector () const override
 
const LegalizerInfogetLegalizerInfo () const override
 
const RegisterBankInfogetRegBankInfo () const override
 
bool useConstantPoolForLargeInts () const
 
unsigned getMaxBuildIntsCost () const
 
unsigned getMaxLMULForFixedLengthVectors () const
 
bool useRVVForFixedLengthVectors () const
 
bool enableSubRegLiveness () const override
 
void getPostRAMutations (std::vector< std::unique_ptr< ScheduleDAGMutation >> &Mutations) const override
 

Protected Member Functions

unsigned getMaxRVVVectorSizeInBits () const
 
unsigned getMinRVVVectorSizeInBits () const
 
unsigned getArchMinVLen () const
 
unsigned getArchMaxVLen () const
 

Protected Attributes

std::unique_ptr< CallLoweringCallLoweringInfo
 
std::unique_ptr< InstructionSelectorInstSelector
 
std::unique_ptr< LegalizerInfoLegalizer
 
std::unique_ptr< RegisterBankInfoRegBankInfo
 

Detailed Description

Definition at line 35 of file RISCVSubtarget.h.

Member Enumeration Documentation

◆ RISCVProcFamilyEnum

Enumerator
Others 
SiFive7 

Definition at line 37 of file RISCVSubtarget.h.

Constructor & Destructor Documentation

◆ RISCVSubtarget()

RISCVSubtarget::RISCVSubtarget ( const Triple TT,
StringRef  CPU,
StringRef  TuneCPU,
StringRef  FS,
StringRef  ABIName,
const TargetMachine TM 
)

Member Function Documentation

◆ enableDefaultUnroll()

bool llvm::RISCVSubtarget::enableDefaultUnroll ( ) const
inline

Definition at line 191 of file RISCVSubtarget.h.

Referenced by llvm::RISCVTTIImpl::getUnrollingPreferences().

◆ enableLinkerRelax()

bool llvm::RISCVSubtarget::enableLinkerRelax ( ) const
inline

Definition at line 189 of file RISCVSubtarget.h.

◆ enableMachineScheduler()

bool llvm::RISCVSubtarget::enableMachineScheduler ( ) const
inlineoverride

Definition at line 143 of file RISCVSubtarget.h.

◆ enableRVCHintInstrs()

bool llvm::RISCVSubtarget::enableRVCHintInstrs ( ) const
inline

Definition at line 190 of file RISCVSubtarget.h.

◆ enableSaveRestore()

bool llvm::RISCVSubtarget::enableSaveRestore ( ) const
inline

Definition at line 192 of file RISCVSubtarget.h.

◆ enableSubRegLiveness()

bool RISCVSubtarget::enableSubRegLiveness ( ) const
override

Definition at line 204 of file RISCVSubtarget.cpp.

References EnableSubRegLiveness.

◆ enableUnalignedScalarMem()

bool llvm::RISCVSubtarget::enableUnalignedScalarMem ( ) const
inline

◆ getArchMaxVLen()

unsigned llvm::RISCVSubtarget::getArchMaxVLen ( ) const
inlineprotected

Definition at line 258 of file RISCVSubtarget.h.

Referenced by getRealMaxVLen().

◆ getArchMinVLen()

unsigned llvm::RISCVSubtarget::getArchMinVLen ( ) const
inlineprotected

Definition at line 257 of file RISCVSubtarget.h.

Referenced by getRealMinVLen().

◆ getCallLowering()

const CallLowering * RISCVSubtarget::getCallLowering ( ) const
override

Definition at line 106 of file RISCVSubtarget.cpp.

References CallLoweringInfo.

◆ getELEN()

unsigned llvm::RISCVSubtarget::getELEN ( ) const
inline

◆ getFLen()

unsigned llvm::RISCVSubtarget::getFLen ( ) const
inline

Definition at line 198 of file RISCVSubtarget.h.

◆ getFrameLowering()

const RISCVFrameLowering* llvm::RISCVSubtarget::getFrameLowering ( ) const
inlineoverride

Definition at line 130 of file RISCVSubtarget.h.

◆ getInstrInfo()

const RISCVInstrInfo* llvm::RISCVSubtarget::getInstrInfo ( ) const
inlineoverride

◆ getInstructionSelector()

InstructionSelector * RISCVSubtarget::getInstructionSelector ( ) const
override

Definition at line 110 of file RISCVSubtarget.cpp.

References InstSelector.

◆ getLegalizerInfo()

const LegalizerInfo * RISCVSubtarget::getLegalizerInfo ( ) const
override

Definition at line 114 of file RISCVSubtarget.cpp.

◆ getMaxBuildIntsCost()

unsigned RISCVSubtarget::getMaxBuildIntsCost ( ) const

◆ getMaxInterleaveFactor()

unsigned llvm::RISCVSubtarget::getMaxInterleaveFactor ( ) const
inline

Definition at line 237 of file RISCVSubtarget.h.

References hasVInstructions().

◆ getMaxLMULForFixedLengthVectors()

unsigned RISCVSubtarget::getMaxLMULForFixedLengthVectors ( ) const

◆ getMaxRVVVectorSizeInBits()

unsigned RISCVSubtarget::getMaxRVVVectorSizeInBits ( ) const
protected

◆ getMinRVVVectorSizeInBits()

unsigned RISCVSubtarget::getMinRVVVectorSizeInBits ( ) const
protected

◆ getPostRAMutations()

void RISCVSubtarget::getPostRAMutations ( std::vector< std::unique_ptr< ScheduleDAGMutation >> &  Mutations) const
override

Definition at line 210 of file RISCVSubtarget.cpp.

References llvm::createRISCVMacroFusionDAGMutation().

◆ getProcFamily()

RISCVProcFamilyEnum llvm::RISCVSubtarget::getProcFamily ( ) const
inline

Returns RISCV processor family.

Avoid this function! CPU specifics should be kept local to this class and preferably modeled with SubtargetFeatures or properties in initializeProperties().

Definition at line 149 of file RISCVSubtarget.h.

◆ getRealMaxVLen()

unsigned llvm::RISCVSubtarget::getRealMaxVLen ( ) const
inline

◆ getRealMinVLen()

unsigned llvm::RISCVSubtarget::getRealMinVLen ( ) const
inline

◆ getRegBankInfo()

const RegisterBankInfo * RISCVSubtarget::getRegBankInfo ( ) const
override

Definition at line 118 of file RISCVSubtarget.cpp.

References RegBankInfo.

◆ getRegisterInfo()

const RISCVRegisterInfo* llvm::RISCVSubtarget::getRegisterInfo ( ) const
inlineoverride

◆ getSelectionDAGInfo()

const SelectionDAGTargetInfo* llvm::RISCVSubtarget::getSelectionDAGInfo ( ) const
inlineoverride

Definition at line 140 of file RISCVSubtarget.h.

◆ getTargetABI()

RISCVABI::ABI llvm::RISCVSubtarget::getTargetABI ( ) const
inline

◆ getTargetLowering()

const RISCVTargetLowering* llvm::RISCVSubtarget::getTargetLowering ( ) const
inlineoverride

Definition at line 137 of file RISCVSubtarget.h.

Referenced by RISCVSubtarget().

◆ getXLen()

unsigned llvm::RISCVSubtarget::getXLen ( ) const
inline

◆ getXLenVT()

MVT llvm::RISCVSubtarget::getXLenVT ( ) const
inline

◆ hasForcedAtomics()

bool llvm::RISCVSubtarget::hasForcedAtomics ( ) const
inline

◆ hasLUIADDIFusion()

bool llvm::RISCVSubtarget::hasLUIADDIFusion ( ) const
inline

Definition at line 194 of file RISCVSubtarget.h.

Referenced by hasMacroFusion().

◆ hasMacroFusion()

bool llvm::RISCVSubtarget::hasMacroFusion ( ) const
inline

Definition at line 225 of file RISCVSubtarget.h.

References hasLUIADDIFusion().

◆ hasStdExtA()

bool llvm::RISCVSubtarget::hasStdExtA ( ) const
inline

◆ hasStdExtC()

bool llvm::RISCVSubtarget::hasStdExtC ( ) const
inline

◆ hasStdExtD()

bool llvm::RISCVSubtarget::hasStdExtD ( ) const
inline

◆ hasStdExtF()

bool llvm::RISCVSubtarget::hasStdExtF ( ) const
inline

◆ hasStdExtM()

bool llvm::RISCVSubtarget::hasStdExtM ( ) const
inline

◆ hasStdExtV()

bool llvm::RISCVSubtarget::hasStdExtV ( ) const
inline

Definition at line 156 of file RISCVSubtarget.h.

Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().

◆ hasStdExtZawrs()

bool llvm::RISCVSubtarget::hasStdExtZawrs ( ) const
inline

Definition at line 184 of file RISCVSubtarget.h.

◆ hasStdExtZba()

bool llvm::RISCVSubtarget::hasStdExtZba ( ) const
inline

◆ hasStdExtZbb()

bool llvm::RISCVSubtarget::hasStdExtZbb ( ) const
inline

◆ hasStdExtZbc()

bool llvm::RISCVSubtarget::hasStdExtZbc ( ) const
inline

Definition at line 161 of file RISCVSubtarget.h.

◆ hasStdExtZbkb()

bool llvm::RISCVSubtarget::hasStdExtZbkb ( ) const
inline

◆ hasStdExtZbkc()

bool llvm::RISCVSubtarget::hasStdExtZbkc ( ) const
inline

Definition at line 173 of file RISCVSubtarget.h.

◆ hasStdExtZbkx()

bool llvm::RISCVSubtarget::hasStdExtZbkx ( ) const
inline

Definition at line 174 of file RISCVSubtarget.h.

◆ hasStdExtZbs()

bool llvm::RISCVSubtarget::hasStdExtZbs ( ) const
inline

◆ hasStdExtZca()

bool llvm::RISCVSubtarget::hasStdExtZca ( ) const
inline

Definition at line 163 of file RISCVSubtarget.h.

◆ hasStdExtZdinx()

bool llvm::RISCVSubtarget::hasStdExtZdinx ( ) const
inline

Definition at line 169 of file RISCVSubtarget.h.

◆ hasStdExtZfh()

bool llvm::RISCVSubtarget::hasStdExtZfh ( ) const
inline

◆ hasStdExtZfhmin()

bool llvm::RISCVSubtarget::hasStdExtZfhmin ( ) const
inline

Definition at line 166 of file RISCVSubtarget.h.

◆ hasStdExtZfinx()

bool llvm::RISCVSubtarget::hasStdExtZfinx ( ) const
inline

Definition at line 168 of file RISCVSubtarget.h.

◆ hasStdExtZhinx()

bool llvm::RISCVSubtarget::hasStdExtZhinx ( ) const
inline

Definition at line 171 of file RISCVSubtarget.h.

◆ hasStdExtZhinxmin()

bool llvm::RISCVSubtarget::hasStdExtZhinxmin ( ) const
inline

Definition at line 170 of file RISCVSubtarget.h.

◆ hasStdExtZicbom()

bool llvm::RISCVSubtarget::hasStdExtZicbom ( ) const
inline

Definition at line 181 of file RISCVSubtarget.h.

◆ hasStdExtZicbop()

bool llvm::RISCVSubtarget::hasStdExtZicbop ( ) const
inline

Definition at line 183 of file RISCVSubtarget.h.

◆ hasStdExtZicboz()

bool llvm::RISCVSubtarget::hasStdExtZicboz ( ) const
inline

Definition at line 182 of file RISCVSubtarget.h.

◆ hasStdExtZihintntl()

bool llvm::RISCVSubtarget::hasStdExtZihintntl ( ) const
inline

Definition at line 158 of file RISCVSubtarget.h.

◆ hasStdExtZihintpause()

bool llvm::RISCVSubtarget::hasStdExtZihintpause ( ) const
inline

Definition at line 157 of file RISCVSubtarget.h.

◆ hasStdExtZknd()

bool llvm::RISCVSubtarget::hasStdExtZknd ( ) const
inline

Definition at line 175 of file RISCVSubtarget.h.

◆ hasStdExtZkne()

bool llvm::RISCVSubtarget::hasStdExtZkne ( ) const
inline

Definition at line 176 of file RISCVSubtarget.h.

◆ hasStdExtZknh()

bool llvm::RISCVSubtarget::hasStdExtZknh ( ) const
inline

Definition at line 177 of file RISCVSubtarget.h.

◆ hasStdExtZkr()

bool llvm::RISCVSubtarget::hasStdExtZkr ( ) const
inline

Definition at line 180 of file RISCVSubtarget.h.

◆ hasStdExtZksed()

bool llvm::RISCVSubtarget::hasStdExtZksed ( ) const
inline

Definition at line 178 of file RISCVSubtarget.h.

◆ hasStdExtZksh()

bool llvm::RISCVSubtarget::hasStdExtZksh ( ) const
inline

Definition at line 179 of file RISCVSubtarget.h.

◆ hasStdExtZmmul()

bool llvm::RISCVSubtarget::hasStdExtZmmul ( ) const
inline

◆ hasStdExtZtso()

bool llvm::RISCVSubtarget::hasStdExtZtso ( ) const
inline

Definition at line 186 of file RISCVSubtarget.h.

◆ hasStdExtZvfh()

bool llvm::RISCVSubtarget::hasStdExtZvfh ( ) const
inline

Definition at line 165 of file RISCVSubtarget.h.

◆ hasStdExtZvl()

bool llvm::RISCVSubtarget::hasStdExtZvl ( ) const
inline

Definition at line 164 of file RISCVSubtarget.h.

◆ hasVInstructions()

bool llvm::RISCVSubtarget::hasVInstructions ( ) const
inline

◆ hasVInstructionsAnyF()

bool llvm::RISCVSubtarget::hasVInstructionsAnyF ( ) const
inline

Definition at line 236 of file RISCVSubtarget.h.

References hasVInstructionsF32().

◆ hasVInstructionsF16()

bool llvm::RISCVSubtarget::hasVInstructionsF16 ( ) const
inline

◆ hasVInstructionsF32()

bool llvm::RISCVSubtarget::hasVInstructionsF32 ( ) const
inline

◆ hasVInstructionsF64()

bool llvm::RISCVSubtarget::hasVInstructionsF64 ( ) const
inline

◆ hasVInstructionsI64()

bool llvm::RISCVSubtarget::hasVInstructionsI64 ( ) const
inline

◆ is64Bit()

bool llvm::RISCVSubtarget::is64Bit ( ) const
inline

◆ isRegisterReservedByUser()

bool llvm::RISCVSubtarget::isRegisterReservedByUser ( Register  i) const
inline

◆ isRV32E()

bool llvm::RISCVSubtarget::isRV32E ( ) const
inline

Definition at line 188 of file RISCVSubtarget.h.

Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().

◆ ParseSubtargetFeatures()

void llvm::RISCVSubtarget::ParseSubtargetFeatures ( StringRef  CPU,
StringRef  TuneCPU,
StringRef  FS 
)

◆ useConstantPoolForLargeInts()

bool RISCVSubtarget::useConstantPoolForLargeInts ( ) const

Definition at line 122 of file RISCVSubtarget.cpp.

References RISCVDisableUsingConstantPoolForLargeInts.

Referenced by lowerConstant().

◆ useRVVForFixedLengthVectors()

bool RISCVSubtarget::useRVVForFixedLengthVectors ( ) const

Member Data Documentation

◆ CallLoweringInfo

std::unique_ptr<CallLowering> llvm::RISCVSubtarget::CallLoweringInfo
protected

Definition at line 243 of file RISCVSubtarget.h.

Referenced by getCallLowering(), and RISCVSubtarget().

◆ InstSelector

std::unique_ptr<InstructionSelector> llvm::RISCVSubtarget::InstSelector
protected

Definition at line 244 of file RISCVSubtarget.h.

Referenced by getInstructionSelector(), and RISCVSubtarget().

◆ Legalizer

std::unique_ptr<LegalizerInfo> llvm::RISCVSubtarget::Legalizer
protected

Definition at line 245 of file RISCVSubtarget.h.

◆ RegBankInfo

std::unique_ptr<RegisterBankInfo> llvm::RISCVSubtarget::RegBankInfo
protected

Definition at line 246 of file RISCVSubtarget.h.

Referenced by getRegBankInfo(), and RISCVSubtarget().


The documentation for this class was generated from the following files: