[PATCH] Begin adding docs and IR-level support for the inalloca attribute

Meador Inge meadori at gmail.com
Wed Nov 13 16:43:49 PST 2013

Comment at: docs/LangRef.rst:716
@@ +715,3 @@
+    Any use of ``inalloca`` arguments must comply with the target's ABI.
+    ``inalloca`` cannot be applied to parameters are passed in
+    registers, and the allocas must be executed in the order in which
"... that are passed ..."?

Comment at: lib/IR/Function.cpp:86
@@ -85,2 +85,3 @@
+bool Argument::hasInAllocaAttr() const {
Minor nit, but most of the surrounding Argument:: queries in this file have header comments.

Comment at: test/Verifier/inalloca1.ll:10
@@ +9,2 @@
+declare void @d(void ()* inalloca %p)
+; CHECK: do not support unsized types
Some more tests for the other attribute incompatibilities and return value check would be nice.

Comment at: docs/LangRef.rst:713
@@ +712,3 @@
+    with ``byval``, ``readonly``, and others. These rules are enforced
+    by the verifier.
I don't see where 'readonly' is actually checked in the verifier.  Also, the last sentence makes it sound like the "must be an alloca" and "must be used at most once" constraints are checked as well, but I don't see where.


More information about the llvm-commits mailing list