diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-07-26 18:55:14 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-07-26 18:55:14 +0000 |
commit | 30b2bdfa734d59bb7bc769dc2f06e4900a77f6f8 (patch) | |
tree | 7e00cb4e5e30bd4adf9e295196424d7767b080ba /lib/Target/ARM/Thumb2RegisterInfo.h | |
parent | 74fb545163e8f9f9f287b397254a82b4cfb2ff52 (diff) | |
download | llvm-30b2bdfa734d59bb7bc769dc2f06e4900a77f6f8.tar.gz llvm-30b2bdfa734d59bb7bc769dc2f06e4900a77f6f8.tar.bz2 llvm-30b2bdfa734d59bb7bc769dc2f06e4900a77f6f8.tar.xz |
Refactor. Get rid of a few more getOpcode() calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Thumb2RegisterInfo.h')
-rw-r--r-- | lib/Target/ARM/Thumb2RegisterInfo.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/Target/ARM/Thumb2RegisterInfo.h b/lib/Target/ARM/Thumb2RegisterInfo.h index 57c0663277..72a1cd1c80 100644 --- a/lib/Target/ARM/Thumb2RegisterInfo.h +++ b/lib/Target/ARM/Thumb2RegisterInfo.h @@ -27,11 +27,6 @@ struct Thumb2RegisterInfo : public ARMBaseRegisterInfo { public: Thumb2RegisterInfo(const ARMBaseInstrInfo &tii, const ARMSubtarget &STI); - // rewrite MI to access 'Offset' bytes from the FP. Return the offset that - // could not be handled directly in MI. - int rewriteFrameIndex(MachineInstr &MI, unsigned FrameRegIdx, - unsigned FrameReg, int Offset) const; - /// emitLoadConstPool - Emits a load from constpool to materialize the /// specified immediate. void emitLoadConstPool(MachineBasicBlock &MBB, @@ -42,6 +37,19 @@ public: unsigned PredReg = 0) const; bool requiresRegisterScavenging(const MachineFunction &MF) const; + + // rewrite MI to access 'Offset' bytes from the FP. Return the offset that + // could not be handled directly in MI. + virtual int + rewriteFrameIndex(MachineInstr &MI, unsigned FrameRegIdx, + unsigned MOVOpc, unsigned ADDriOpc, unsigned SUBriOpc, + unsigned FrameReg, int Offset) const; + + void eliminateFrameIndex(MachineBasicBlock::iterator II, + int SPAdj, RegScavenger *RS = NULL) const { + ARMBaseRegisterInfo::eliminateFrameIndexImpl(II, ARM::t2MOVr, ARM::t2ADDri, + ARM::t2SUBri, SPAdj, RS); + } }; } |