LLVM 19.0.0git
|
Classes | |
class | Inst |
Typedefs | |
using | InstSeq = SmallVector< Inst, 8 > |
Enumerations | |
enum | OpndKind { RegImm , Imm , RegReg , RegX0 } |
Functions | |
InstSeq | generateInstSeq (int64_t Val, const MCSubtargetInfo &STI) |
InstSeq | generateTwoRegInstSeq (int64_t Val, const MCSubtargetInfo &STI, unsigned &ShiftAmt, unsigned &AddOpc) |
int | getIntMatCost (const APInt &Val, unsigned Size, const MCSubtargetInfo &STI, bool CompressionCost) |
using llvm::RISCVMatInt::InstSeq = typedef SmallVector<Inst, 8> |
Definition at line 42 of file RISCVMatInt.h.
Enumerator | |
---|---|
RegImm | |
Imm | |
RegReg | |
RegX0 |
Definition at line 21 of file RISCVMatInt.h.
InstSeq llvm::RISCVMatInt::generateInstSeq | ( | int64_t | Val, |
const MCSubtargetInfo & | STI | ||
) |
Definition at line 224 of file RISCVMatInt.cpp.
References assert(), llvm::countr_zero(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::SmallVectorBase< Size_T >::empty(), extractRotateInfo(), generateInstSeqImpl(), generateInstSeqLeadingZeros(), llvm::MCSubtargetInfo::hasFeature(), llvm::Hi, llvm::Hi_32(), llvm::Lo, llvm::Lo_32(), llvm::popcount(), and llvm::SmallVectorBase< Size_T >::size().
Referenced by generateTwoRegInstSeq(), getIntMatCost(), lowerConstant(), llvm::RISCVInstrInfo::movImm(), selectConstantAddr(), selectImm(), and llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm().
InstSeq llvm::RISCVMatInt::generateTwoRegInstSeq | ( | int64_t | Val, |
const MCSubtargetInfo & | STI, | ||
unsigned & | ShiftAmt, | ||
unsigned & | AddOpc | ||
) |
Definition at line 439 of file RISCVMatInt.cpp.
References assert(), llvm::countr_zero(), generateInstSeq(), llvm::MCSubtargetInfo::hasFeature(), llvm::Hi_32(), and llvm::Lo_32().
Referenced by lowerConstant(), and selectImm().
int llvm::RISCVMatInt::getIntMatCost | ( | const APInt & | Val, |
unsigned | Size, | ||
const MCSubtargetInfo & | STI, | ||
bool | CompressionCost | ||
) |
Definition at line 472 of file RISCVMatInt.cpp.
References llvm::APInt::ashr(), generateInstSeq(), getInstSeqCost(), llvm::APInt::getSExtValue(), llvm::MCSubtargetInfo::hasFeature(), HasRVC, llvm::APInt::sextOrTrunc(), and Size.
Referenced by llvm::RISCVTTIImpl::getIntImmCost(), llvm::RISCVTargetLowering::isDesirableToCommuteWithShift(), llvm::RISCVTargetLowering::isFPImmLegal(), and llvm::RISCVTargetLowering::PerformDAGCombine().