From ae43eeae1337ff9d857ccfda26ebaea9afccdd42 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 5 Aug 2013 19:45:44 -0700 Subject: [PATCH] Add the "no-split-stack" attribute This disable emission of segmented-stack prologues on a per-function basis, even if segmented stacks are turned on globally. --- lib/CodeGen/PrologEpilogInserter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index f93195625b81..aecb25ce0d6d 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -680,7 +680,8 @@ void PEI::insertPrologEpilogCode(MachineFunction &Fn) { // we've been asked for it. This, when linked with a runtime with support // for segmented stacks (libgcc is one), will result in allocating stack // space in small chunks instead of one large contiguous block. - if (Fn.getTarget().Options.EnableSegmentedStacks) + if (Fn.getTarget().Options.EnableSegmentedStacks && + !Fn.getFunction()->hasFnAttribute("no-split-stack")) TFI.adjustForSegmentedStacks(Fn); // Emit additional code that is required to explicitly handle the stack in