LLVM
15.0.0git
|
#include "Target/RISCV/RISCVSubtarget.h"
Public Types | |
enum | RISCVProcFamilyEnum : uint8_t { Others, SiFive7 } |
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, | ||
const TargetMachine & | TM | ||
) |
Definition at line 89 of file RISCVSubtarget.cpp.
References CallLoweringInfo, llvm::createRISCVInstructionSelector(), getRegisterInfo(), getTargetLowering(), InstSelector, RegBankInfo, and TM.
|
inline |
Definition at line 180 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 136 of file RISCVSubtarget.h.
|
inline |
Definition at line 181 of file RISCVSubtarget.h.
|
inline |
Definition at line 182 of file RISCVSubtarget.h.
|
override |
Definition at line 203 of file RISCVSubtarget.cpp.
References EnableSubRegLiveness.
|
override |
Definition at line 105 of file RISCVSubtarget.cpp.
References CallLoweringInfo.
|
inline |
Definition at line 194 of file RISCVSubtarget.h.
References assert(), hasVInstructions(), and hasVInstructionsI64().
Referenced by llvm::RISCVTTIImpl::getArithmeticReductionCost(), llvm::RISCVTTIImpl::getCastInstrCost(), getContainerForFixedLengthVector(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), isInterleaveShuffle(), lowerBUILD_VECTOR(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 185 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 123 of file RISCVSubtarget.h.
|
inlineoverride |
Definition at line 126 of file RISCVSubtarget.h.
Referenced by llvm::RISCVFrameLowering::emitPrologue(), emitSelectPseudo(), and llvm::RISCVInstrInfo::verifyInstruction().
|
override |
Definition at line 109 of file RISCVSubtarget.cpp.
References InstSelector.
|
override |
Definition at line 113 of file RISCVSubtarget.cpp.
unsigned RISCVSubtarget::getMaxBuildIntsCost | ( | ) | const |
Definition at line 125 of file RISCVSubtarget.cpp.
References RISCVMaxBuildIntsCost.
Referenced by selectImm().
|
inline |
Definition at line 224 of file RISCVSubtarget.h.
References hasVInstructions().
unsigned RISCVSubtarget::getMaxLMULForFixedLengthVectors | ( | ) | const |
Definition at line 190 of file RISCVSubtarget.cpp.
References assert(), hasVInstructions(), llvm::isPowerOf2_32(), llvm::PowerOf2Floor(), and RVVVectorLMULMax.
Referenced by useRVVForFixedLengthVectorVT().
unsigned RISCVSubtarget::getMaxRVVVectorSizeInBits | ( | ) | const |
Definition at line 136 of file RISCVSubtarget.cpp.
References assert(), hasVInstructions(), llvm::isPowerOf2_32(), llvm::max(), llvm::PowerOf2Floor(), llvm::report_fatal_error(), RVVVectorBitsMax, and RVVVectorBitsMin.
Referenced by llvm::RISCVTTIImpl::getMaxVScale(), and getRealMaxVLen().
|
inline |
Definition at line 199 of file RISCVSubtarget.h.
Referenced by getRealMaxVLen().
unsigned RISCVSubtarget::getMinRVVVectorSizeInBits | ( | ) | const |
Definition at line 161 of file RISCVSubtarget.cpp.
References assert(), hasVInstructions(), llvm::isPowerOf2_32(), llvm::min(), llvm::PowerOf2Floor(), llvm::report_fatal_error(), RVVVectorBitsMax, and RVVVectorBitsMin.
Referenced by getContainerForFixedLengthVector(), getRealMinVLen(), llvm::RISCVTTIImpl::getRegisterBitWidth(), llvm::RISCVTTIImpl::getRegUsageForType(), useRVVForFixedLengthVectors(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 198 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::computeKnownBitsForTargetNode(), getRealMinVLen(), and llvm::RISCVTargetLowering::LowerOperation().
|
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().
|
inline |
Definition at line 204 of file RISCVSubtarget.h.
References getMaxRVVVectorSizeInBits(), and getMaxVLen().
Referenced by lowerVectorIntrinsicScalars().
|
inline |
Definition at line 200 of file RISCVSubtarget.h.
References getMinRVVVectorSizeInBits(), and getMinVLen().
Referenced by lowerVectorIntrinsicScalars().
|
override |
Definition at line 117 of file RISCVSubtarget.cpp.
References RegBankInfo.
|
inlineoverride |
Definition at line 127 of file RISCVSubtarget.h.
Referenced by llvm::RISCVInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::RISCVInstrInfo::copyPhysReg(), llvm::RISCVFrameLowering::emitEpilogue(), llvm::RISCVFrameLowering::emitPrologue(), llvm::RISCVTargetLowering::getRegisterByName(), llvm::RISCVFrameLowering::hasBP(), isConvertibleToVMV_V_V(), llvm::RISCVTargetLowering::LowerCall(), RISCVSubtarget(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inlineoverride |
Definition at line 133 of file RISCVSubtarget.h.
|
inline |
Definition at line 208 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::shouldExtendTypeInLibCall().
|
inlineoverride |
Definition at line 130 of file RISCVSubtarget.h.
Referenced by RISCVSubtarget(), and selectImmWithConstantPool().
|
inline |
Definition at line 184 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::ComputeNumSignBitsForTargetNode(), llvm::RISCVTargetLowering::decomposeMulByConstant(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVFrameLowering::emitPrologue(), llvm::RISCVTTIImpl::getRegisterBitWidth(), llvm::RISCVInstrInfo::isBranchOffsetInRange(), llvm::RISCVTargetLowering::isMulAddWithConstProfitable(), lowerBUILD_VECTOR(), llvm::RISCVTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::LowerOperation(), performBITREVERSECombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVDAGToDAGISel::selectShiftMaskXLen(), transformAddImmMulImm(), and transformAddShlImm().
|
inline |
Definition at line 183 of file RISCVSubtarget.h.
Referenced by CC_RISCV_FastCC(), combineORToGORC(), combineORToGREV(), combineORToSHFL(), convertFromScalableVector(), convertToScalableVector(), getDefaultVLOps(), llvm::RISCVTargetLowering::LowerAsmOperandForConstraint(), lowerBUILD_VECTOR(), llvm::RISCVTargetLowering::LowerCall(), llvm::RISCVTargetLowering::LowerFormalArguments(), lowerFP_TO_INT_SAT(), llvm::RISCVTargetLowering::LowerOperation(), lowerScalarSplat(), lowerVECTOR_SHUFFLE(), lowerVectorIntrinsicScalars(), matchSplatAsGather(), llvm::RISCVTargetLowering::PerformDAGCombine(), performFP_TO_INT_SATCombine(), performFP_TO_INTCombine(), llvm::RISCVDAGToDAGISel::PreprocessISelDAG(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVDAGToDAGISel::SelectAddrFI(), llvm::RISCVDAGToDAGISel::SelectBaseAddr(), selectImm(), llvm::RISCVDAGToDAGISel::selectRVVSimm5(), selectVSplatSimmHelper(), and llvm::RISCVDAGToDAGISel::selectVSplatUimm5().
|
inline |
Definition at line 145 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 148 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 147 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), llvm::RISCVTargetLowering::hasBitPreservingFPLogic(), llvm::RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::shouldConvertFpToSat().
|
inline |
Definition at line 146 of file RISCVSubtarget.h.
Referenced by llvm::RISCVFrameLowering::determineCalleeSaves(), llvm::RISCVTargetLowering::getNumRegistersForCallingConv(), llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), llvm::RISCVTargetLowering::getRegisterTypeForCallingConv(), llvm::RISCVTargetLowering::hasBitPreservingFPLogic(), llvm::RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::LowerOperation(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::shouldConvertFpToSat().
|
inline |
Definition at line 144 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::decomposeMulByConstant(), llvm::RISCVInstrInfo::getVLENFactoredAmount(), llvm::RISCVTargetLowering::ReplaceNodeResults(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 149 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 151 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::decomposeMulByConstant(), llvm::RISCVInstrInfo::getVLENFactoredAmount(), and transformAddShlImm().
|
inline |
Definition at line 152 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTTIImpl::getIntImmCostInst(), llvm::RISCVTTIImpl::getPopcntSupport(), llvm::RISCVTargetLowering::hasAndNotCompare(), llvm::RISCVTargetLowering::isCheapToSpeculateCtlz(), llvm::RISCVTargetLowering::isCheapToSpeculateCttz(), performSIGN_EXTEND_INREGCombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::targetShrinkDemandedConstant().
|
inline |
Definition at line 153 of file RISCVSubtarget.h.
|
inline |
Definition at line 154 of file RISCVSubtarget.h.
|
inline |
Definition at line 155 of file RISCVSubtarget.h.
|
inline |
Definition at line 169 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::hasAndNotCompare(), llvm::RISCVTargetLowering::LowerOperation(), performBITREVERSECombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 170 of file RISCVSubtarget.h.
|
inline |
Definition at line 171 of file RISCVSubtarget.h.
|
inline |
Definition at line 156 of file RISCVSubtarget.h.
|
inline |
Definition at line 157 of file RISCVSubtarget.h.
Referenced by combineORToGORC(), combineORToGREV(), combineORToSHFL(), combineROTR_ROTL_RORW_ROLW(), llvm::RISCVTargetLowering::hasAndNotCompare(), llvm::RISCVTargetLowering::LowerOperation(), performORCombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::targetShrinkDemandedConstant().
|
inline |
Definition at line 158 of file RISCVSubtarget.h.
|
inline |
Definition at line 159 of file RISCVSubtarget.h.
Referenced by performANDCombine(), and llvm::RISCVTargetLowering::ReplaceNodeResults().
|
inline |
Definition at line 160 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::BuildSDIVPow2(), llvm::RISCVTargetLowering::ReplaceNodeResults(), and llvm::RISCVTargetLowering::RISCVTargetLowering().
|
inline |
Definition at line 166 of file RISCVSubtarget.h.
|
inline |
Definition at line 164 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::getNumRegistersForCallingConv(), llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), llvm::RISCVTargetLowering::getRegisterTypeForCallingConv(), llvm::RISCVTargetLowering::hasBitPreservingFPLogic(), llvm::RISCVTargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::LowerOperation(), performFP_TO_INT_SATCombine(), performFP_TO_INTCombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and llvm::RISCVTargetLowering::shouldConvertFpToSat().
|
inline |
Definition at line 163 of file RISCVSubtarget.h.
|
inline |
Definition at line 165 of file RISCVSubtarget.h.
|
inline |
Definition at line 168 of file RISCVSubtarget.h.
|
inline |
Definition at line 167 of file RISCVSubtarget.h.
|
inline |
Definition at line 150 of file RISCVSubtarget.h.
|
inline |
Definition at line 172 of file RISCVSubtarget.h.
|
inline |
Definition at line 173 of file RISCVSubtarget.h.
|
inline |
Definition at line 174 of file RISCVSubtarget.h.
|
inline |
Definition at line 177 of file RISCVSubtarget.h.
|
inline |
Definition at line 175 of file RISCVSubtarget.h.
|
inline |
Definition at line 176 of file RISCVSubtarget.h.
|
inline |
Definition at line 162 of file RISCVSubtarget.h.
|
inline |
Definition at line 161 of file RISCVSubtarget.h.
|
inline |
Definition at line 215 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::CanLowerReturn(), CC_RISCV(), getELEN(), getMaxInterleaveFactor(), getMaxLMULForFixedLengthVectors(), getMaxRVVVectorSizeInBits(), llvm::RISCVTTIImpl::getMaxVScale(), getMinRVVVectorSizeInBits(), llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), llvm::RISCVTTIImpl::getRegisterBitWidth(), llvm::RISCVTTIImpl::getRegUsageForType(), llvm::RISCVTargetLowering::getSetCCResultType(), hasRVVSpillWithFIs(), llvm::RISCVTargetLowering::isLegalAddressingMode(), lowerVectorIntrinsicScalars(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectors().
|
inline |
Definition at line 223 of file RISCVSubtarget.h.
References hasVInstructionsF32().
|
inline |
Definition at line 217 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 219 of file RISCVSubtarget.h.
Referenced by hasVInstructionsAnyF(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 221 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 216 of file RISCVSubtarget.h.
Referenced by getELEN(), llvm::RISCVTargetLowering::isLegalElementTypeForRVV(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
inline |
Definition at line 178 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::BuildSDIVPow2(), combineORToGORC(), combineORToGREV(), llvm::RISCVTargetLowering::EmitInstrWithCustomInserter(), llvm::RISCVTargetLowering::getJumpTableEncoding(), llvm::RISCVTargetLowering::isSExtCheaperThanZExt(), llvm::RISCVTargetLowering::isTruncateFree(), lowerBUILD_VECTOR(), llvm::RISCVTargetLowering::LowerCustomJumpTableEntry(), llvm::RISCVTargetLowering::LowerOperation(), llvm::RISCVInstrInfo::movImm(), performANDCombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), performSIGN_EXTEND_INREGCombine(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::RISCVTargetLowering::shouldSignExtendTypeInLibCall(), and llvm::RISCVTargetLowering::signExtendConstant().
|
inline |
Definition at line 209 of file RISCVSubtarget.h.
Referenced by llvm::RISCVFrameLowering::emitPrologue(), llvm::RISCVTargetLowering::getRegisterByName(), llvm::RISCVRegisterInfo::getReservedRegs(), llvm::RISCVTargetLowering::LowerCall(), and llvm::RISCVTargetLowering::LowerReturn().
|
inline |
Definition at line 179 of file RISCVSubtarget.h.
Referenced by llvm::RISCVTargetLowering::RISCVTargetLowering().
void llvm::RISCVSubtarget::ParseSubtargetFeatures | ( | StringRef | CPU, |
StringRef | TuneCPU, | ||
StringRef | FS | ||
) |
bool RISCVSubtarget::useConstantPoolForLargeInts | ( | ) | const |
Definition at line 121 of file RISCVSubtarget.cpp.
References RISCVDisableUsingConstantPoolForLargeInts.
Referenced by selectImm().
bool RISCVSubtarget::useRVVForFixedLengthVectors | ( | ) | const |
Definition at line 199 of file RISCVSubtarget.cpp.
References getMinRVVVectorSizeInBits(), and hasVInstructions().
Referenced by llvm::RISCVTTIImpl::getArithmeticReductionCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::RISCVTTIImpl::getRegUsageForType(), llvm::RISCVTargetLowering::getSetCCResultType(), llvm::RISCVTargetLowering::RISCVTargetLowering(), and useRVVForFixedLengthVectorVT().
|
protected |
Definition at line 230 of file RISCVSubtarget.h.
Referenced by getCallLowering(), and RISCVSubtarget().
|
protected |
Definition at line 231 of file RISCVSubtarget.h.
Referenced by getInstructionSelector(), and RISCVSubtarget().
|
protected |
Definition at line 232 of file RISCVSubtarget.h.
|
protected |
Definition at line 233 of file RISCVSubtarget.h.
Referenced by getRegBankInfo(), and RISCVSubtarget().