From 2f8fb4d1cde803aee60171ce73a7f5a95868ff84 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 7 Apr 2020 15:41:04 -0700 Subject: [PATCH] [VE] Adapt aa26dd985848364df01d3f8f0f3eaccfd5ee80dc and 2481f26ac3f228cc085d4d68ee72dadc07afa48f --- llvm/lib/Target/VE/VEFrameLowering.cpp | 2 +- llvm/lib/Target/VE/VEFrameLowering.h | 2 +- llvm/lib/Target/VE/VERegisterInfo.cpp | 8 ++++---- llvm/lib/Target/VE/VERegisterInfo.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Target/VE/VEFrameLowering.cpp b/llvm/lib/Target/VE/VEFrameLowering.cpp index 3eafc8e..2230a5e 100644 --- a/llvm/lib/Target/VE/VEFrameLowering.cpp +++ b/llvm/lib/Target/VE/VEFrameLowering.cpp @@ -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(); const MachineFrameInfo &MFI = MF.getFrameInfo(); const VERegisterInfo *RegInfo = Subtarget.getRegisterInfo(); diff --git a/llvm/lib/Target/VE/VEFrameLowering.h b/llvm/lib/Target/VE/VEFrameLowering.h index 97e31d2..de0227e 100644 --- a/llvm/lib/Target/VE/VEFrameLowering.h +++ b/llvm/lib/Target/VE/VEFrameLowering.h @@ -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 { diff --git a/llvm/lib/Target/VE/VERegisterInfo.cpp b/llvm/lib/Target/VE/VERegisterInfo.cpp index e37a8c8..b0ddc95 100644 --- a/llvm/lib/Target/VE/VERegisterInfo.cpp +++ b/llvm/lib/Target/VE/VERegisterInfo.cpp @@ -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); diff --git a/llvm/lib/Target/VE/VERegisterInfo.h b/llvm/lib/Target/VE/VERegisterInfo.h index 9cb475f..9a32da1 100644 --- a/llvm/lib/Target/VE/VERegisterInfo.h +++ b/llvm/lib/Target/VE/VERegisterInfo.h @@ -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; -- 2.7.4