Add an inalloca flag to allocas

Summary:
The only current use of this flag is to mark the alloca as dynamic, even
if its in the entry block.  The stack adjustment for the alloca can
never be folded into the prologue because the call may clear it and it
has to be allocated at the top of the stack.

Reviewers: majnemer

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2571

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199525 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2014-01-17 23:58:17 +00:00
parent 01d9f5972a
commit 3cbfa1617f
10 changed files with 99 additions and 29 deletions

View File

@@ -59,6 +59,11 @@ public:
/// containing function.
bool hasByValAttr() const;
/// \brief Return true if this argument has the byval attribute or inalloca
/// attribute on it in its containing function. These attributes both
/// represent arguments being passed by value.
bool hasByValOrInAllocaAttr() const;
/// \brief If this is a byval or inalloca argument, return its alignment.
unsigned getParamAlignment() const;