LLVM 17.0.0git
|
#include "Target/RISCV/RISCVSubtarget.h"
Public Types | |
enum | RISCVProcFamilyEnum : uint8_t { Others , SiFive7 } |
Protected Member Functions | |
unsigned | getMaxRVVVectorSizeInBits () const |
unsigned | getMinRVVVectorSizeInBits () const |
Protected Attributes | |
std::unique_ptr< CallLowering > | CallLoweringInfo |
std::unique_ptr< InstructionSelector > | InstSelector |
std::unique_ptr< LegalizerInfo > | Legalizer |
std::unique_ptr< RegisterBankInfo > | RegBankInfo |
Definition at line 35 of file RISCVSubtarget.h.
enum llvm::RISCVSubtarget::RISCVProcFamilyEnum : uint8_t |
Enumerator | |
---|---|
Others | |
SiFive7 |
Definition at line 37 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 76 of file RISCVSubtarget.cpp.
References CallLoweringInfo, llvm::createRISCVInstructionSelector(), getRegisterInfo(), getTargetLowering(), InstrInfo, InstSelector, RegBankInfo, and TM.
|
inlineoverride |
Definition at line 99 of file RISCVSubtarget.h.
|
override |
Definition at line 168 of file RISCVSubtarget.cpp.
References EnableSubRegLiveness.
|
override |
Definition at line 95 of file RISCVSubtarget.cpp.
References CallLoweringInfo.
|
inline |
Definition at line 142 of file RISCVSubtarget.h.
References assert(), hasVInstructions(), and hasVInstructionsI64().
Referenced by llvm::RISCVTTIImpl::getArithmeticInstrCost(), llvm::RISCVTTIImpl::getArithmeticReductionCost(), llvm::RISCVTTIImpl::getCastInstrCost(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), getContainerForFixedLengthVector(), llvm::RISCVTTIImpl::getExtendedReductionCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::RISCVTTIImpl::getShuffleCost(), getWideningInterleave(), isDeinterleaveShuffle(), isInterleaveShuffle(), lowerBUILD_VECTOR(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 133 of file RISCVSubtarget.h.
Referenced by lowerBUILD_VECTOR().
|
inlineoverride |
Definition at line 86 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 89 of file RISCVSubtarget.h.
References InstrInfo.
Referenced by emitFROUND(), EmitLoweredCascadedSelect(), llvm::RISCVFrameLowering::emitPrologue(), and emitSelectPseudo().
|
override |
Definition at line 99 of file RISCVSubtarget.cpp.
References InstSelector.
|
override |
Definition at line 103 of file RISCVSubtarget.cpp.
unsigned RISCVSubtarget::getMaxBuildIntsCost | ( | ) | const |
Definition at line 115 of file RISCVSubtarget.cpp.
References RISCVMaxBuildIntsCost.
Referenced by lowerConstant(), and llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm().
|
inline |
Definition at line 178 of file RISCVSubtarget.h.
References hasVInstructions().
unsigned RISCVSubtarget::getMaxLMULForFixedLengthVectors | ( | ) | const |
Definition at line 155 of file RISCVSubtarget.cpp.
References assert(), llvm::bit_floor(), hasVInstructions(), and RVVVectorLMULMax.
Referenced by useRVVForFixedLengthVectorVT().
|
protected |
Definition at line 126 of file RISCVSubtarget.cpp.
References assert(), hasVInstructions(), and llvm::report_fatal_error().
Referenced by getRealMaxVLen().
|
protected |
Definition at line 139 of file RISCVSubtarget.cpp.
References assert(), hasVInstructions(), and llvm::report_fatal_error().
Referenced by getRealMinVLen(), and useRVVForFixedLengthVectors().
|
override |
Definition at line 174 of file RISCVSubtarget.cpp.
References llvm::createRISCVMacroFusionDAGMutation().
|
inline |
Definition at line 101 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 102 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().
|
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 108 of file RISCVSubtarget.h.
|
inline |
Definition at line 150 of file RISCVSubtarget.h.
References getMaxRVVVectorSizeInBits().
Referenced by llvm::RISCVTargetLowering::computeKnownBitsForTargetNode(), llvm::RISCVTTIImpl::getMaxVScale(), and lowerVectorIntrinsicScalars().
|
inline |
Definition at line 146 of file RISCVSubtarget.h.
References getMinRVVVectorSizeInBits().
Referenced by llvm::RISCVTargetLowering::computeKnownBitsForTargetNode(), getContainerForFixedLengthVector(), llvm::RISCVTTIImpl::getRegisterBitWidth(), llvm::RISCVTTIImpl::getRegUsageForType(), llvm::RISCVTTIImpl::getVScaleForTuning(), llvm::RISCVTargetLowering::isVScaleKnownToBeAPowerOfTwo(), llvm::RISCVTargetLowering::LowerOperation(), lowerVectorIntrinsicScalars(), and useRVVForFixedLengthVectorVT().
|
override |
Definition at line 107 of file RISCVSubtarget.cpp.
References RegBankInfo.
|
inlineoverride |
Definition at line 90 of file RISCVSubtarget.h.
Referenced by llvm::RISCVInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::RISCVInstrInfo::copyPhysReg(), llvm::RISCVFrameLowering::eliminateCallFramePseudoInstr(), llvm::RISCVFrameLowering::emitEpilogue(), llvm::RISCVFrameLowering::emitPrologue(), llvm::RISCVTargetLowering::getRegisterByName(), llvm::RISCVFrameLowering::hasBP(), isConvertibleToVMV_V_V(), llvm::RISCVTargetLowering::LowerCall(), RISCVSubtarget(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVDAGToDAGISel::Select().
|
inlineoverride |
Definition at line 96 of file RISCVSubtarget.h.
|
inline |
Definition at line 154 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inlineoverride |
Definition at line 93 of file RISCVSubtarget.h.
Referenced by RISCVSubtarget(), and llvm::RISCVDAGToDAGISel::Select().
|
inline |
Definition at line 132 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::ComputeNumSignBitsForTargetNode(), llvm::RISCVTargetLowering::decomposeMulByConstant(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVFrameLowering::emitPrologue(), llvm::RISCVTTIImpl::getIntImmCostInst(), llvm::RISCVTTIImpl::getRegisterBitWidth(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::RISCVDAGToDAGISel::hasAllNBitUsers(), llvm::RISCVInstrInfo::isBranchOffsetInRange(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::isMulAddWithConstProfitable(), lowerBUILD_VECTOR(), llvm::RISCVTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), llvm::RISCVTargetLowering::lowerInterleavedStore(), performBITREVERSECombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectShiftMaskXLen(), llvm::RISCVDAGToDAGISel::selectSHXADDOp(), llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::RISCVTargetLowering::shouldExtendTypeInLibCall(), transformAddImmMulImm(), and transformAddShlImm().
|
inline |
Definition at line 131 of file RISCVSubtarget.h.
Referenced by llvm::RISCVDAGToDAGISel::addVectorLoadStoreOperands(), llvm::RISCV::CC_RISCV_FastCC(), combine_CC(), combineBinOpToReduce(), llvm::RISCVTargetLowering::computeVLMax(), convertFromScalableVector(), convertToScalableVector(), getDefaultVLOps(), getDeinterleaveViaVNSRL(), getVLOp(), getVSlidedown(), getVSlideup(), getWideningInterleave(), llvm::RISCVTargetLowering::LowerAsmOperandForConstraint(), lowerBUILD_VECTOR(), llvm::RISCVTargetLowering::LowerCall(), llvm::RISCVTargetLowering::LowerFormalArguments(), lowerFP_TO_INT_SAT(), lowerFTRUNC_FCEIL_FFLOOR_FROUND(), llvm::RISCVTargetLowering::LowerOperation(), lowerReductionSeq(), lowerScalarInsert(), lowerScalarSplat(), lowerVECTOR_SHUFFLE(), lowerVECTOR_SHUFFLEAsVSlidedown(), lowerVECTOR_SHUFFLEAsVSlideup(), lowerVectorFTRUNC_FCEIL_FFLOOR_FROUND(), lowerVectorIntrinsicScalars(), lowerVectorStrictFTRUNC_FCEIL_FFLOOR_FROUND(), matchSplatAsGather(), performCONCAT_VECTORSCombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), performFP_TO_INT_SATCombine(), performFP_TO_INTCombine(), performSELECTCombine(), llvm::RISCVDAGToDAGISel::PreprocessISelDAG(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::SelectAddrFrameIndex(), llvm::RISCVDAGToDAGISel::selectFPImm(), llvm::RISCVDAGToDAGISel::SelectFrameAddrRegImm(), llvm::RISCVDAGToDAGISel::SelectInlineAsmMemoryOperand(), llvm::RISCVDAGToDAGISel::selectRVVSimm5(), llvm::RISCVDAGToDAGISel::selectVLSEGFF(), llvm::RISCVDAGToDAGISel::selectVSETVLI(), selectVSplatSimmHelper(), llvm::RISCVDAGToDAGISel::selectVSplatUimm5(), and tryMemPairCombine().
|
inline |
Definition at line 126 of file RISCVSubtarget.h.
|
inline |
Definition at line 165 of file RISCVSubtarget.h.
|
inline |
Definition at line 114 of file RISCVSubtarget.h.
Referenced by llvm::RISCVInstrInfo::getNop(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 117 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::RISCVTargetLowering::isFPImmLegal(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 116 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::getNumRegistersForCallingConv(), llvm::RISCVTargetLowering::getRegisterTypeForCallingConv(), llvm::RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::LowerOperation(), llvm::RISCVTargetLowering::ReplaceNodeResults(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 118 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), hasStdExtZfhOrZfhminOrZhinxOrZhinxmin(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::shouldConvertFpToSat().
|
inline |
Definition at line 123 of file RISCVSubtarget.h.
References hasStdExtZfhOrZfhmin(), and hasStdExtZhinxOrZhinxmin().
Referenced by llvm::RISCVTargetLowering::getNumRegistersForCallingConv(), llvm::RISCVTargetLowering::getRegisterTypeForCallingConv(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::LowerOperation(), llvm::RISCVTargetLowering::ReplaceNodeResults(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 119 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(), lowerFP_TO_INT_SAT(), llvm::RISCVTargetLowering::ReplaceNodeResults(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 120 of file RISCVSubtarget.h.
Referenced by hasStdExtZfhOrZfhminOrZhinxOrZhinxmin(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVDAGToDAGISel::Select().
|
inline |
Definition at line 115 of file RISCVSubtarget.h.
|
inline |
Definition at line 168 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::CanLowerReturn(), llvm::RISCVTargetLowering::canSplatOperand(), llvm::RISCV::CC_RISCV(), getELEN(), llvm::RISCVTTIImpl::getIntrinsicInstrCost(), getMaxInterleaveFactor(), getMaxLMULForFixedLengthVectors(), getMaxRVVVectorSizeInBits(), llvm::RISCVTTIImpl::getMaxVScale(), getMinRVVVectorSizeInBits(), llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), llvm::RISCVTTIImpl::getRegisterBitWidth(), llvm::RISCVTTIImpl::getRegUsageForType(), getScavSlotsNumForRVV(), llvm::RISCVTargetLowering::getSetCCResultType(), llvm::RISCVTTIImpl::getVScaleForTuning(), llvm::RISCVTargetLowering::isLegalAddressingMode(), llvm::RISCVTargetLowering::isLegalStridedLoadStore(), lowerVectorIntrinsicScalars(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVDAGToDAGISel::selectVSETVLI(), llvm::RISCVTargetLowering::shouldFoldSelectWithIdentityConstant(), llvm::RISCVTargetLowering::shouldSinkOperands(), and useRVVForFixedLengthVectors().
|
inline |
Definition at line 176 of file RISCVSubtarget.h.
References hasVInstructionsF32().
|
inline |
Definition at line 170 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 172 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTTIImpl::getCmpSelInstrCost(), hasVInstructionsAnyF(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 174 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 177 of file RISCVSubtarget.h.
|
inline |
Definition at line 169 of file RISCVSubtarget.h.
Referenced by getELEN(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 130 of file RISCVSubtarget.h.
Referenced by emitFROUND(), llvm::RISCVTargetLowering::EmitInstrWithCustomInserter(), llvm::RISCVTargetLowering::getJumpTableEncoding(), isCompressibleLoad(), isCompressibleStore(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::isSExtCheaperThanZExt(), llvm::RISCVTargetLowering::isTruncateFree(), lowerBUILD_VECTOR(), llvm::RISCVTargetLowering::LowerCustomJumpTableEntry(), llvm::RISCVTargetLowering::LowerOperation(), llvm::RISCVInstrInfo::movImm(), performANDCombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), performSETCCCombine(), performSRACombine(), performTRUNCATECombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVDAGToDAGISel::Select(), selectConstantAddr(), llvm::RISCVDAGToDAGISel::selectFPImm(), llvm::RISCVDAGToDAGISel::selectVLXSEG(), llvm::RISCVDAGToDAGISel::selectVSXSEG(), llvm::RISCVTargetLowering::shouldSignExtendTypeInLibCall(), llvm::RISCVTargetLowering::shouldTransformSignedTruncationCheck(), llvm::RISCVTargetLowering::signExtendConstant(), and llvm::RISCVInstrInfo::verifyInstruction().
Definition at line 160 of file RISCVSubtarget.h.
References assert().
Referenced by llvm::RISCVFrameLowering::emitPrologue(), llvm::RISCVTargetLowering::getRegisterByName(), llvm::RISCVRegisterInfo::getReservedRegs(), llvm::RISCVTargetLowering::LowerCall(), and llvm::RISCVTargetLowering::LowerReturn().
|
inline |
Definition at line 155 of file RISCVSubtarget.h.
References llvm::RISCVABI::ABI_ILP32, llvm::RISCVABI::ABI_ILP32E, and llvm::RISCVABI::ABI_LP64.
Referenced by llvm::RISCVTargetLowering::shouldExtendTypeInLibCall().
|
inline |
Definition at line 202 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::getIRStackGuard().
void llvm::RISCVSubtarget::ParseSubtargetFeatures | ( | StringRef | CPU, |
StringRef | TuneCPU, | ||
StringRef | FS | ||
) |
bool RISCVSubtarget::useConstantPoolForLargeInts | ( | ) | const |
Definition at line 111 of file RISCVSubtarget.cpp.
References RISCVDisableUsingConstantPoolForLargeInts.
Referenced by lowerConstant().
bool RISCVSubtarget::useRVVForFixedLengthVectors | ( | ) | const |
Definition at line 164 of file RISCVSubtarget.cpp.
References getMinRVVVectorSizeInBits(), and hasVInstructions().
Referenced by llvm::RISCVTTIImpl::getArithmeticInstrCost(), llvm::RISCVTTIImpl::getArithmeticReductionCost(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::RISCVTTIImpl::getExtendedReductionCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::RISCVTTIImpl::getRegisterBitWidth(), llvm::RISCVTTIImpl::getRegUsageForType(), llvm::RISCVTargetLowering::getSetCCResultType(), llvm::RISCVTargetLowering::isLegalInterleavedAccessType(), llvm::RISCVTargetLowering::isLegalStridedLoadStore(), llvm::RISCVTargetLowering::PerformDAGCombine(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
protected |
Definition at line 184 of file RISCVSubtarget.h.
Referenced by getCallLowering(), and RISCVSubtarget().
|
protected |
Definition at line 185 of file RISCVSubtarget.h.
Referenced by getInstructionSelector(), and RISCVSubtarget().
|
protected |
Definition at line 186 of file RISCVSubtarget.h.
|
protected |
Definition at line 187 of file RISCVSubtarget.h.
Referenced by getRegBankInfo(), and RISCVSubtarget().