summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-04-10 22:58:43 +0000
committerReid Kleckner <reid@kleckner.net>2014-04-10 22:58:43 +0000
commitbc1fd917f09c1ef295231d88a80874689de2ff7f (patch)
tree317a9a78cf64b575b18adf75f5ffb4e2295cbfc1 /lib/CodeGen/MachineFunction.cpp
parentee66766568d834217fdb08e73e7f1b423b035b0f (diff)
downloadllvm-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 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index 4c5b767b05..013eef71d7 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -123,6 +123,11 @@ getOrCreateJumpTableInfo(unsigned EntryKind) {
return JumpTableInfo;
}
+/// Should we be emitting segmented stack stuff for the function
+bool MachineFunction::shouldSplitStack() {
+ return getFunction()->hasFnAttribute("split-stack");
+}
+
/// RenumberBlocks - This discards all of the MachineBasicBlock numbers and
/// recomputes them. This guarantees that the MBB numbers are sequential,
/// dense, and match the ordering of the blocks within the function. If a