Add a member of type Mips16InstrInfo/MipsSEInstrInfo to class

Mips16RegisterInfo/MipsSERegisterInfo. 

No changes in functionality.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162413 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka
2012-08-22 23:58:53 +00:00
parent a2ea78f132
commit 91a35f03da
6 changed files with 15 additions and 13 deletions

View File

@@ -39,8 +39,8 @@
using namespace llvm; using namespace llvm;
Mips16RegisterInfo::Mips16RegisterInfo(const MipsSubtarget &ST, Mips16RegisterInfo::Mips16RegisterInfo(const MipsSubtarget &ST,
const TargetInstrInfo &TII) const Mips16InstrInfo &I)
: MipsRegisterInfo(ST, TII) {} : MipsRegisterInfo(ST), TII(I) {}
// This function eliminate ADJCALLSTACKDOWN, // This function eliminate ADJCALLSTACKDOWN,
// ADJCALLSTACKUP pseudo instructions // ADJCALLSTACKUP pseudo instructions

View File

@@ -17,11 +17,13 @@
#include "MipsRegisterInfo.h" #include "MipsRegisterInfo.h"
namespace llvm { namespace llvm {
class Mips16InstrInfo;
class Mips16RegisterInfo : public MipsRegisterInfo { class Mips16RegisterInfo : public MipsRegisterInfo {
const Mips16InstrInfo &TII;
public: public:
Mips16RegisterInfo(const MipsSubtarget &Subtarget, Mips16RegisterInfo(const MipsSubtarget &Subtarget, const Mips16InstrInfo &I);
const TargetInstrInfo &TII);
void eliminateCallFramePseudoInstr(MachineFunction &MF, void eliminateCallFramePseudoInstr(MachineFunction &MF,
MachineBasicBlock &MBB, MachineBasicBlock &MBB,

View File

@@ -42,9 +42,8 @@
using namespace llvm; using namespace llvm;
MipsRegisterInfo::MipsRegisterInfo(const MipsSubtarget &ST, MipsRegisterInfo::MipsRegisterInfo(const MipsSubtarget &ST)
const TargetInstrInfo &tii) : MipsGenRegisterInfo(Mips::RA), Subtarget(ST) {}
: MipsGenRegisterInfo(Mips::RA), Subtarget(ST), TII(tii) {}
unsigned MipsRegisterInfo::getPICCallReg() { return Mips::T9; } unsigned MipsRegisterInfo::getPICCallReg() { return Mips::T9; }

View File

@@ -22,16 +22,14 @@
namespace llvm { namespace llvm {
class MipsSubtarget; class MipsSubtarget;
class TargetInstrInfo;
class Type; class Type;
class MipsRegisterInfo : public MipsGenRegisterInfo { class MipsRegisterInfo : public MipsGenRegisterInfo {
protected: protected:
const MipsSubtarget &Subtarget; const MipsSubtarget &Subtarget;
const TargetInstrInfo &TII;
public: public:
MipsRegisterInfo(const MipsSubtarget &Subtarget, const TargetInstrInfo &tii); MipsRegisterInfo(const MipsSubtarget &Subtarget);
/// getRegisterNumbering - Given the enum value for some register, e.g. /// getRegisterNumbering - Given the enum value for some register, e.g.
/// Mips::RA, return the number that it corresponds to (e.g. 31). /// Mips::RA, return the number that it corresponds to (e.g. 31).

View File

@@ -40,8 +40,8 @@
using namespace llvm; using namespace llvm;
MipsSERegisterInfo::MipsSERegisterInfo(const MipsSubtarget &ST, MipsSERegisterInfo::MipsSERegisterInfo(const MipsSubtarget &ST,
const TargetInstrInfo &TII) const MipsSEInstrInfo &I)
: MipsRegisterInfo(ST, TII) {} : MipsRegisterInfo(ST), TII(I) {}
// This function eliminate ADJCALLSTACKDOWN, // This function eliminate ADJCALLSTACKDOWN,
// ADJCALLSTACKUP pseudo instructions // ADJCALLSTACKUP pseudo instructions

View File

@@ -18,11 +18,14 @@
#include "MipsRegisterInfo.h" #include "MipsRegisterInfo.h"
namespace llvm { namespace llvm {
class MipsSEInstrInfo;
class MipsSERegisterInfo : public MipsRegisterInfo { class MipsSERegisterInfo : public MipsRegisterInfo {
const MipsSEInstrInfo &TII;
public: public:
MipsSERegisterInfo(const MipsSubtarget &Subtarget, MipsSERegisterInfo(const MipsSubtarget &Subtarget,
const TargetInstrInfo &TII); const MipsSEInstrInfo &TII);
void eliminateCallFramePseudoInstr(MachineFunction &MF, void eliminateCallFramePseudoInstr(MachineFunction &MF,
MachineBasicBlock &MBB, MachineBasicBlock &MBB,