LLVM  15.0.0git
Public Types | Public 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 hasStdExtZba () const
 
bool hasStdExtZbb () const
 
bool hasStdExtZbc () const
 
bool hasStdExtZbe () const
 
bool hasStdExtZbf () const
 
bool hasStdExtZbm () const
 
bool hasStdExtZbp () const
 
bool hasStdExtZbr () const
 
bool hasStdExtZbs () const
 
bool hasStdExtZbt () 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 is64Bit () const
 
bool isRV32E () const
 
bool enableLinkerRelax () const
 
bool enableRVCHintInstrs () const
 
bool enableSaveRestore () const
 
MVT getXLenVT () const
 
unsigned getXLen () const
 
unsigned getFLen () const
 
unsigned getELEN () const
 
unsigned getMinVLen () const
 
unsigned getMaxVLen () const
 
unsigned getRealMinVLen () const
 
unsigned getRealMaxVLen () const
 
RISCVABI::ABI getTargetABI () const
 
bool isRegisterReservedByUser (Register i) 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 getMaxRVVVectorSizeInBits () const
 
unsigned getMinRVVVectorSizeInBits () const
 
unsigned getMaxLMULForFixedLengthVectors () const
 
bool useRVVForFixedLengthVectors () const
 
bool enableSubRegLiveness () const override
 

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

◆ enableLinkerRelax()

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

Definition at line 180 of file RISCVSubtarget.h.

◆ enableMachineScheduler()

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

Definition at line 136 of file RISCVSubtarget.h.

◆ enableRVCHintInstrs()

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

Definition at line 181 of file RISCVSubtarget.h.

◆ enableSaveRestore()

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

Definition at line 182 of file RISCVSubtarget.h.

◆ enableSubRegLiveness()

bool RISCVSubtarget::enableSubRegLiveness ( ) const
override

Definition at line 203 of file RISCVSubtarget.cpp.

References EnableSubRegLiveness.

◆ getCallLowering()

const CallLowering * RISCVSubtarget::getCallLowering ( ) const
override

Definition at line 105 of file RISCVSubtarget.cpp.

References CallLoweringInfo.

◆ getELEN()

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

◆ getFLen()

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

Definition at line 185 of file RISCVSubtarget.h.

◆ getFrameLowering()

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

Definition at line 123 of file RISCVSubtarget.h.

◆ getInstrInfo()

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

◆ getInstructionSelector()

InstructionSelector * RISCVSubtarget::getInstructionSelector ( ) const
override

Definition at line 109 of file RISCVSubtarget.cpp.

References InstSelector.

◆ getLegalizerInfo()

const LegalizerInfo * RISCVSubtarget::getLegalizerInfo ( ) const
override

Definition at line 113 of file RISCVSubtarget.cpp.

◆ getMaxBuildIntsCost()

unsigned RISCVSubtarget::getMaxBuildIntsCost ( ) const

Definition at line 125 of file RISCVSubtarget.cpp.

References RISCVMaxBuildIntsCost.

Referenced by selectImm().

◆ getMaxInterleaveFactor()

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

Definition at line 224 of file RISCVSubtarget.h.

References hasVInstructions().

◆ getMaxLMULForFixedLengthVectors()

unsigned RISCVSubtarget::getMaxLMULForFixedLengthVectors ( ) const

◆ getMaxRVVVectorSizeInBits()

unsigned RISCVSubtarget::getMaxRVVVectorSizeInBits ( ) const

◆ getMaxVLen()

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

Definition at line 199 of file RISCVSubtarget.h.

Referenced by getRealMaxVLen().

◆ getMinRVVVectorSizeInBits()

unsigned RISCVSubtarget::getMinRVVVectorSizeInBits ( ) const

◆ getMinVLen()

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

◆ 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 142 of file RISCVSubtarget.h.

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

◆ getRealMaxVLen()

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

Definition at line 204 of file RISCVSubtarget.h.

References getMaxRVVVectorSizeInBits(), and getMaxVLen().

Referenced by lowerVectorIntrinsicScalars().

◆ getRealMinVLen()

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

Definition at line 200 of file RISCVSubtarget.h.

References getMinRVVVectorSizeInBits(), and getMinVLen().

Referenced by lowerVectorIntrinsicScalars().

◆ getRegBankInfo()

const RegisterBankInfo * RISCVSubtarget::getRegBankInfo ( ) const
override

Definition at line 117 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 133 of file RISCVSubtarget.h.

◆ getTargetABI()

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

◆ getTargetLowering()

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

Definition at line 130 of file RISCVSubtarget.h.

Referenced by RISCVSubtarget(), and selectImmWithConstantPool().

◆ getXLen()

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

◆ getXLenVT()

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

◆ hasStdExtA()

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

Definition at line 145 of file RISCVSubtarget.h.

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

◆ hasStdExtC()

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

Definition at line 148 of file RISCVSubtarget.h.

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

◆ 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 149 of file RISCVSubtarget.h.

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

◆ hasStdExtZba()

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

◆ hasStdExtZbb()

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

◆ hasStdExtZbc()

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

Definition at line 153 of file RISCVSubtarget.h.

◆ hasStdExtZbe()

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

Definition at line 154 of file RISCVSubtarget.h.

◆ hasStdExtZbf()

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

Definition at line 155 of file RISCVSubtarget.h.

◆ hasStdExtZbkb()

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

◆ hasStdExtZbkc()

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

Definition at line 170 of file RISCVSubtarget.h.

◆ hasStdExtZbkx()

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

Definition at line 171 of file RISCVSubtarget.h.

◆ hasStdExtZbm()

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

Definition at line 156 of file RISCVSubtarget.h.

◆ hasStdExtZbp()

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

◆ hasStdExtZbr()

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

Definition at line 158 of file RISCVSubtarget.h.

◆ hasStdExtZbs()

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

◆ hasStdExtZbt()

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

◆ hasStdExtZdinx()

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

Definition at line 166 of file RISCVSubtarget.h.

◆ hasStdExtZfh()

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

◆ hasStdExtZfhmin()

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

Definition at line 163 of file RISCVSubtarget.h.

◆ hasStdExtZfinx()

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

Definition at line 165 of file RISCVSubtarget.h.

◆ hasStdExtZhinx()

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

Definition at line 168 of file RISCVSubtarget.h.

◆ hasStdExtZhinxmin()

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

Definition at line 167 of file RISCVSubtarget.h.

◆ hasStdExtZihintpause()

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

Definition at line 150 of file RISCVSubtarget.h.

◆ hasStdExtZknd()

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

Definition at line 172 of file RISCVSubtarget.h.

◆ hasStdExtZkne()

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

Definition at line 173 of file RISCVSubtarget.h.

◆ hasStdExtZknh()

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

Definition at line 174 of file RISCVSubtarget.h.

◆ hasStdExtZkr()

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

Definition at line 177 of file RISCVSubtarget.h.

◆ hasStdExtZksed()

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

Definition at line 175 of file RISCVSubtarget.h.

◆ hasStdExtZksh()

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

Definition at line 176 of file RISCVSubtarget.h.

◆ hasStdExtZvfh()

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

Definition at line 162 of file RISCVSubtarget.h.

◆ hasStdExtZvl()

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

Definition at line 161 of file RISCVSubtarget.h.

◆ hasVInstructions()

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

◆ hasVInstructionsAnyF()

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

Definition at line 223 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 179 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 121 of file RISCVSubtarget.cpp.

References RISCVDisableUsingConstantPoolForLargeInts.

Referenced by selectImm().

◆ useRVVForFixedLengthVectors()

bool RISCVSubtarget::useRVVForFixedLengthVectors ( ) const

Member Data Documentation

◆ CallLoweringInfo

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

Definition at line 230 of file RISCVSubtarget.h.

Referenced by getCallLowering(), and RISCVSubtarget().

◆ InstSelector

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

Definition at line 231 of file RISCVSubtarget.h.

Referenced by getInstructionSelector(), and RISCVSubtarget().

◆ Legalizer

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

Definition at line 232 of file RISCVSubtarget.h.

◆ RegBankInfo

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

Definition at line 233 of file RISCVSubtarget.h.

Referenced by getRegBankInfo(), and RISCVSubtarget().


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