diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h index 55d50d977dc..e07e8c1cea0 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 f74c8c3ecb6..fe8a7cebd0a 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 @@ -178,6 +179,12 @@ static cl::opt FunctionSections("ffunction-sections", cl::desc("Emit functions into separate sections"), cl::init(false)); +static cl::opt +SegmentedStacks("segmented-stacks", + cl::desc("Use segmented stacks if possible."), + cl::location(EnableSegmentedStacks), + cl::init(false)); + //--------------------------------------------------------------------------- // TargetMachine Class //