[llvm-commits] [llvm] r93170 - /llvm/trunk/docs/LangRef.html

Jeffrey Yasskin jyasskin at google.com
Mon Jan 11 11:19:26 PST 2010


Author: jyasskin
Date: Mon Jan 11 13:19:26 2010
New Revision: 93170

URL: http://llvm.org/viewvc/llvm-project?rev=93170&view=rev
Log:
Improve unclear bits and inaccuracies in structure and insertvalue
documentation.

Patch by Dustin Laurence!

Modified:
    llvm/trunk/docs/LangRef.html

Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=93170&r1=93169&r2=93170&view=diff

==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Mon Jan 11 13:19:26 2010
@@ -1656,10 +1656,12 @@
    underlying processor.  The elements of a structure may be any type that has a
    size.</p>
 
-<p>Structures are accessed using '<tt><a href="#i_load">load</a></tt> and
-   '<tt><a href="#i_store">store</a></tt>' by getting a pointer to a field with
-   the '<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction.</p>
-
+<p>Structures in memory are accessed using '<tt><a href="#i_load">load</a></tt>'
+   and '<tt><a href="#i_store">store</a></tt>' by getting a pointer to a field
+   with the '<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction.
+   Structures in registers are accessed using the
+   '<tt><a href="#i_extractvalue">extractvalue</a></tt>' and
+   '<tt><a href="#i_insertvalue">insertvalue</a></tt>' instructions.</p>
 <h5>Syntax:</h5>
 <pre>
   { <type list> }
@@ -3858,7 +3860,7 @@
 
 <h5>Syntax:</h5>
 <pre>
-  <result> = insertvalue <aggregate type> <val>, <ty> <val>, <idx>    <i>; yields <n x <ty>></i>
+  <result> = insertvalue <aggregate type> <val>, <ty> <elt>, <idx>    <i>; yields <aggregate type></i>
 </pre>
 
 <h5>Overview:</h5>
@@ -3883,7 +3885,8 @@
 
 <h5>Example:</h5>
 <pre>
-  <result> = insertvalue {i32, float} %agg, i32 1, 0    <i>; yields {i32, float}</i>
+  %agg1 = insertvalue {i32, float} undef, i32 1, 0         <i>; yields {i32 1, float undef}</i>
+  %agg2 = insertvalue {i32, float} %agg1, float %val, 1    <i>; yields {i32 1, float %val}</i>
 </pre>
 
 </div>





More information about the llvm-commits mailing list