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 96 of file RISCVSubtarget.h.
|
override |
Definition at line 167 of file RISCVSubtarget.cpp.
References EnableSubRegLiveness.
|
override |
Definition at line 95 of file RISCVSubtarget.cpp.
References CallLoweringInfo.
|
inline |
Definition at line 123 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(), isInterleaveShuffle(), lowerBUILD_VECTOR(), lowerVECTOR_SHUFFLEAsVNSRL(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 114 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 83 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 86 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 155 of file RISCVSubtarget.h.
References hasVInstructions().
unsigned RISCVSubtarget::getMaxLMULForFixedLengthVectors | ( | ) | const |
Definition at line 155 of file RISCVSubtarget.cpp.
References assert(), llvm::bit_floor(), hasVInstructions(), llvm::isPowerOf2_32(), 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 173 of file RISCVSubtarget.cpp.
References llvm::createRISCVMacroFusionDAGMutation().
|
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 102 of file RISCVSubtarget.h.
|
inline |
Definition at line 131 of file RISCVSubtarget.h.
References getMaxRVVVectorSizeInBits().
Referenced by llvm::RISCVTargetLowering::computeKnownBitsForTargetNode(), llvm::RISCVTTIImpl::getMaxVScale(), and lowerVectorIntrinsicScalars().
|
inline |
Definition at line 127 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 87 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 93 of file RISCVSubtarget.h.
|
inline |
Definition at line 135 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::shouldExtendTypeInLibCall().
|
inlineoverride |
Definition at line 90 of file RISCVSubtarget.h.
Referenced by RISCVSubtarget(), and llvm::RISCVDAGToDAGISel::Select().
|
inline |
Definition at line 113 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::RISCVInstrInfo::hasAllNBitUsers(), llvm::RISCVDAGToDAGISel::hasAllNBitUsers(), llvm::RISCVInstrInfo::isBranchOffsetInRange(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::isMulAddWithConstProfitable(), lowerBUILD_VECTOR(), llvm::RISCVTargetLowering::LowerFormalArguments(), performBITREVERSECombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectShiftMaskXLen(), llvm::RISCVDAGToDAGISel::selectSHXADDOp(), llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm(), transformAddImmMulImm(), and transformAddShlImm().
|
inline |
Definition at line 112 of file RISCVSubtarget.h.
Referenced by llvm::RISCVDAGToDAGISel::addVectorLoadStoreOperands(), CC_RISCV_FastCC(), combine_CC(), combineBinOpToReduce(), convertFromScalableVector(), convertToScalableVector(), getDefaultVLOps(), getVLOp(), getVSlidedown(), getVSlideup(), 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_SHUFFLEAsVNSRL(), lowerVECTOR_SHUFFLEAsVSlidedown(), lowerVectorFTRUNC_FCEIL_FFLOOR_FROUND(), lowerVectorIntrinsicScalars(), matchSplatAsGather(), 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::selectRVVSimm5(), llvm::RISCVDAGToDAGISel::selectVLSEGFF(), llvm::RISCVDAGToDAGISel::selectVSETVLI(), selectVSplatSimmHelper(), and llvm::RISCVDAGToDAGISel::selectVSplatUimm5().
|
inline |
Definition at line 141 of file RISCVSubtarget.h.
|
inline |
Definition at line 108 of file RISCVSubtarget.h.
Referenced by llvm::RISCVInstrInfo::getNop(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 110 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::getNumRegistersForCallingConv(), llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), llvm::RISCVTargetLowering::getRegisterTypeForCallingConv(), llvm::RISCVTargetLowering::hasBitPreservingFPLogic(), hasVInstructionsF16(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::LowerOperation(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::shouldConvertFpToSat().
|
inline |
Definition at line 109 of file RISCVSubtarget.h.
|
inline |
Definition at line 144 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::CanLowerReturn(), llvm::RISCVTargetLowering::canSplatOperand(), 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(), lowerVectorIntrinsicScalars(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVDAGToDAGISel::selectVSETVLI(), llvm::RISCVTargetLowering::shouldFoldSelectWithIdentityConstant(), llvm::RISCVTargetLowering::shouldSinkOperands(), and useRVVForFixedLengthVectors().
|
inline |
Definition at line 154 of file RISCVSubtarget.h.
References hasVInstructionsF32().
|
inline |
Definition at line 146 of file RISCVSubtarget.h.
References hasStdExtZfhOrZfhmin().
Referenced by llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 150 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTTIImpl::getCmpSelInstrCost(), hasVInstructionsAnyF(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 152 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 145 of file RISCVSubtarget.h.
Referenced by getELEN(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 111 of file RISCVSubtarget.h.
Referenced by emitFROUND(), llvm::RISCVTargetLowering::EmitInstrWithCustomInserter(), llvm::RISCVTargetLowering::getJumpTableEncoding(), isCompressibleLoad(), isCompressibleStore(), 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::selectVLXSEG(), llvm::RISCVDAGToDAGISel::selectVSXSEG(), llvm::RISCVTargetLowering::shouldSignExtendTypeInLibCall(), llvm::RISCVTargetLowering::signExtendConstant(), and llvm::RISCVInstrInfo::verifyInstruction().
Definition at line 136 of file RISCVSubtarget.h.
References assert().
Referenced by llvm::RISCVFrameLowering::emitPrologue(), llvm::RISCVTargetLowering::getRegisterByName(), llvm::RISCVRegisterInfo::getReservedRegs(), llvm::RISCVTargetLowering::LowerCall(), and llvm::RISCVTargetLowering::LowerReturn().
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 163 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::PerformDAGCombine(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
protected |
Definition at line 161 of file RISCVSubtarget.h.
Referenced by getCallLowering(), and RISCVSubtarget().
|
protected |
Definition at line 162 of file RISCVSubtarget.h.
Referenced by getInstructionSelector(), and RISCVSubtarget().
|
protected |
Definition at line 163 of file RISCVSubtarget.h.
|
protected |
Definition at line 164 of file RISCVSubtarget.h.
Referenced by getRegBankInfo(), and RISCVSubtarget().