From 0f9827cd9417c7385c92fa4a0d8d8b4242b3729d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 30 Aug 2011 19:29:02 +0000 Subject: [PATCH] Command line option to enable support for segmented stacks: -segmented-stacks. Patch by Sanjoy Das! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138811 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetOptions.h | 2 ++ lib/Target/TargetMachine.cpp | 7 +++++++ 2 files changed, 9 insertions(+) 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 // -- 2.34.1