Command line option to enable support for segmented stacks:
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 30 Aug 2011 19:29:02 +0000 (19:29 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 30 Aug 2011 19:29:02 +0000 (19:29 +0000)
-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
lib/Target/TargetMachine.cpp

index 55d50d977dc41ccaaebc4dc87b914f5fd48bd3d3..e07e8c1cea080dec44dab6e1b5959e82d82c8476 100644 (file)
@@ -158,6 +158,8 @@ namespace llvm {
   /// instead of an ISD::TRAP node.
   extern StringRef getTrapFunctionName();
 
   /// instead of an ISD::TRAP node.
   extern StringRef getTrapFunctionName();
 
+  extern bool EnableSegmentedStacks;
+
 } // End llvm namespace
 
 #endif
 } // End llvm namespace
 
 #endif
index f74c8c3ecb6a42413a6081ddd849888c375bdff2..fe8a7cebd0a0113e3f9b8a05b1a3be9fa256d876 100644 (file)
@@ -47,6 +47,7 @@ namespace llvm {
   bool StrongPHIElim;
   bool HasDivModLibcall;
   bool AsmVerbosityDefault(false);
   bool StrongPHIElim;
   bool HasDivModLibcall;
   bool AsmVerbosityDefault(false);
+  bool EnableSegmentedStacks;
 }
 
 static cl::opt<bool, true>
 }
 
 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));
 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
 //
 //---------------------------------------------------------------------------
 // TargetMachine Class
 //