LLVM 20.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) |
void | generateMCInstSeq (int64_t Val, const MCSubtargetInfo &STI, MCRegister DestReg, SmallVectorImpl< MCInst > &Insts) |
InstSeq | generateTwoRegInstSeq (int64_t Val, const MCSubtargetInfo &STI, unsigned &ShiftAmt, unsigned &AddOpc) |
int | getIntMatCost (const APInt &Val, unsigned Size, const MCSubtargetInfo &STI, bool CompressionCost, bool FreeZeroes) |
using llvm::RISCVMatInt::InstSeq = typedef SmallVector<Inst, 8> |
Definition at line 43 of file RISCVMatInt.h.
Enumerator | |
---|---|
RegImm | |
Imm | |
RegReg | |
RegX0 |
Definition at line 22 of file RISCVMatInt.h.
InstSeq llvm::RISCVMatInt::generateInstSeq | ( | int64_t | Val, |
const MCSubtargetInfo & | STI | ||
) |
Definition at line 227 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::Lo, llvm::popcount(), and llvm::SmallVectorBase< Size_T >::size().
Referenced by generateMCInstSeq(), generateTwoRegInstSeq(), getIntMatCost(), lowerConstant(), llvm::RISCVInstrInfo::movImm(), selectConstantAddr(), selectImm(), and llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm().
void llvm::RISCVMatInt::generateMCInstSeq | ( | int64_t | Val, |
const MCSubtargetInfo & | STI, | ||
MCRegister | DestReg, | ||
SmallVectorImpl< MCInst > & | Insts | ||
) |
Definition at line 431 of file RISCVMatInt.cpp.
References llvm::MCInstBuilder::addImm(), llvm::MCInstBuilder::addReg(), generateInstSeq(), llvm::RISCVMatInt::Inst::getImm(), llvm::RISCVMatInt::Inst::getOpcode(), llvm::RISCVMatInt::Inst::getOpndKind(), Imm, llvm::SmallVectorTemplateBase< T, bool >::push_back(), RegImm, RegReg, and RegX0.
InstSeq llvm::RISCVMatInt::generateTwoRegInstSeq | ( | int64_t | Val, |
const MCSubtargetInfo & | STI, | ||
unsigned & | ShiftAmt, | ||
unsigned & | AddOpc | ||
) |
Definition at line 468 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, | ||
bool | FreeZeroes | ||
) |
Definition at line 501 of file RISCVMatInt.cpp.
References llvm::APInt::ashr(), generateInstSeq(), getInstSeqCost(), llvm::APInt::getSExtValue(), llvm::MCSubtargetInfo::hasFeature(), HasRVC, llvm::APInt::sextOrTrunc(), and Size.
Referenced by getIntImmCostImpl(), llvm::RISCVTargetLowering::isDesirableToCommuteWithShift(), llvm::RISCVTargetLowering::isFPImmLegal(), llvm::RISCVTargetLowering::PerformDAGCombine(), and llvm::RISCVDAGToDAGISel::selectInvLogicImm().