aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Target/TargetOptions.h2
-rw-r--r--lib/Target/TargetMachine.cpp7
2 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h
index 55d50d977d..e07e8c1cea 100644
--- a/include/llvm/Target/TargetOptions.h
+++ b/include/llvm/Target/TargetOptions.h
@@ -158,6 +158,8 @@ namespace llvm {
/// instead of an ISD::TRAP node.
extern StringRef getTrapFunctionName();
+ extern bool EnableSegmentedStacks;
+
} // End llvm namespace
#endif
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index f74c8c3ecb..fe8a7cebd0 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -47,6 +47,7 @@ namespace llvm {
bool StrongPHIElim;
bool HasDivModLibcall;
bool AsmVerbosityDefault(false);
+ bool EnableSegmentedStacks;
}
static cl::opt<bool, true>
@@ -178,6 +179,12 @@ static cl::opt<bool>
FunctionSections("ffunction-sections",
cl::desc("Emit functions into separate sections"),
cl::init(false));
+static cl::opt<bool, true>
+SegmentedStacks("segmented-stacks",
+ cl::desc("Use segmented stacks if possible."),
+ cl::location(EnableSegmentedStacks),
+ cl::init(false));
+
//---------------------------------------------------------------------------
// TargetMachine Class
//