LLVM 20.0.0git
|
#include "Target/RISCV/RISCVRegisterInfo.h"
Static Public Member Functions | |
static bool | isVRRegClass (const TargetRegisterClass *RC) |
static bool | isVRNRegClass (const TargetRegisterClass *RC) |
static bool | isRVVRegClass (const TargetRegisterClass *RC) |
Definition at line 56 of file RISCVRegisterInfo.h.
RISCVRegisterInfo::RISCVRegisterInfo | ( | unsigned | HwMode | ) |
Definition at line 54 of file RISCVRegisterInfo.cpp.
void RISCVRegisterInfo::adjustReg | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | II, | ||
const DebugLoc & | DL, | ||
Register | DestReg, | ||
Register | SrcReg, | ||
StackOffset | Offset, | ||
MachineInstr::MIFlag | Flag, | ||
MaybeAlign | RequiredAlign | ||
) | const |
Definition at line 172 of file RISCVRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::StackOffset::getFixed(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), II, llvm::RegState::Kill, MBB, MRI, llvm::Offset, llvm::report_fatal_error(), llvm::RISCV::RVVBitsPerBlock, llvm::MachineInstrBuilder::setMIFlag(), TII, llvm::Align::value(), and llvm::MaybeAlign::valueOrOne().
Referenced by llvm::RISCVFrameLowering::allocateStack(), llvm::RISCVFrameLowering::eliminateCallFramePseudoInstr(), eliminateFrameIndex(), and llvm::RISCVFrameLowering::emitEpilogue().
|
override |
Definition at line 468 of file RISCVRegisterInfo.cpp.
References adjustReg(), assert(), DL, llvm::StackOffset::get(), llvm::StackOffset::getFixed(), llvm::MachineFunction::getRegInfo(), II, llvm::RISCV::isRVVSpill(), lowerVRELOAD(), lowerVSPILL(), MI, MRI, llvm::MachineInstr::NoFlags, llvm::Offset, and llvm::report_fatal_error().
|
override |
Definition at line 59 of file RISCVRegisterInfo.cpp.
References llvm::RISCVABI::ABI_ILP32, llvm::RISCVABI::ABI_ILP32D, llvm::RISCVABI::ABI_ILP32E, llvm::RISCVABI::ABI_ILP32F, llvm::RISCVABI::ABI_LP64, llvm::RISCVABI::ABI_LP64D, llvm::RISCVABI::ABI_LP64E, llvm::RISCVABI::ABI_LP64F, llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::CallingConv::GHC, llvm::Function::hasFnAttribute(), llvm_unreachable, and llvm::CallingConv::RISCV_VectorCall.
|
override |
Definition at line 727 of file RISCVRegisterInfo.cpp.
References llvm::RISCVABI::ABI_ILP32, llvm::RISCVABI::ABI_ILP32D, llvm::RISCVABI::ABI_ILP32E, llvm::RISCVABI::ABI_ILP32F, llvm::RISCVABI::ABI_LP64, llvm::RISCVABI::ABI_LP64D, llvm::RISCVABI::ABI_LP64E, llvm::RISCVABI::ABI_LP64F, CC, llvm::MachineFunction::getSubtarget(), llvm::CallingConv::GHC, llvm_unreachable, and llvm::CallingConv::RISCV_VectorCall.
|
override |
Definition at line 705 of file RISCVRegisterInfo.cpp.
References assert(), llvm::RISCVII::getFormat(), Idx, llvm::RISCVII::InstFormatI, llvm::RISCVII::InstFormatS, and MI.
Referenced by isFrameOffsetLegal(), and resolveFrameIndex().
|
override |
Definition at line 715 of file RISCVRegisterInfo.cpp.
References llvm::TargetFrameLowering::hasFP().
|
override |
Definition at line 758 of file RISCVRegisterInfo.cpp.
Definition at line 168 of file RISCVRegisterInfo.cpp.
|
override |
Definition at line 773 of file RISCVRegisterInfo.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::DIExpression::appendOffset(), assert(), getDwarfRegNum(), llvm::Offset, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
inlineoverride |
Definition at line 116 of file RISCVRegisterInfo.h.
|
override |
Definition at line 810 of file RISCVRegisterInfo.cpp.
References contains(), llvm::SmallSet< T, N, C >::count(), DisableRegAllocHints, llvm::VirtRegMap::getPhys(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::getSubReg(), llvm::MachineFunction::getSubtarget(), llvm::SmallSet< T, N, C >::insert(), llvm::is_contained(), Matrix, MI, MRI, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
override |
Definition at line 720 of file RISCVRegisterInfo.cpp.
References llvm::TargetRegisterInfo::getRegAsmName().
|
override |
Definition at line 801 of file RISCVRegisterInfo.cpp.
References DisableCostPerUse, and llvm::MachineFunction::getSubtarget().
|
override |
Definition at line 101 of file RISCVRegisterInfo.cpp.
References assert(), llvm::RISCVABI::getBPReg(), llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::CallingConv::GRAAL, llvm::RISCVFrameLowering::hasBP(), llvm::TargetFrameLowering::hasFP(), llvm::report_fatal_error(), and llvm::Reserved.
Referenced by llvm::RISCVTargetLowering::getRegisterByName().
|
override |
Definition at line 163 of file RISCVRegisterInfo.cpp.
References llvm::MachineFunction::getSubtarget(), and llvm::TargetSubtargetInfo::isRegisterReservedByUser().
|
override |
Definition at line 650 of file RISCVRegisterInfo.cpp.
References assert(), getFrameIndexInstrOffset(), MI, and llvm::Offset.
Referenced by needsFrameBaseReg().
|
inlinestatic |
Definition at line 144 of file RISCVRegisterInfo.h.
References llvm::RISCVRI::isVRegClass(), and llvm::TargetRegisterClass::TSFlags.
Referenced by llvm::RISCVFrameLowering::assignCalleeSavedSpillSlots().
|
inlinestatic |
Definition at line 140 of file RISCVRegisterInfo.h.
References llvm::RISCVRI::getNF(), llvm::RISCVRI::isVRegClass(), and llvm::TargetRegisterClass::TSFlags.
|
inlinestatic |
Definition at line 135 of file RISCVRegisterInfo.h.
References llvm::RISCVRI::getNF(), llvm::RISCVRI::isVRegClass(), and llvm::TargetRegisterClass::TSFlags.
void RISCVRegisterInfo::lowerVRELOAD | ( | MachineBasicBlock::iterator | II | ) | const |
Definition at line 398 of file RISCVRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::sampleprof::Base, llvm::BuildMI(), DL, llvm::RISCVSubtarget::getInstrInfo(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::RISCVSubtarget::getRealVLen(), llvm::MachineFunction::getRegInfo(), llvm::RISCVSubtarget::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), I, II, llvm::RISCV::isRVVSpillForZvlsseg(), llvm_unreachable, llvm::Log2_32(), MBB, llvm::RISCVInstrInfo::movImm(), MRI, llvm::Offset, TII, and TRI.
Referenced by eliminateFrameIndex().
void RISCVRegisterInfo::lowerVSPILL | ( | MachineBasicBlock::iterator | II | ) | const |
Definition at line 321 of file RISCVRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::sampleprof::Base, llvm::BuildMI(), DL, llvm::RISCVSubtarget::getInstrInfo(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::RISCVSubtarget::getRealVLen(), llvm::MachineFunction::getRegInfo(), llvm::RISCVSubtarget::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), I, II, llvm::RegState::Implicit, llvm::RISCV::isRVVSpillForZvlsseg(), llvm_unreachable, llvm::Log2_32(), MBB, llvm::RISCVInstrInfo::movImm(), MRI, llvm::Offset, TII, and TRI.
Referenced by eliminateFrameIndex().
|
override |
Definition at line 667 of file RISCVRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), DL, llvm::MachineBasicBlock::end(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), MBB, MBBI, llvm::Offset, and TII.
|
override |
Definition at line 594 of file RISCVRegisterInfo.cpp.
References assert(), contains(), llvm::RISCVII::getFormat(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::TargetFrameLowering::hasFP(), llvm::RISCVII::InstFormatI, llvm::RISCVII::InstFormatS, isFrameOffsetLegal(), MI, MRI, and llvm::Offset.
|
inlineoverride |
Definition at line 111 of file RISCVRegisterInfo.h.
|
inlineoverride |
Definition at line 107 of file RISCVRegisterInfo.h.
|
override |
Definition at line 585 of file RISCVRegisterInfo.cpp.
|
override |
Definition at line 687 of file RISCVRegisterInfo.cpp.
References assert(), getFrameIndexInstrOffset(), MI, and llvm::Offset.