aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetRegisterInfo.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-02-19 00:16:24 +0000
committerJim Grosbach <grosbach@apple.com>2010-02-19 00:16:24 +0000
commitcf43e60544041c127bb875fe4cf0d0ae96cd6c78 (patch)
tree5087fde8ab41d09ef5e24a0a94c26cdb2ecba0f7 /include/llvm/Target/TargetRegisterInfo.h
parent1b7bf18def8db328bb4efa02c0958ea399e8d8cb (diff)
downloadexternal_llvm-cf43e60544041c127bb875fe4cf0d0ae96cd6c78.zip
external_llvm-cf43e60544041c127bb875fe4cf0d0ae96cd6c78.tar.gz
external_llvm-cf43e60544041c127bb875fe4cf0d0ae96cd6c78.tar.bz2
Radar 7636153. In the presence of large call frames, it's not sufficient
for ARM to just check if a function has a FP to determine if it's safe to simplify the stack adjustment pseudo ops prior to eliminating frame indices. Allow targets to override the default behavior and does so for ARM and Thumb2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetRegisterInfo.h')
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index 65b60f7..212cc93 100644
--- a/include/llvm/Target/TargetRegisterInfo.h
+++ b/include/llvm/Target/TargetRegisterInfo.h
@@ -587,6 +587,17 @@ public:
return !hasFP(MF);
}
+ /// canSimplifyCallFramePseudos - When possible, it's best to simplify the
+ /// call frame pseudo ops before doing frame index elimination. This is
+ /// possible only when frame index references between the pseudos won't
+ /// need adjusted for the call frame adjustments. Normally, that's true
+ /// if the function has a reserved call frame or a frame pointer. Some
+ /// targets (Thumb2, for example) may have more complicated criteria,
+ /// however, and can override this behavior.
+ virtual bool canSimplifyCallFramePseudos(MachineFunction &MF) const {
+ return hasReservedCallFrame(MF) || hasFP(MF);
+ }
+
/// hasReservedSpillSlot - Return true if target has reserved a spill slot in
/// the stack frame of the given function for the specified register. e.g. On
/// x86, if the frame register is required, the first fixed stack object is