summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-04-21 03:18:23 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-04-21 03:18:23 +0000
commite566763b1915c7a4821ce95937b763724d271fec (patch)
treea360b0044ed2847396555f4ea4c4585c916a45ec /include
parent5528e7bcb1209094a68bbf6d1efeefc3ca34774f (diff)
downloadllvm-e566763b1915c7a4821ce95937b763724d271fec.tar.gz
llvm-e566763b1915c7a4821ce95937b763724d271fec.tar.bz2
llvm-e566763b1915c7a4821ce95937b763724d271fec.tar.xz
Implement -disable-non-leaf-fp-elim which disable frame pointer elimination
optimization for non-leaf functions. This will be hooked up to gcc's -momit-leaf-frame-pointer option. rdar://7886181 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetOptions.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h
index a01a67f14d..fb5698f1af 100644
--- a/include/llvm/Target/TargetOptions.h
+++ b/include/llvm/Target/TargetOptions.h
@@ -16,6 +16,8 @@
#define LLVM_TARGET_TARGETOPTIONS_H
namespace llvm {
+ class MachineFunction;
+
// Possible float ABI settings. Used with FloatABIType in TargetOptions.h.
namespace FloatABI {
enum ABIType {
@@ -35,6 +37,16 @@ namespace llvm {
/// elimination optimization, this option should disable it.
extern bool NoFramePointerElim;
+ /// NoFramePointerElimNonLeaf - This flag is enabled when the
+ /// -disable-non-leaf-fp-elim is specified on the command line. If the target
+ /// supports the frame pointer elimination optimization, this option should
+ /// disable it for non-leaf functions.
+ extern bool NoFramePointerElimNonLeaf;
+
+ /// DisableFramePointerElim - This returns true if frame pointer elimination
+ /// optimization should be disabled for the given machine function.
+ extern bool DisableFramePointerElim(const MachineFunction &MF);
+
/// LessPreciseFPMAD - This flag is enabled when the
/// -enable-fp-mad is specified on the command line. When this flag is off
/// (the default), the code generator is not allowed to generate mad