Go to the documentation of this file.
30 #define GET_REGINFO_TARGET_DESC
31 #include "VEGenRegisterInfo.inc"
44 return CSR_preserve_all_SaveList;
56 return CSR_preserve_all_RegMask;
61 return CSR_NoRegs_RegMask;
85 for (
auto R : ReservedRegs)
88 Reserved.
set(*ItAlias);
91 Reserved.
set(VE::VM0);
92 Reserved.
set(VE::VMP0);
109 unsigned Kind)
const {
110 return &VE::I64RegClass;
115 unsigned OffDisp = 2;
117 #define RRCAS_multi_cases(NAME) NAME##rir : case NAME##rii
121 switch (
MI.getOpcode()) {
131 #undef RRCAS_multi_cases
138 unsigned FIOperandNum,
int Offset,
Register FrameReg) {
142 MI.getOperand(FIOperandNum).ChangeToRegister(FrameReg,
false);
147 int SPAdj,
unsigned FIOperandNum,
149 assert(SPAdj == 0 &&
"Unexpected");
153 int FrameIndex =
MI.getOperand(FIOperandNum).getIndex();
163 if (
MI.getOpcode() == VE::STQrii) {
166 Register SrcHiReg = getSubReg(SrcReg, VE::sub_even);
167 Register SrcLoReg = getSubReg(SrcReg, VE::sub_odd);
174 replaceFI(MF, II, *StMI, dl, 0, Offset, FrameReg);
175 MI.setDesc(
TII.get(VE::STrii));
176 MI.getOperand(3).setReg(SrcHiReg);
178 }
else if (
MI.getOpcode() == VE::LDQrii) {
181 Register DestHiReg = getSubReg(DestReg, VE::sub_even);
182 Register DestLoReg = getSubReg(DestReg, VE::sub_odd);
185 BuildMI(*
MI.getParent(), II, dl,
TII.get(VE::LDrii), DestLoReg)
189 replaceFI(MF, II, *StMI, dl, 1, Offset, FrameReg);
190 MI.setDesc(
TII.get(VE::LDrii));
191 MI.getOperand(0).setReg(DestHiReg);
195 replaceFI(MF, II,
MI, dl, FIOperandNum, Offset, FrameReg);
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Code Generation virtual methods...
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
This is an optimization pass for GlobalISel generic memory operations.
const uint32_t * getNoPreservedMask() const override
Register getFrameRegister(const MachineFunction &MF) const override
virtual const TargetInstrInfo * getInstrInfo() const
static unsigned offsetToDisp(MachineInstr &MI)
TargetInstrInfo - Interface to description of machine instruction set.
const HexagonInstrInfo * TII
bool isConstantPhysReg(MCRegister PhysReg) const override
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
@ Fast
Fast - This calling convention attempts to make calls as fast as possible (e.g.
Representation of each machine instruction.
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
static StackOffset getFixed(ScalarTy Fixed)
Wrapper class representing virtual and physical registers.
Function & getFunction()
Return the LLVM function that this machine code represents.
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
const uint32_t * getCallPreservedMask(const MachineFunction &MF, CallingConv::ID CC) const override
BitVector getReservedRegs(const MachineFunction &MF) const override
MachineBasicBlock iterator that automatically skips over MIs that are inside bundles (i....
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind) const override
static void replaceFI(MachineFunction &MF, MachineBasicBlock::iterator II, MachineInstr &MI, const DebugLoc &dl, unsigned FIOperandNum, int Offset, Register FrameReg)
#define RRCAS_multi_cases(NAME)
MCRegAliasIterator enumerates all registers aliasing Reg.
Wrapper class representing physical registers. Should be passed by value.
StackOffset getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const override
getFrameIndexReference - This method should return the base register and offset used to reference a f...