1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[VE] Adapt aa26dd985848364df01d3f8f0f3eaccfd5ee80dc and 2481f26ac3f228cc085d4d68ee72dadc07afa48f

This commit is contained in:
Fangrui Song 2020-04-07 15:41:04 -07:00
parent 0ca1ed2836
commit c3d83ed19e
4 changed files with 7 additions and 7 deletions

View File

@ -305,7 +305,7 @@ bool VEFrameLowering::hasFP(const MachineFunction &MF) const {
}
int VEFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
unsigned &FrameReg) const {
Register &FrameReg) const {
const VESubtarget &Subtarget = MF.getSubtarget<VESubtarget>();
const MachineFrameInfo &MFI = MF.getFrameInfo();
const VERegisterInfo *RegInfo = Subtarget.getRegisterInfo();

View File

@ -44,7 +44,7 @@ public:
RegScavenger *RS = nullptr) const override;
int getFrameIndexReference(const MachineFunction &MF, int FI,
unsigned &FrameReg) const override;
Register &FrameReg) const override;
const SpillSlot *
getCalleeSavedSpillSlots(unsigned &NumEntries) const override {

View File

@ -75,7 +75,7 @@ BitVector VERegisterInfo::getReservedRegs(const MachineFunction &MF) const {
return Reserved;
}
bool VERegisterInfo::isConstantPhysReg(unsigned PhysReg) const { return false; }
bool VERegisterInfo::isConstantPhysReg(MCRegister PhysReg) const { return false; }
const TargetRegisterClass *
VERegisterInfo::getPointerRegClass(const MachineFunction &MF,
@ -85,11 +85,11 @@ VERegisterInfo::getPointerRegClass(const MachineFunction &MF,
static void replaceFI(MachineFunction &MF, MachineBasicBlock::iterator II,
MachineInstr &MI, const DebugLoc &dl,
unsigned FIOperandNum, int Offset, unsigned FramePtr) {
unsigned FIOperandNum, int Offset, Register FrameReg) {
// Replace frame index with a frame pointer reference directly.
// VE has 32 bit offset field, so no need to expand a target instruction.
// Directly encode it.
MI.getOperand(FIOperandNum).ChangeToRegister(FramePtr, false);
MI.getOperand(FIOperandNum).ChangeToRegister(FrameReg, false);
MI.getOperand(FIOperandNum + 2).ChangeToImmediate(Offset);
}
@ -104,7 +104,7 @@ void VERegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
MachineFunction &MF = *MI.getParent()->getParent();
const VEFrameLowering *TFI = getFrameLowering(MF);
unsigned FrameReg;
Register FrameReg;
int Offset;
Offset = TFI->getFrameIndexReference(MF, FrameIndex, FrameReg);

View File

@ -30,7 +30,7 @@ public:
const uint32_t *getNoPreservedMask() const override;
BitVector getReservedRegs(const MachineFunction &MF) const override;
bool isConstantPhysReg(unsigned PhysReg) const override;
bool isConstantPhysReg(MCRegister PhysReg) const override;
const TargetRegisterClass *getPointerRegClass(const MachineFunction &MF,
unsigned Kind) const override;