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 55 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 173 of file RISCVRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), II, llvm::RegState::Kill, MBB, MRI, llvm::Offset, llvm::MachineInstrBuilder::setMIFlag(), TII, llvm::Align::value(), and llvm::MaybeAlign::valueOrOne().
Referenced by llvm::RISCVFrameLowering::eliminateCallFramePseudoInstr(), eliminateFrameIndex(), and llvm::RISCVFrameLowering::emitEpilogue().
|
inlineoverride |
Definition at line 146 of file RISCVRegisterInfo.h.
References isVRRegClass().
|
override |
Definition at line 452 of file RISCVRegisterInfo.cpp.
References adjustReg(), assert(), DL, llvm::StackOffset::get(), llvm::StackOffset::getFixed(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), II, llvm::RISCV::isRVVSpill(), lowerVRELOAD(), lowerVSPILL(), MI, MRI, llvm::MachineInstr::NoFlags, llvm::Offset, and llvm::report_fatal_error().
|
override |
Definition at line 60 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 719 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 703 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 713 of file RISCVRegisterInfo.cpp.
References llvm::TargetFrameLowering::hasFP().
|
override |
Definition at line 750 of file RISCVRegisterInfo.cpp.
|
inlineoverride |
Definition at line 134 of file RISCVRegisterInfo.h.
Definition at line 169 of file RISCVRegisterInfo.cpp.
|
override |
Definition at line 765 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 114 of file RISCVRegisterInfo.h.
|
override |
Definition at line 802 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 793 of file RISCVRegisterInfo.cpp.
References DisableCostPerUse, and llvm::MachineFunction::getSubtarget().
|
override |
Definition at line 102 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::RISCVFrameLowering::hasFP(), llvm::report_fatal_error(), and llvm::Reserved.
Referenced by llvm::RISCVTargetLowering::getRegisterByName().
|
override |
Definition at line 164 of file RISCVRegisterInfo.cpp.
References llvm::MachineFunction::getSubtarget().
|
override |
Definition at line 648 of file RISCVRegisterInfo.cpp.
References assert(), getFrameIndexInstrOffset(), MI, and llvm::Offset.
Referenced by needsFrameBaseReg().
|
inlinestatic |
Definition at line 160 of file RISCVRegisterInfo.h.
References llvm::RISCVRI::isVRegClass(), and llvm::TargetRegisterClass::TSFlags.
|
inlinestatic |
Definition at line 156 of file RISCVRegisterInfo.h.
References llvm::RISCVRI::getNF(), llvm::RISCVRI::isVRegClass(), and llvm::TargetRegisterClass::TSFlags.
|
inlinestatic |
Definition at line 151 of file RISCVRegisterInfo.h.
References llvm::RISCVRI::getNF(), llvm::RISCVRI::isVRegClass(), and llvm::TargetRegisterClass::TSFlags.
Referenced by doesRegClassHavePseudoInitUndef().
void RISCVRegisterInfo::lowerVRELOAD | ( | MachineBasicBlock::iterator | II | ) | const |
Definition at line 382 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 305 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 665 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 592 of file RISCVRegisterInfo.cpp.
References assert(), contains(), llvm::RISCVII::getFormat(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::RISCVFrameLowering::hasFP(), llvm::RISCVII::InstFormatI, llvm::RISCVII::InstFormatS, isFrameOffsetLegal(), MI, MRI, and llvm::Offset.
|
inlineoverride |
Definition at line 109 of file RISCVRegisterInfo.h.
|
inlineoverride |
Definition at line 105 of file RISCVRegisterInfo.h.
|
override |
Definition at line 583 of file RISCVRegisterInfo.cpp.
|
override |
Definition at line 685 of file RISCVRegisterInfo.cpp.
References assert(), getFrameIndexInstrOffset(), MI, and llvm::Offset.