[PATCH] Add an inalloca flag to allocas
David Majnemer
david.majnemer at gmail.com
Fri Jan 17 15:48:27 PST 2014
LGTM
================
Comment at: docs/LangRef.rst:734
@@ +733,3 @@
+ The alloca, or argument allocation, must also be tagged with the
+ inalloca keyword. Only the past argument may have the ``inalloca``
+ attribute, and that argument is guaranteed to be passed in memory.
----------------
Should "past" be "last" instead?
================
Comment at: include/llvm/IR/Instructions.h:104
@@ -103,3 +103,3 @@
unsigned getAlignment() const {
- return (1u << getSubclassDataFromInstruction()) >> 1;
+ return (1u << (getSubclassDataFromInstruction() & 31)) >> 1;
}
----------------
This is fine because we don't support alignments larger than 536870912 (which would leave us with bits 30 and 31 free).
I would have an assert relating with Value::MaximumAlignment.
http://llvm-reviews.chandlerc.com/D2571
BRANCH
inalloca
ARCANIST PROJECT
llvm
More information about the llvm-commits
mailing list