diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-04-10 22:58:43 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-04-10 22:58:43 +0000 |
commit | bc1fd917f09c1ef295231d88a80874689de2ff7f (patch) | |
tree | 317a9a78cf64b575b18adf75f5ffb4e2295cbfc1 /include/llvm | |
parent | ee66766568d834217fdb08e73e7f1b423b035b0f (diff) | |
download | llvm-bc1fd917f09c1ef295231d88a80874689de2ff7f.tar.gz llvm-bc1fd917f09c1ef295231d88a80874689de2ff7f.tar.bz2 llvm-bc1fd917f09c1ef295231d88a80874689de2ff7f.tar.xz |
Move the segmented stack switch to a function attribute
This removes the -segmented-stacks command line flag in favor of a
per-function "split-stack" attribute.
Patch by Luqman Aden and Alex Crichton!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CodeGen/CommandFlags.h | 6 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 3 | ||||
-rw-r--r-- | include/llvm/Target/TargetOptions.h | 5 |
3 files changed, 4 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/CommandFlags.h b/include/llvm/CodeGen/CommandFlags.h index 02a4bb5537..0fe9e141b5 100644 --- a/include/llvm/CodeGen/CommandFlags.h +++ b/include/llvm/CodeGen/CommandFlags.h @@ -190,11 +190,6 @@ EnablePIE("enable-pie", cl::init(false)); cl::opt<bool> -SegmentedStacks("segmented-stacks", - cl::desc("Use segmented stacks if possible."), - cl::init(false)); - -cl::opt<bool> UseInitArray("use-init-array", cl::desc("Use .init_array instead of .ctors."), cl::init(false)); @@ -229,7 +224,6 @@ static inline TargetOptions InitTargetOptionsFromCodeGenFlags() { Options.StackAlignmentOverride = OverrideStackAlignment; Options.TrapFuncName = TrapFuncName; Options.PositionIndependentExecutable = EnablePIE; - Options.EnableSegmentedStacks = SegmentedStacks; Options.UseInitArray = UseInitArray; return Options; } diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 652d63dbbf..a55d436848 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -259,6 +259,9 @@ public: return MBBNumbering[N]; } + /// Should we be emitting segmented stack stuff for the function + bool shouldSplitStack(); + /// getNumBlockIDs - Return the number of MBB ID's allocated. /// unsigned getNumBlockIDs() const { return (unsigned)MBBNumbering.size(); } diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h index 1f873439c6..122324fbb0 100644 --- a/include/llvm/Target/TargetOptions.h +++ b/include/llvm/Target/TargetOptions.h @@ -49,7 +49,7 @@ namespace llvm { JITEmitDebugInfoToDisk(false), GuaranteedTailCallOpt(false), DisableTailCalls(false), StackAlignmentOverride(0), EnableFastISel(false), PositionIndependentExecutable(false), - EnableSegmentedStacks(false), UseInitArray(false), + UseInitArray(false), DisableIntegratedAS(false), CompressDebugSections(false), TrapFuncName(""), FloatABIType(FloatABI::Default), AllowFPOpFusion(FPOpFusion::Standard) {} @@ -152,8 +152,6 @@ namespace llvm { /// if the relocation model is anything other than PIC. unsigned PositionIndependentExecutable : 1; - unsigned EnableSegmentedStacks : 1; - /// UseInitArray - Use .init_array instead of .ctors for static /// constructors. unsigned UseInitArray : 1; @@ -217,7 +215,6 @@ inline bool operator==(const TargetOptions &LHS, ARE_EQUAL(StackAlignmentOverride) && ARE_EQUAL(EnableFastISel) && ARE_EQUAL(PositionIndependentExecutable) && - ARE_EQUAL(EnableSegmentedStacks) && ARE_EQUAL(UseInitArray) && ARE_EQUAL(TrapFuncName) && ARE_EQUAL(FloatABIType) && |