mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Add virtual method spillCalleeSaveRegisters() and restoreCalleeSaveRegisters()
to MRegisterInfo. These allow the target to issue instructions to spill and restore callee saved registers in case where individual stores / loads aren't the correct / profitable choice. llvm-svn: 32820
This commit is contained in:
parent
9a1f9dfac9
commit
3eb79afad9
@ -29,6 +29,7 @@ class MachineInstr;
|
||||
class MachineLocation;
|
||||
class MachineMove;
|
||||
class TargetRegisterClass;
|
||||
class CalleeSavedInfo;
|
||||
|
||||
/// TargetRegisterDesc - This record contains all of the information known about
|
||||
/// a particular register. The AliasSet field (if not null) contains a pointer
|
||||
@ -319,6 +320,26 @@ public:
|
||||
// immediates and memory. FIXME: Move these to TargetInstrInfo.h.
|
||||
//
|
||||
|
||||
/// spillCalleeSaveRegisters - Issues instruction(s) to spill all callee saved
|
||||
/// registers and returns true if it isn't possible / profitable to do so by
|
||||
/// issuing a series of store instructions via storeRegToStackSlot(). Returns
|
||||
/// false otherwise.
|
||||
virtual bool spillCalleeSaveRegisters(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MI,
|
||||
const std::vector<CalleeSavedInfo> &CSI) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
/// restoreCalleeSaveRegisters - Issues instruction(s) to restore all callee
|
||||
/// saved registers and returns true if it isn't possible / profitable to do
|
||||
/// so by issuing a series of load instructions via loadRegToStackSlot().
|
||||
/// Returns false otherwise.
|
||||
virtual bool restoreCalleeSaveRegisters(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MI,
|
||||
const std::vector<CalleeSavedInfo> &CSI) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned SrcReg, int FrameIndex,
|
||||
|
Loading…
Reference in New Issue
Block a user