LLVM 22.0.0git
|
#include "Target/RISCV/RISCVSubtarget.h"
Public Types | |
enum | RISCVProcFamilyEnum : uint8_t { Others , SiFive7 , VentanaVeyron , MIPSP8700 , Andes45 } |
enum | RISCVVRGatherCostModelEnum : uint8_t { Quadratic , NLog2N } |
Protected Member Functions | |
unsigned | getMaxRVVVectorSizeInBits () const |
unsigned | getMinRVVVectorSizeInBits () const |
Protected Attributes | |
std::unique_ptr< const SelectionDAGTargetInfo > | TSInfo |
std::unique_ptr< CallLowering > | CallLoweringInfo |
std::unique_ptr< InstructionSelector > | InstSelector |
std::unique_ptr< LegalizerInfo > | Legalizer |
std::unique_ptr< RISCVRegisterBankInfo > | RegBankInfo |
Definition at line 79 of file RISCVSubtarget.h.
Enumerator | |
---|---|
Others | |
SiFive7 | |
VentanaVeyron | |
MIPSP8700 | |
Andes45 |
Definition at line 82 of file RISCVSubtarget.h.
Enumerator | |
---|---|
Quadratic | |
NLog2N |
Definition at line 89 of file RISCVSubtarget.h.
RISCVSubtarget::RISCVSubtarget | ( | const Triple & | TT, |
StringRef | CPU, | ||
StringRef | TuneCPU, | ||
StringRef | FS, | ||
StringRef | ABIName, | ||
unsigned | RVVVectorBitsMin, | ||
unsigned | RVVVectorLMULMax, | ||
const TargetMachine & | TM ) |
Definition at line 98 of file RISCVSubtarget.cpp.
References TSInfo.
|
overridedefault |
|
override |
Definition at line 204 of file RISCVSubtarget.cpp.
|
inlineoverride |
Definition at line 149 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 151 of file RISCVSubtarget.h.
|
override |
Definition at line 202 of file RISCVSubtarget.cpp.
|
inlineoverride |
Definition at line 389 of file RISCVSubtarget.h.
|
inline |
If the ElementCount or TypeSize X
is scalable and VScale (VLEN) is exactly known, returns X
converted to a fixed quantity.
Otherwise returns X
unmodified.
Definition at line 264 of file RISCVSubtarget.h.
References getRealVLen(), llvm::RISCV::RVVBitsPerBlock, and X.
|
inlineoverride |
Definition at line 374 of file RISCVSubtarget.h.
|
override |
Definition at line 117 of file RISCVSubtarget.cpp.
References CallLoweringInfo, and getTargetLowering().
|
inline |
Definition at line 324 of file RISCVSubtarget.h.
|
inline |
Definition at line 241 of file RISCVSubtarget.h.
References assert(), hasVInstructions(), and hasVInstructionsI64().
Referenced by combineBinOpOfExtractToReduceTree(), getContainerForFixedLengthVector(), getWideningInterleave(), isInterleaveShuffle(), lowerBuildVectorOfConstants(), lowerBuildVectorViaPacking(), lowerGetVectorLength(), lowerVECTOR_SHUFFLE(), performVECTOR_SHUFFLECombine(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 232 of file RISCVSubtarget.h.
Referenced by lowerBUILD_VECTOR().
|
inlineoverride |
Definition at line 138 of file RISCVSubtarget.h.
Referenced by llvm::RISCVMachineFunctionInfo::RISCVMachineFunctionInfo().
|
inlineoverride |
Definition at line 141 of file RISCVSubtarget.h.
Referenced by emitFROUND(), EmitLoweredCascadedSelect(), emitSelectPseudo(), llvm::RISCVCallLowering::lowerCall(), lowerRISCVVMachineInstrToMCInst(), and llvm::RISCVRegisterInfo::lowerSegmentSpillReload().
|
override |
Definition at line 123 of file RISCVSubtarget.cpp.
References llvm::createRISCVInstructionSelector(), getRegBankInfo(), and InstSelector.
|
override |
Definition at line 132 of file RISCVSubtarget.cpp.
References Legalizer.
unsigned RISCVSubtarget::getMaxBuildIntsCost | ( | ) | const |
Definition at line 148 of file RISCVSubtarget.cpp.
References RISCVMaxBuildIntsCost.
Referenced by lowerConstant().
|
inline |
Definition at line 402 of file RISCVSubtarget.h.
|
inline |
Definition at line 297 of file RISCVSubtarget.h.
References hasVInstructions().
unsigned RISCVSubtarget::getMaxLMULForFixedLengthVectors | ( | ) | const |
Definition at line 188 of file RISCVSubtarget.cpp.
References assert(), llvm::bit_floor(), llvm::has_single_bit(), hasVInstructions(), and RVVVectorLMULMax.
Referenced by combineVectorSizedSetCCEquality(), and useRVVForFixedLengthVectorVT().
Definition at line 416 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 386 of file RISCVSubtarget.h.
|
protected |
Definition at line 159 of file RISCVSubtarget.cpp.
References assert(), hasVInstructions(), and llvm::report_fatal_error().
Referenced by getRealMaxVLen().
Definition at line 406 of file RISCVSubtarget.h.
Definition at line 411 of file RISCVSubtarget.h.
Definition at line 397 of file RISCVSubtarget.h.
unsigned RISCVSubtarget::getMinimumJumpTableEntries | ( | ) | const |
Definition at line 212 of file RISCVSubtarget.cpp.
References RISCVMinimumJumpTableEntries.
|
inlineoverride |
Definition at line 380 of file RISCVSubtarget.h.
|
protected |
Definition at line 172 of file RISCVSubtarget.cpp.
References assert(), hasVInstructions(), and llvm::report_fatal_error().
Referenced by getRealMinVLen(), and useRVVForFixedLengthVectors().
|
inline |
Definition at line 421 of file RISCVSubtarget.h.
Referenced by overridePostRASchedPolicy().
|
inlineoverride |
Definition at line 377 of file RISCVSubtarget.h.
|
inline |
Definition at line 153 of file RISCVSubtarget.h.
|
inline |
Definition at line 156 of file RISCVSubtarget.h.
|
inline |
Returns RISC-V 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 164 of file RISCVSubtarget.h.
|
inline |
Definition at line 249 of file RISCVSubtarget.h.
References getMaxRVVVectorSizeInBits().
Referenced by combineToVCPOP(), and getRealVLen().
|
inline |
Definition at line 245 of file RISCVSubtarget.h.
References getMinRVVVectorSizeInBits().
Referenced by combineVectorSizedSetCCEquality(), getContainerForFixedLengthVector(), getRealVLen(), getSmallestVTForIndex(), isValidEGW(), lowerBuildVectorOfConstants(), lowerVECTOR_SHUFFLE(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 254 of file RISCVSubtarget.h.
References getRealMaxVLen(), and getRealMinVLen().
Referenced by expandVScale(), lowerBUILD_VECTOR(), llvm::RISCVRegisterInfo::lowerSegmentSpillReload(), lowerShuffleViaVRegSplitting(), and lowerVECTOR_SHUFFLE().
|
override |
Definition at line 138 of file RISCVSubtarget.cpp.
References RegBankInfo.
Referenced by getInstructionSelector(), and llvm::RISCVCallLowering::lowerCall().
|
inlineoverride |
Definition at line 142 of file RISCVSubtarget.h.
Referenced by isConvertibleToVMV_V_V(), llvm::RISCVCallLowering::lowerCall(), lowerRISCVVMachineInstrToMCInst(), llvm::RISCVRegisterInfo::lowerSegmentSpillReload(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
override |
Definition at line 113 of file RISCVSubtarget.cpp.
References TSInfo.
|
inline |
Definition at line 393 of file RISCVSubtarget.h.
|
inline |
Definition at line 272 of file RISCVSubtarget.h.
Referenced by llvm::CC_RISCV(), llvm::CC_RISCV_FastCC(), and CC_RISCVAssign2XLen().
|
inlineoverride |
Definition at line 145 of file RISCVSubtarget.h.
Referenced by llvm::CC_RISCV(), llvm::CC_RISCV_FastCC(), getCallLowering(), isLegalBitRotate(), and lowerBitreverseShuffle().
|
inline |
Definition at line 166 of file RISCVSubtarget.h.
|
inline |
Definition at line 227 of file RISCVSubtarget.h.
References is64Bit().
Referenced by llvm::CC_RISCV(), llvm::CC_RISCV_FastCC(), combineSelectAndUse(), combineVectorSizedSetCCEquality(), lowerBuildVectorOfConstants(), lowerBuildVectorViaPacking(), lowerFABSorFNEG(), lowerFCOPYSIGN(), performBITREVERSECombine(), transformAddImmMulImm(), and transformAddShlImm().
|
inline |
Definition at line 224 of file RISCVSubtarget.h.
References is64Bit().
Referenced by buildDefaultVLOps(), llvm::CC_RISCV(), llvm::CC_RISCV_FastCC(), combine_CC(), combineShlAddIAdd(), combineSubShiftToOrcB(), combineToVCPOP(), combineVectorSizedSetCCEquality(), expandMul(), getDefaultScalableVLOps(), getDefaultVLOps(), getVSlidedown(), getVSlideup(), getWideningInterleave(), lowerBUILD_VECTOR(), lowerBuildVectorOfConstants(), lowerBuildVectorViaDominantValues(), lowerBuildVectorViaPacking(), lowerCttzElts(), lowerDisjointIndicesShuffle(), lowerFABSorFNEG(), lowerFCOPYSIGN(), lowerFixedVectorSegLoadIntrinsics(), lowerFixedVectorSegStoreIntrinsics(), lowerFMAXIMUM_FMINIMUM(), lowerFP_TO_INT_SAT(), lowerFTRUNC_FCEIL_FFLOOR_FROUND(), lowerGetVectorLength(), lowerReductionSeq(), lowerScalarInsert(), lowerScalarSplat(), lowerVECTOR_SHUFFLE(), lowerVECTOR_SHUFFLEAsVRGatherVX(), lowerVECTOR_SHUFFLEAsVSlide1(), lowerVECTOR_SHUFFLEAsVSlidedown(), lowerVECTOR_SHUFFLEAsVSlideup(), lowerVectorFTRUNC_FCEIL_FFLOOR_FROUND(), lowerVectorIntrinsicScalars(), lowerVectorStrictFTRUNC_FCEIL_FFLOOR_FROUND(), lowerVectorXRINT_XROUND(), lowerVZIP(), matchSplatAsGather(), performCONCAT_VECTORSCombine(), performFP_TO_INT_SATCombine(), performFP_TO_INTCombine(), performSRACombine(), performVECTOR_SHUFFLECombine(), performVP_REVERSECombine(), performVP_STORECombine(), promoteVCIXScalar(), selectVSplatImmHelper(), and tryMemPairCombine().
|
inline |
Definition at line 203 of file RISCVSubtarget.h.
Referenced by useInversedSetcc().
|
inline |
Definition at line 189 of file RISCVSubtarget.h.
|
inline |
Definition at line 209 of file RISCVSubtarget.h.
Referenced by combineSelectAndUse(), lowerSelectToBinOp(), and performSELECTCombine().
|
inline |
Definition at line 196 of file RISCVSubtarget.h.
|
inline |
Definition at line 193 of file RISCVSubtarget.h.
|
inline |
Definition at line 205 of file RISCVSubtarget.h.
Referenced by combineSelectAndUse(), lowerSelectToBinOp(), and useInversedSetcc().
|
inline |
Definition at line 185 of file RISCVSubtarget.h.
Definition at line 301 of file RISCVSubtarget.h.
References llvm_unreachable.
|
inline |
Definition at line 199 of file RISCVSubtarget.h.
|
inline |
Definition at line 215 of file RISCVSubtarget.h.
Referenced by combineShlAddIAdd(), expandMul(), isWorthFoldingIntoRegRegScale(), lowerSelectToBinOp(), and transformAddShlImm().
|
inline |
Definition at line 173 of file RISCVSubtarget.h.
References hasStdExtCOrZca().
Referenced by hasStdExtCOrZca().
|
inline |
Definition at line 174 of file RISCVSubtarget.h.
Referenced by isCompressibleLoad(), and isCompressibleStore().
|
inline |
Definition at line 175 of file RISCVSubtarget.h.
Referenced by isCompressibleLoad(), and isCompressibleStore().
|
inline |
Definition at line 180 of file RISCVSubtarget.h.
|
inline |
Definition at line 179 of file RISCVSubtarget.h.
|
inline |
Definition at line 182 of file RISCVSubtarget.h.
|
inline |
Definition at line 181 of file RISCVSubtarget.h.
Referenced by lowerFP_TO_INT(), lowerFP_TO_INT_SAT(), and lowerINT_TO_FP().
|
inline |
Definition at line 178 of file RISCVSubtarget.h.
|
inline |
Definition at line 287 of file RISCVSubtarget.h.
Referenced by llvm::RISCVCallLowering::canLowerReturn(), combineBinOpOfExtractToReduceTree(), combineVectorSizedSetCCEquality(), getELen(), getMaxInterleaveFactor(), getMaxLMULForFixedLengthVectors(), getMaxRVVVectorSizeInBits(), getMinRVVVectorSizeInBits(), getScavSlotsNumForRVV(), isSupportedArgumentType(), isSupportedReturnType(), lowerVectorIntrinsicScalars(), reverseZExtICmpCombine(), and useRVVForFixedLengthVectors().
|
inline |
Definition at line 295 of file RISCVSubtarget.h.
References hasVInstructionsF32().
|
inline |
Definition at line 291 of file RISCVSubtarget.h.
Referenced by isLegalElementTypeForRVV(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 290 of file RISCVSubtarget.h.
Referenced by isLegalElementTypeForRVV(), isPromotedOpNeedingSplit(), and lowerVECTOR_SHUFFLEAsVSlide1().
|
inline |
Definition at line 289 of file RISCVSubtarget.h.
Referenced by isPromotedOpNeedingSplit(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 292 of file RISCVSubtarget.h.
Referenced by hasVInstructionsAnyF(), isLegalElementTypeForRVV(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 293 of file RISCVSubtarget.h.
Referenced by isLegalElementTypeForRVV(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 296 of file RISCVSubtarget.h.
|
inline |
Definition at line 288 of file RISCVSubtarget.h.
Referenced by getELen(), isLegalElementTypeForRVV(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 223 of file RISCVSubtarget.h.
Referenced by llvm::CC_RISCV_FastCC(), llvm::CC_RISCV_GHC(), emitFROUND(), getPACKOpcode(), getXLen(), getXLenVT(), isCompressibleLoad(), isCompressibleStore(), isLegalElementTypeForRVV(), lowerBuildVectorOfConstants(), performANDCombine(), performSETCCCombine(), performSIGN_EXTEND_INREGCombine(), performTRUNCATECombine(), performXORCombine(), and selectConstantAddr().
Definition at line 278 of file RISCVSubtarget.h.
References assert(), and llvm::Register::id().
|
inline |
Definition at line 273 of file RISCVSubtarget.h.
References llvm::RISCVABI::ABI_ILP32, llvm::RISCVABI::ABI_ILP32E, and llvm::RISCVABI::ABI_LP64.
|
inline |
Definition at line 354 of file RISCVSubtarget.h.
|
inline |
Definition at line 355 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 284 of file RISCVSubtarget.h.
|
override |
Definition at line 234 of file RISCVSubtarget.cpp.
References llvm::MISched::Bidirectional, llvm::MISched::BottomUp, getPostRASchedDirection(), llvm::MachineSchedPolicy::OnlyBottomUp, llvm::MachineSchedPolicy::OnlyTopDown, and llvm::MISched::TopDown.
|
override |
Definition at line 218 of file RISCVSubtarget.cpp.
References llvm::MachineSchedPolicy::DisableLatencyHeuristic, llvm::MachineSchedPolicy::OnlyBottomUp, llvm::MachineSchedPolicy::OnlyTopDown, and llvm::MachineSchedPolicy::ShouldTrackPressure.
void llvm::RISCVSubtarget::ParseSubtargetFeatures | ( | StringRef | CPU, |
StringRef | TuneCPU, | ||
StringRef | FS ) |
|
override |
Enable use of alias analysis during code generation (during MI scheduling, DAGCombine, etc.).
Definition at line 210 of file RISCVSubtarget.cpp.
References UseAA.
bool RISCVSubtarget::useCCMovInsn | ( | ) | const |
Definition at line 253 of file RISCVSubtarget.cpp.
References UseCCMovInsn.
bool RISCVSubtarget::useConstantPoolForLargeInts | ( | ) | const |
Definition at line 144 of file RISCVSubtarget.cpp.
References RISCVDisableUsingConstantPoolForLargeInts.
Referenced by lowerConstant().
|
inlineoverride |
Definition at line 370 of file RISCVSubtarget.h.
bool RISCVSubtarget::useLoadStorePairs | ( | ) | const |
Definition at line 249 of file RISCVSubtarget.cpp.
References UseMIPSLoadStorePairsOpt.
bool RISCVSubtarget::useRVVForFixedLengthVectors | ( | ) | const |
Definition at line 197 of file RISCVSubtarget.cpp.
References getMinRVVVectorSizeInBits(), hasVInstructions(), and llvm::RISCV::RVVBitsPerBlock.
Referenced by useRVVForFixedLengthVectorVT().
|
mutableprotected |
Definition at line 335 of file RISCVSubtarget.h.
Referenced by getCallLowering().
|
mutableprotected |
Definition at line 336 of file RISCVSubtarget.h.
Referenced by getInstructionSelector().
|
mutableprotected |
Definition at line 337 of file RISCVSubtarget.h.
Referenced by getLegalizerInfo().
|
mutableprotected |
Definition at line 338 of file RISCVSubtarget.h.
Referenced by getRegBankInfo().
|
protected |
Definition at line 332 of file RISCVSubtarget.h.
Referenced by getSelectionDAGInfo(), and RISCVSubtarget().