diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-29 17:38:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-29 17:38:47 +0000 |
commit | e27e02b1a48a715be93952a7cef49cdd19e9593b (patch) | |
tree | f6fc396b08e2e9ebdf5377560ab0244b32b9da23 /lib/Target/CellSPU/SPURegisterInfo.h | |
parent | d7ba0f2ade9374adbfa7ce62de5d4982e6e10d9c (diff) | |
download | llvm-e27e02b1a48a715be93952a7cef49cdd19e9593b.tar.gz llvm-e27e02b1a48a715be93952a7cef49cdd19e9593b.tar.bz2 llvm-e27e02b1a48a715be93952a7cef49cdd19e9593b.tar.xz |
From Kalle Raiskila:
"the bigstack patch for SPU, with testcase. It is essentially the patch committed as 97091, and reverted as 97099, but with the following additions:
-in vararg handling, registers are marked to be live, to not confuse the register scavenger
-function prologue and epilogue are not emitted, if the stack size is 16. 16 means it is empty - there is only the register scavenger emergency spill slot, which is not used as there is no stack."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU/SPURegisterInfo.h')
-rw-r--r-- | lib/Target/CellSPU/SPURegisterInfo.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Target/CellSPU/SPURegisterInfo.h b/lib/Target/CellSPU/SPURegisterInfo.h index 48feb5c452..0a70318356 100644 --- a/lib/Target/CellSPU/SPURegisterInfo.h +++ b/lib/Target/CellSPU/SPURegisterInfo.h @@ -53,6 +53,10 @@ namespace llvm { virtual const TargetRegisterClass* const * getCalleeSavedRegClasses(const MachineFunction *MF) const; + //! Allow for scavenging, so we can get scratch registers when needed. + virtual bool requiresRegisterScavenging(const MachineFunction &MF) const + { return true; } + //! Return the reserved registers BitVector getReservedRegs(const MachineFunction &MF) const; @@ -97,6 +101,21 @@ namespace llvm { //! Get DWARF debugging register number int getDwarfRegNum(unsigned RegNum, bool isEH) const; + + //! Convert D-form load/store to X-form load/store + /*! + Converts a regiser displacement load/store into a register-indexed + load/store for large stack frames, when the stack frame exceeds the + range of a s10 displacement. + */ + int convertDFormToXForm(int dFormOpcode) const; + + //! Acquire an unused register in an emergency. + unsigned findScratchRegister(MachineBasicBlock::iterator II, + RegScavenger *RS, + const TargetRegisterClass *RC, + int SPAdj) const; + }; } // end namespace llvm |