diff options
author | Chris Lattner <sabre@nondot.org> | 2006-02-02 20:12:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-02-02 20:12:32 +0000 |
commit | 408396014742a05cad1c91949d2226169e3f9d80 (patch) | |
tree | bcd6c4a3a88b934ee998a89cdf6a7ec1d9b03bf7 /lib/Target/Alpha/AlphaInstrInfo.cpp | |
parent | af9fa2bd0c1ee25f3adda96b3e5d7129fbab393a (diff) | |
download | llvm-408396014742a05cad1c91949d2226169e3f9d80.tar.gz llvm-408396014742a05cad1c91949d2226169e3f9d80.tar.bz2 llvm-408396014742a05cad1c91949d2226169e3f9d80.tar.xz |
Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,a far more logical place. Other methods should also be moved if anyoneis interested. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaInstrInfo.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaInstrInfo.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Target/Alpha/AlphaInstrInfo.cpp b/lib/Target/Alpha/AlphaInstrInfo.cpp index fc9ace7126..c64fe3bee9 100644 --- a/lib/Target/Alpha/AlphaInstrInfo.cpp +++ b/lib/Target/Alpha/AlphaInstrInfo.cpp @@ -42,3 +42,22 @@ bool AlphaInstrInfo::isMoveInstr(const MachineInstr& MI, } return false; } + +unsigned +AlphaInstrInfo::isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const { + switch (MI->getOpcode()) { + case Alpha::LDL: + case Alpha::LDQ: + case Alpha::LDBU: + case Alpha::LDWU: + case Alpha::LDS: + case Alpha::LDT: + if (MI->getOperand(1).isFrameIndex()) { + FrameIndex = MI->getOperand(1).getFrameIndex(); + return MI->getOperand(0).getReg(); + } + break; + } + return 0; +} + |