diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-01-30 01:18:38 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-30 01:18:38 +0000 |
commit | d1b2c1e88fe4a7728ca9739b0f1c6fd90a19c5fd (patch) | |
tree | a06f37be3684c1db7e3e3182bf132703a45bc1b2 /lib/Target/ARM/ARMMachineFunctionInfo.h | |
parent | 225dfe973bd85e36ff16fe7a08e458f285703cc9 (diff) | |
download | llvm-d1b2c1e88fe4a7728ca9739b0f1c6fd90a19c5fd.tar.gz llvm-d1b2c1e88fe4a7728ca9739b0f1c6fd90a19c5fd.tar.bz2 llvm-d1b2c1e88fe4a7728ca9739b0f1c6fd90a19c5fd.tar.xz |
- In thumb mode, if size of MachineFunction is >= 2048, force LR to be
spilled (if it is not already).
- If LR is spilled, use BL to implement far jumps. LR is not used as a GPR
in thumb mode so it can be clobbered if it is properly spilled / restored
in prologue / epilogue.
- If LR is force spilled but no far jump has been emitted, try undo'ing the
spill by:
push lr -> delete
pop pc -> bx lr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMMachineFunctionInfo.h')
-rw-r--r-- | lib/Target/ARM/ARMMachineFunctionInfo.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Target/ARM/ARMMachineFunctionInfo.h b/lib/Target/ARM/ARMMachineFunctionInfo.h index 6ce4d532ff..6b3ac21d52 100644 --- a/lib/Target/ARM/ARMMachineFunctionInfo.h +++ b/lib/Target/ARM/ARMMachineFunctionInfo.h @@ -36,9 +36,9 @@ class ARMFunctionInfo : public MachineFunctionInfo { /// processFunctionBeforeCalleeSavedScan(). bool HasStackFrame; - /// LRSpilled - True if the LR register has been spilled. - /// - bool LRSpilled; + /// LRSForceSpilled - True if the LR register has been for spilled to enable + /// far jump. + bool LRForceSpilled; /// FramePtrSpillOffset - If HasStackFrame, this records the frame pointer /// spill stack offset. @@ -75,13 +75,13 @@ class ARMFunctionInfo : public MachineFunctionInfo { public: ARMFunctionInfo() : isThumb(false), - VarArgsRegSaveSize(0), HasStackFrame(false), LRSpilled(false), + VarArgsRegSaveSize(0), HasStackFrame(false), LRForceSpilled(false), FramePtrSpillOffset(0), GPRCS1Offset(0), GPRCS2Offset(0), DPRCSOffset(0), GPRCS1Size(0), GPRCS2Size(0), DPRCSSize(0), JumpTableUId(0) {} ARMFunctionInfo(MachineFunction &MF) : isThumb(MF.getTarget().getSubtarget<ARMSubtarget>().isThumb()), - VarArgsRegSaveSize(0), HasStackFrame(false), LRSpilled(false), + VarArgsRegSaveSize(0), HasStackFrame(false), LRForceSpilled(false), FramePtrSpillOffset(0), GPRCS1Offset(0), GPRCS2Offset(0), DPRCSOffset(0), GPRCS1Size(0), GPRCS2Size(0), DPRCSSize(0), JumpTableUId(0) {} @@ -93,8 +93,8 @@ public: bool hasStackFrame() const { return HasStackFrame; } void setHasStackFrame(bool s) { HasStackFrame = s; } - bool isLRSpilled() const { return LRSpilled; } - void setLRIsSpilled(bool s) { LRSpilled = s; } + bool isLRForceSpilled() const { return LRForceSpilled; } + void setLRIsForceSpilled(bool s) { LRForceSpilled = s; } unsigned getFramePtrSpillOffset() const { return FramePtrSpillOffset; } void setFramePtrSpillOffset(unsigned o) { FramePtrSpillOffset = o; } |