summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-20 23:49:06 +0000
committerChris Lattner <sabre@nondot.org>2010-11-20 23:49:06 +0000
commita6fd81dd7f6039fbc1a55f6f4d45659fffdd81fb (patch)
treeee418468a7343487eec5d834a5a3137ff9e1b209 /docs
parent5cc88a205dc8c3009cd7f2b8165c2757082871a5 (diff)
downloadllvm-a6fd81dd7f6039fbc1a55f6f4d45659fffdd81fb.tar.gz
llvm-a6fd81dd7f6039fbc1a55f6f4d45659fffdd81fb.tar.bz2
llvm-a6fd81dd7f6039fbc1a55f6f4d45659fffdd81fb.tar.xz
a byval argument without an align can have an arbitrary alignment
requirement on the input pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.html16
1 files changed, 10 insertions, 6 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 1c31e45336..1786e657cb 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -1021,8 +1021,9 @@ declare signext i8 @returns_signed_char()
registers). Use of this attribute is target-specific.</dd>
<dt><tt><b><a name="byval">byval</a></b></tt></dt>
- <dd>This indicates that the pointer parameter should really be passed by value
- to the function. The attribute implies that a hidden copy of the pointee
+ <dd><p>This indicates that the pointer parameter should really be passed by
+ value to the function. The attribute implies that a hidden copy of the
+ pointee
is made between the caller and the callee, so the callee is unable to
modify the value in the callee. This attribute is only valid on LLVM
pointer arguments. It is generally used to pass structs and arrays by
@@ -1030,10 +1031,13 @@ declare signext i8 @returns_signed_char()
to belong to the caller not the callee (for example,
<tt><a href="#readonly">readonly</a></tt> functions should not write to
<tt>byval</tt> parameters). This is not a valid attribute for return
- values. The byval attribute also supports specifying an alignment with
- the align attribute. This has a target-specific effect on the code
- generator that usually indicates a desired alignment for the synthesized
- stack slot.</dd>
+ values.</p>
+
+ <p>The byval attribute also supports specifying an alignment with
+ the align attribute. It indicates the alignment of the stack slot to
+ form and the known alignment of the pointer specified to the call site. If
+ the alignment is not specified, then the code generator makes a
+ target-specific assumption.</p></dd>
<dt><tt><b><a name="sret">sret</a></b></tt></dt>
<dd>This indicates that the pointer parameter specifies the address of a