aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/MRegisterInfo.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-09-28 00:07:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-09-28 00:07:19 +0000
commit02569d7355b03155b32c1c0d0e46f6aa957f4802 (patch)
tree0ea667903ec20054a8c50662776072dbcec2849c /include/llvm/Target/MRegisterInfo.h
parent31cefb99431a10ced8660b14c61fc2ad6b172f75 (diff)
downloadexternal_llvm-02569d7355b03155b32c1c0d0e46f6aa957f4802.zip
external_llvm-02569d7355b03155b32c1c0d0e46f6aa957f4802.tar.gz
external_llvm-02569d7355b03155b32c1c0d0e46f6aa957f4802.tar.bz2
- Added a hook processFunctionBeforeCalleeSaveScn(). This is called by PEI just
before it determines which callee-save registers are to be spilled. This allows the target to make changes such as forcing certain physical registers to be spilled. - Modified comments. It's important to note the order of registers in the array returns by getCalleeSaveRegs() determines the order of callee save spill code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/MRegisterInfo.h')
-rw-r--r--include/llvm/Target/MRegisterInfo.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h
index 6091c46..a45d53a 100644
--- a/include/llvm/Target/MRegisterInfo.h
+++ b/include/llvm/Target/MRegisterInfo.h
@@ -283,7 +283,9 @@ public:
}
/// getCalleeSaveRegs - Return a null-terminated list of all of the
- /// callee-save registers on this target.
+ /// callee-save registers on this target. The register should be in the
+ /// order of desired callee-save stack frame offset. The first register is
+ /// closed to the incoming stack pointer if stack grows down, and vice versa.
virtual const unsigned* getCalleeSaveRegs() const = 0;
/// getCalleeSaveRegClasses - Return a null-terminated list of the preferred
@@ -371,12 +373,16 @@ public:
assert(0 && "Call Frame Pseudo Instructions do not exist on this target!");
}
+ /// processFunctionBeforeCalleeSaveScan - This method is called immediately
+ /// before PrologEpilogInserter scans the physical registers used to determine
+ /// what callee-save registers should be spilled. This method is optional.
+ virtual void processFunctionBeforeCalleeSaveScan(MachineFunction &MF) const {
+ }
+
/// processFunctionBeforeFrameFinalized - This method is called immediately
/// before the specified functions frame layout (MF.getFrameInfo()) is
/// finalized. Once the frame is finalized, MO_FrameIndex operands are
- /// replaced with direct constants. This method is optional. The return value
- /// is the number of instructions added to (negative if removed from) the
- /// basic block
+ /// replaced with direct constants. This method is optional.
///
virtual void processFunctionBeforeFrameFinalized(MachineFunction &MF) const {
}