[llvm-commits] CVS: llvm/docs/LangRef.html

Reid Spencer reid at x10sys.com
Mon Jan 15 10:27:55 PST 2007



Changes in directory llvm/docs:

LangRef.html updated: 1.198 -> 1.199
---
Log message:

Update documentation for parameter attributes for the syntax change.


---
Diffs of the changes:  (+11 -9)

 LangRef.html |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.198 llvm/docs/LangRef.html:1.199
--- llvm/docs/LangRef.html:1.198	Sun Jan 14 19:54:13 2007
+++ llvm/docs/LangRef.html	Mon Jan 15 12:27:39 2007
@@ -687,27 +687,29 @@
   type so two functions types that differ only by the parameter attributes 
   are different function types.</p>
 
-  <p>Parameter attributes consist of an at sign (@) followed by either a single
-  keyword or a comma separate list of keywords enclosed in parentheses. For
+  <p>Parameter attributes are simple keywords that follow the type specified. If
+  multiple parameter attributes are needed, they are space separated. For 
   example:</p><pre>
-    %someFunc = i16 @zext (i8 @(sext) %someParam)
-    %someFunc = i16 @zext (i8 @zext %someParam)</pre>
+    %someFunc = i16 (i8 sext %someParam) zext
+    %someFunc = i16 (i8 zext %someParam) zext</pre>
   <p>Note that the two function types above are unique because the parameter has
-  a different attribute (@sext in the first one, @zext in the second).</p>
+  a different attribute (sext in the first one, zext in the second). Also note
+  that the attribute for the function result (zext) comes immediately after the
+  argument list.</p>
 
   <p>Currently, only the following parameter attributes are defined:</p>
   <dl>
-    <dt><tt>@zext</tt></dt>
+    <dt><tt>zext</tt></dt>
     <dd>This indicates that the parameter should be zero extended just before
     a call to this function.</dd>
-    <dt><tt>@sext</tt></dt>
+    <dt><tt>sext</tt></dt>
     <dd>This indicates that the parameter should be sign extended just before
     a call to this function.</dd>
   </dl>
 
   <p>The current motivation for parameter attributes is to enable the sign and
   zero extend information necessary for the C calling convention to be passed
-  from the front end to LLVM. The <tt>@zext</tt> and <tt>@sext</tt> attributes
+  from the front end to LLVM. The <tt>zext</tt> and <tt>sext</tt> attributes
   are used by the code generator to perform the required extension. However, 
   parameter attributes are an orthogonal feature to calling conventions and
   may be used for other purposes in the future.</p>
@@ -4485,7 +4487,7 @@
 
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2007/01/15 01:54:13 $
+  Last modified: $Date: 2007/01/15 18:27:39 $
 </address>
 </body>
 </html>






More information about the llvm-commits mailing list