Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | BitVector RISCVRegisterInfo::getReservedRegs(const MachineFunction &MF) const { | ||||
return Reserved; | return Reserved; | ||||
} | } | ||||
bool RISCVRegisterInfo::isAsmClobberable(const MachineFunction &MF, | bool RISCVRegisterInfo::isAsmClobberable(const MachineFunction &MF, | ||||
MCRegister PhysReg) const { | MCRegister PhysReg) const { | ||||
return !MF.getSubtarget<RISCVSubtarget>().isRegisterReservedByUser(PhysReg); | return !MF.getSubtarget<RISCVSubtarget>().isRegisterReservedByUser(PhysReg); | ||||
} | } | ||||
bool RISCVRegisterInfo::isConstantPhysReg(MCRegister PhysReg) const { | |||||
return PhysReg == RISCV::X0 || PhysReg == RISCV::VLENB; | |||||
} | |||||
const uint32_t *RISCVRegisterInfo::getNoPreservedMask() const { | const uint32_t *RISCVRegisterInfo::getNoPreservedMask() const { | ||||
return CSR_NoRegs_RegMask; | return CSR_NoRegs_RegMask; | ||||
} | } | ||||
// Frame indexes representing locations of CSRs which are given a fixed location | // Frame indexes representing locations of CSRs which are given a fixed location | ||||
// by save/restore libcalls. | // by save/restore libcalls. | ||||
static const std::pair<unsigned, int> FixedCSRFIMap[] = { | static const std::pair<unsigned, int> FixedCSRFIMap[] = { | ||||
{/*ra*/ RISCV::X1, -1}, | {/*ra*/ RISCV::X1, -1}, | ||||
▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines |