diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-08-30 05:52:20 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-08-30 05:52:20 +0000 |
commit | 35b35c5c320a71e4611fe2101452da685f8eeda0 (patch) | |
tree | c2c368975d01bcc5e02f19a769cc59ec5286d914 /lib | |
parent | 42a0f9a4fb74bf11fdc36a73772b7c9b744cc867 (diff) | |
download | external_llvm-35b35c5c320a71e4611fe2101452da685f8eeda0.zip external_llvm-35b35c5c320a71e4611fe2101452da685f8eeda0.tar.gz external_llvm-35b35c5c320a71e4611fe2101452da685f8eeda0.tar.bz2 |
Add a variant of foldMemoryOperand to fold any load / store, not just load / store from / to stack slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/ARMRegisterInfo.h | 5 | ||||
-rw-r--r-- | lib/Target/Alpha/AlphaRegisterInfo.h | 5 | ||||
-rw-r--r-- | lib/Target/Mips/MipsRegisterInfo.h | 5 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCRegisterInfo.h | 5 | ||||
-rw-r--r-- | lib/Target/Sparc/SparcRegisterInfo.h | 6 |
5 files changed, 26 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMRegisterInfo.h b/lib/Target/ARM/ARMRegisterInfo.h index a425bb6..614eaec 100644 --- a/lib/Target/ARM/ARMRegisterInfo.h +++ b/lib/Target/ARM/ARMRegisterInfo.h @@ -66,6 +66,11 @@ public: MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, int FrameIndex) const; + MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, + MachineInstr* LoadMI) const { + return 0; + } + const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const; const TargetRegisterClass* const* diff --git a/lib/Target/Alpha/AlphaRegisterInfo.h b/lib/Target/Alpha/AlphaRegisterInfo.h index 2872e59..354c3a1 100644 --- a/lib/Target/Alpha/AlphaRegisterInfo.h +++ b/lib/Target/Alpha/AlphaRegisterInfo.h @@ -41,6 +41,11 @@ struct AlphaRegisterInfo : public AlphaGenRegisterInfo { MachineInstr* foldMemoryOperand(MachineInstr *MI, unsigned OpNum, int FrameIndex) const; + MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, + MachineInstr* LoadMI) const { + return 0; + } + void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *RC) const; diff --git a/lib/Target/Mips/MipsRegisterInfo.h b/lib/Target/Mips/MipsRegisterInfo.h index cc8215c..2727910 100644 --- a/lib/Target/Mips/MipsRegisterInfo.h +++ b/lib/Target/Mips/MipsRegisterInfo.h @@ -48,6 +48,11 @@ struct MipsRegisterInfo : public MipsGenRegisterInfo { MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, int FrameIndex) const; + MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, + MachineInstr* LoadMI) const { + return 0; + } + void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *RC) const; diff --git a/lib/Target/PowerPC/PPCRegisterInfo.h b/lib/Target/PowerPC/PPCRegisterInfo.h index 0a1446e..19bec1c 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.h +++ b/lib/Target/PowerPC/PPCRegisterInfo.h @@ -57,6 +57,11 @@ public: virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, int FrameIndex) const; + virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, + MachineInstr* LoadMI) const { + return 0; + } + const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const; const TargetRegisterClass* const* diff --git a/lib/Target/Sparc/SparcRegisterInfo.h b/lib/Target/Sparc/SparcRegisterInfo.h index 451964b..bcb09d4 100644 --- a/lib/Target/Sparc/SparcRegisterInfo.h +++ b/lib/Target/Sparc/SparcRegisterInfo.h @@ -51,6 +51,12 @@ struct SparcRegisterInfo : public SparcGenRegisterInfo { unsigned OpNum, int FrameIndex) const; + virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, + unsigned OpNum, + MachineInstr* LoadMI) const { + return 0; + } + const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const; const TargetRegisterClass* const* getCalleeSavedRegClasses( |