diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-06-27 12:16:40 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-06-27 12:16:40 +0000 |
commit | a98cbc554ca2cd40426e7c3ff8d1467da32e195d (patch) | |
tree | 29ba296b4cc49e49e56e7823ec296f680ec78d77 /lib/Target/ARM/ARMInstrInfo.h | |
parent | 1b573d8b206d5d1a13cbf46b859e35e9fbeb3738 (diff) | |
download | llvm-a98cbc554ca2cd40426e7c3ff8d1467da32e195d.tar.gz llvm-a98cbc554ca2cd40426e7c3ff8d1467da32e195d.tar.bz2 llvm-a98cbc554ca2cd40426e7c3ff8d1467da32e195d.tar.xz |
ARM refactoring. Step 2: split RegisterInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrInfo.h')
-rw-r--r-- | lib/Target/ARM/ARMInstrInfo.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.h b/lib/Target/ARM/ARMInstrInfo.h index 131960b9c7..7e3aa6c7a3 100644 --- a/lib/Target/ARM/ARMInstrInfo.h +++ b/lib/Target/ARM/ARMInstrInfo.h @@ -147,21 +147,10 @@ namespace ARMII { } class ARMBaseInstrInfo : public TargetInstrInfoImpl { - const ARMRegisterInfo RI; protected: // Can be only subclassed. explicit ARMBaseInstrInfo(const ARMSubtarget &STI); public: - - /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As - /// such, whenever a client has an instance of instruction info, it should - /// always be able to get register info as well (through this method). - /// - virtual const ARMRegisterInfo &getRegisterInfo() const { return RI; } - - void reMaterialize(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, - unsigned DestReg, const MachineInstr *Orig) const; - virtual MachineInstr *convertToThreeAddress(MachineFunction::iterator &MFI, MachineBasicBlock::iterator &MBBI, LiveVariables *LV) const; @@ -176,9 +165,6 @@ public: MachineBasicBlock *FBB, const SmallVectorImpl<MachineOperand> &Cond) const; - virtual bool canFoldMemoryOperand(const MachineInstr *MI, - const SmallVectorImpl<unsigned> &Ops) const; - virtual bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const; virtual bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const; @@ -209,9 +195,16 @@ public: }; class ARMInstrInfo : public ARMBaseInstrInfo { + ARMRegisterInfo RI; public: explicit ARMInstrInfo(const ARMSubtarget &STI); + /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As + /// such, whenever a client has an instance of instruction info, it should + /// always be able to get register info as well (through this method). + /// + virtual const ARMRegisterInfo &getRegisterInfo() const { return RI; } + /// Return true if the instruction is a register to register move and return /// the source and dest operands and their sub-register indices by reference. virtual bool isMoveInstr(const MachineInstr &MI, @@ -248,6 +241,12 @@ public: const TargetRegisterClass *RC, SmallVectorImpl<MachineInstr*> &NewMIs) const; + void reMaterialize(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, + unsigned DestReg, const MachineInstr *Orig) const; + + virtual bool canFoldMemoryOperand(const MachineInstr *MI, + const SmallVectorImpl<unsigned> &Ops) const; + virtual MachineInstr* foldMemoryOperandImpl(MachineFunction &MF, MachineInstr* MI, const SmallVectorImpl<unsigned> &Ops, |