80 column rule.
[oota-llvm.git] / docs / LangRef.html
index 553568007f24e5abd11bdfa7f7e14e78f75e1500..88970f971ecad8cb4e3c9cc23e262003e1555c22 100644 (file)
@@ -22,6 +22,7 @@
       <li><a href="#modulestructure">Module Structure</a></li>
       <li><a href="#linkage">Linkage Types</a></li>
       <li><a href="#callingconv">Calling Conventions</a></li>
+      <li><a href="#namedtypes">Named Types</a></li>
       <li><a href="#globalvars">Global Variables</a></li>
       <li><a href="#functionstructure">Functions</a></li>
       <li><a href="#aliasstructure">Aliases</a></li>
@@ -54,6 +55,7 @@
           <li><a href="#t_opaque">Opaque Type</a></li>
         </ol>
       </li>
+      <li><a href="#t_uprefs">Type Up-references</a></li>
     </ol>
   </li>
   <li><a href="#constants">Constants</a>
           <li><a href="#int_it">'<tt>llvm.init.trampoline</tt>' Intrinsic</a></li>
         </ol>
       </li>
-      <li><a href="#int_stackprotect">Stack Protector Intrinsic</a>
-        <ol>
-          <li><a href="#int_ssp">'<tt>llvm.stackprotector</tt>' Intrinsic</a></li>
-        </ol>
-      </li>
       <li><a href="#int_atomics">Atomic intrinsics</a>
         <ol>
           <li><a href="#int_memory_barrier"><tt>llvm.memory_barrier</tt></a></li>
       <li><a href="#int_general">General intrinsics</a>
         <ol>
           <li><a href="#int_var_annotation">
-            <tt>llvm.var.annotation</tt>' Intrinsic</a></li>
+            '<tt>llvm.var.annotation</tt>' Intrinsic</a></li>
           <li><a href="#int_annotation">
-            <tt>llvm.annotation.*</tt>' Intrinsic</a></li>
+            '<tt>llvm.annotation.*</tt>' Intrinsic</a></li>
           <li><a href="#int_trap">
-            <tt>llvm.trap</tt>' Intrinsic</a></li>
+            '<tt>llvm.trap</tt>' Intrinsic</a></li>
+          <li><a href="#int_stackprotector">
+            '<tt>llvm.stackprotector</tt>' Intrinsic</a></li>
         </ol>
       </li>
     </ol>
@@ -444,9 +443,9 @@ symbol table entries. Here is an example of the "hello world" module:</p>
 
 <i>; Definition of main function</i>
 define i32 @main() {                                                 <i>; i32()* </i>
-        <i>; Convert [13x i8 ]* to i8  *...</i>
+        <i>; Convert [13 x i8]* to i8  *...</i>
         %cast210 = <a
- href="#i_getelementptr">getelementptr</a> [13 x i8 ]* @.LC0, i64 0, i64 0 <i>; i8 *</i>
+ href="#i_getelementptr">getelementptr</a> [13 x i8]* @.LC0, i64 0, i64 0 <i>; i8 *</i>
 
         <i>; Call puts function to write out the string to stdout...</i>
         <a
@@ -482,13 +481,20 @@ All Global Variables and Functions have one of the following types of linkage:
 
 <dl>
 
-  <dt><tt><b><a name="linkage_internal">internal</a></b></tt>: </dt>
+  <dt><tt><b><a name="linkage_private">private</a></b></tt>: </dt>
 
-  <dd>Global values with internal linkage are only directly accessible by
+  <dd>Global values with private linkage are only directly accessible by
   objects in the current module.  In particular, linking code into a module with
-  an internal global value may cause the internal to be renamed as necessary to
-  avoid collisions.  Because the symbol is internal to the module, all
-  references can be updated.  This corresponds to the notion of the
+  an private global value may cause the private to be renamed as necessary to
+  avoid collisions.  Because the symbol is private to the module, all
+  references can be updated. This doesn't show up in any symbol table in the
+  object file.
+  </dd>
+
+  <dt><tt><b><a name="linkage_internal">internal</a></b></tt>: </dt>
+
+  <dd> Similar to private, but the value shows as a local symbol (STB_LOCAL in
+  the case of ELF) in the object file. This corresponds to the notion of the
   '<tt>static</tt>' keyword in C.
   </dd>
 
@@ -554,7 +560,7 @@ All Global Variables and Functions have one of the following types of linkage:
   <dd>"<tt>dllimport</tt>" linkage causes the compiler to reference a function
     or variable via a global pointer to a pointer that is set up by the DLL
     exporting the symbol. On Microsoft Windows targets, the pointer name is
-    formed by combining <code>_imp__</code> and the function or variable name.
+    formed by combining <code>__imp_</code> and the function or variable name.
   </dd>
 
   <dt><tt><b><a name="linkage_dllexport">dllexport</a></b></tt>: </dt>
@@ -562,13 +568,13 @@ All Global Variables and Functions have one of the following types of linkage:
   <dd>"<tt>dllexport</tt>" linkage causes the compiler to provide a global
     pointer to a pointer in a DLL, so that it can be referenced with the
     <tt>dllimport</tt> attribute. On Microsoft Windows targets, the pointer
-    name is formed by combining <code>_imp__</code> and the function or variable
+    name is formed by combining <code>__imp_</code> and the function or variable
     name.
   </dd>
 
 </dl>
 
-<p><a name="linkage_external"></a>For example, since the "<tt>.LC0</tt>"
+<p>For example, since the "<tt>.LC0</tt>"
 variable is defined to be internal, if another module defined a "<tt>.LC0</tt>"
 variable and was linked with this one, one of the two would be renamed,
 preventing a collision.  Since "<tt>main</tt>" and "<tt>puts</tt>" are
@@ -683,6 +689,40 @@ All Global Variables and Functions have one of the following visibility styles:
 
 </div>
 
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="namedtypes">Named Types</a>
+</div>
+
+<div class="doc_text">
+
+<p>LLVM IR allows you to specify name aliases for certain types.  This can make
+it easier to read the IR and make the IR more condensed (particularly when
+recursive types are involved).  An example of a name specification is:
+</p>
+
+<div class="doc_code">
+<pre>
+%mytype = type { %mytype*, i32 }
+</pre>
+</div>
+
+<p>You may give a name to any <a href="#typesystem">type</a> except "<a 
+href="t_void">void</a>".  Type name aliases may be used anywhere a type is
+expected with the syntax "%mytype".</p>
+
+<p>Note that type names are aliases for the structural type that they indicate,
+and that you can therefore specify multiple names for the same type.  This often
+leads to confusing behavior when dumping out a .ll file.  Since LLVM IR uses
+structural typing, the name is not part of the type.  When printing out LLVM IR,
+the printer will pick <em>one name</em> to render all types of a particular
+shape.  This means that if you have code where two different source types end up
+having the same LLVM type, that the dumper will sometimes print the "wrong" or
+unexpected type.  This is an important design point and isn't going to
+change.</p>
+
+</div>
+
 <!-- ======================================================================= -->
 <div class="doc_subsection">
   <a name="globalvars">Global Variables</a>
@@ -736,7 +776,7 @@ an initializer, section, and alignment:</p>
 
 <div class="doc_code">
 <pre>
-@G = constant float 1.0 addrspace(5), section "foo", align 4
+@G = addrspace(5) constant float 1.0, section "foo", align 4
 </pre>
 </div>
 
@@ -893,10 +933,19 @@ declare signext i8 @returns_signed_char()
     return values. </dd>
 
     <dt><tt>noalias</tt></dt>
-    <dd>This indicates that the parameter does not alias any global or any other
-    parameter.  The caller is responsible for ensuring that this is the case,
-    usually by placing the value in a stack allocation. This is not a valid
-    attribute for return values.</dd>
+    <dd>This indicates that the pointer does not alias any global or any other
+    parameter.  The caller is responsible for ensuring that this is the
+    case. On a function return value, <tt>noalias</tt> additionally indicates
+    that the pointer does not alias any other pointers visible to the
+    caller. For further details, please see the discussion of the NoAlias
+    response in
+    <a href="http://llvm.org/docs/AliasAnalysis.html#MustMayNo">alias
+    analysis</a>.</dd>
+
+    <dt><tt>nocapture</tt></dt>
+    <dd>This indicates that the callee does not make any copies of the pointer
+    that outlive the callee itself. This is not a valid attribute for return
+    values.</dd>
 
     <dt><tt>nest</tt></dt>
     <dd>This indicates that the pointer parameter can be excised using the
@@ -996,12 +1045,21 @@ state.</dd>
 protector. It is in the form of a "canary"&mdash;a random value placed on the
 stack before the local variables that's checked upon return from the function to
 see if it has been overwritten. A heuristic is used to determine if a function
-needs stack protectors or not.</dd>
+needs stack protectors or not.
+
+<p>If a function that has an <tt>ssp</tt> attribute is inlined into a function
+that doesn't have an <tt>ssp</tt> attribute, then the resulting function will
+have an <tt>ssp</tt> attribute.</p></dd>
 
-<dt><tt>ssp-req</tt></dt>
+<dt><tt>sspreq</tt></dt>
 <dd>This attribute indicates that the function should <em>always</em> emit a
 stack smashing protector. This overrides the <tt><a href="#ssp">ssp</a></tt>
-function attribute.</dd>
+function attribute.
+
+<p>If a function that has an <tt>sspreq</tt> attribute is inlined into a
+function that doesn't have an <tt>sspreq</tt> attribute or which has
+an <tt>ssp</tt> attribute, then the resulting function will have
+an <tt>sspreq</tt> attribute.</p></dd>
 </dl>
 
 </div>
@@ -1286,6 +1344,13 @@ value.</p>
   </tr>
   </tbody>
 </table>
+
+<p>Note that the code generator does not yet support large integer types
+to be used as function return types. The specific limit on how large a
+return type the code generator can currently handle is target-dependent;
+currently it's often 64 bits for 32-bit targets and 128 bits for 64-bit
+targets.</p>
+
 </div>
 
 <!-- _______________________________________________________________________ -->
@@ -1346,6 +1411,11 @@ As a special case, however, zero length arrays are recognized to be variable
 length.  This allows implementation of 'pascal style arrays' with the  LLVM
 type "{ i32, [0 x float]}", for example.</p>
 
+<p>Note that the code generator does not yet support large aggregate types
+to be used as function return types. The specific limit on how large an
+aggregate return type the code generator can currently handle is
+target-dependent, and also dependent on the aggregate element types.</p>
+
 </div>
 
 <!-- _______________________________________________________________________ -->
@@ -1397,8 +1467,8 @@ Variable argument functions can access their arguments with the <a
     </td>
   </tr><tr class="layout">
     <td class="left"><tt>{i32, i32} (i32)</tt></td>
-    <td class="left">A function taking an <tt>i32></tt>, returning two 
-        <tt> i32 </tt> values as an aggregate of type <tt>{ i32, i32 }</tt>
+    <td class="left">A function taking an <tt>i32</tt>, returning two 
+        <tt>i32</tt> values as an aggregate of type <tt>{ i32, i32 }</tt>
     </td>
   </tr>
 </table>
@@ -1431,6 +1501,12 @@ instruction.</p>
       an <tt>i32</tt>.</td>
   </tr>
 </table>
+
+<p>Note that the code generator does not yet support large aggregate types
+to be used as function return types. The specific limit on how large an
+aggregate return type the code generator can currently handle is
+target-dependent, and also dependent on the aggregate element types.</p>
+
 </div>
 
 <!-- _______________________________________________________________________ -->
@@ -1478,7 +1554,7 @@ zero.</p>
 <h5>Examples:</h5>
 <table class="layout">
   <tr class="layout">
-    <td class="left"><tt>[4x i32]*</tt></td>
+    <td class="left"><tt>[4 x i32]*</tt></td>
     <td class="left">A <a href="#t_pointer">pointer</a> to <a
                     href="#t_array">array</a> of four <tt>i32</tt> values.</td>
   </tr>
@@ -1535,6 +1611,12 @@ be any integer or floating point type.</p>
     <td class="left">Vector of 2 64-bit integer values.</td>
   </tr>
 </table>
+
+<p>Note that the code generator does not yet support large vector types
+to be used as function return types. The specific limit on how large a
+vector return type codegen can currently handle is target-dependent;
+currently it's often a few times longer than a hardware vector register.</p>
+
 </div>
 
 <!-- _______________________________________________________________________ -->
@@ -1564,6 +1646,56 @@ structure type).</p>
 </table>
 </div>
 
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="t_uprefs">Type Up-references</a>
+</div>
+
+<div class="doc_text">
+<h5>Overview:</h5>
+<p>
+An "up reference" allows you to refer to a lexically enclosing type without
+requiring it to have a name. For instance, a structure declaration may contain a
+pointer to any of the types it is lexically a member of.  Example of up
+references (with their equivalent as named type declarations) include:</p>
+
+<pre>
+   { \2 * }                %x = type { %t* }
+   { \2 }*                 %y = type { %y }*
+   \1*                     %z = type %z*
+</pre>
+
+<p>
+An up reference is needed by the asmprinter for printing out cyclic types when
+there is no declared name for a type in the cycle.  Because the asmprinter does
+not want to print out an infinite type string, it needs a syntax to handle
+recursive types that have no names (all names are optional in llvm IR).
+</p>
+
+<h5>Syntax:</h5>
+<pre>
+   \&lt;level&gt;
+</pre>
+
+<p>
+The level is the count of the lexical type that is being referred to.
+</p>
+
+<h5>Examples:</h5>
+
+<table class="layout">
+  <tr class="layout">
+    <td class="left"><tt>\1*</tt></td>
+    <td class="left">Self-referential pointer.</td>
+  </tr>
+  <tr class="layout">
+    <td class="left"><tt>{ { \3*, i8 }, i32 }</tt></td>
+    <td class="left">Recursive structure where the upref refers to the out-most
+                     structure.</td>
+  </tr>
+</table>
+</div>
+
 
 <!-- *********************************************************************** -->
 <div class="doc_section"> <a name="constants">Constants</a> </div>
@@ -1983,6 +2115,15 @@ return value.</p>
   ret void                        <i>; Return from a void function</i>
   ret { i32, i8 } { i32 4, i8 2 } <i>; Return an aggregate of values 4 and 2</i>
 </pre>
+
+<p>Note that the code generator does not yet fully support large
+   return values. The specific sizes that are currently supported are
+   dependent on the target. For integers, on 32-bit targets the limit
+   is often 64 bits, and on 64-bit targets the limit is often 128 bits.
+   For aggregate types, the current limits are dependent on the element
+   types; for example targets are often limited to 2 total integer
+   elements and 2 total floating-point elements.</p>
+
 </div>
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection"> <a name="i_br">'<tt>br</tt>' Instruction</a> </div>
@@ -2056,15 +2197,15 @@ branches or with a lookup table.</p>
 <pre>
  <i>; Emulate a conditional br instruction</i>
  %Val = <a href="#i_zext">zext</a> i1 %value to i32
- switch i32 %Val, label %truedest [i32 0, label %falsedest ]
+ switch i32 %Val, label %truedest [ i32 0, label %falsedest ]
 
  <i>; Emulate an unconditional br instruction</i>
  switch i32 0, label %dest [ ]
 
  <i>; Implement a jump table:</i>
- switch i32 %val, label %otherwise [ i32 0, label %onzero 
-                                      i32 1, label %onone 
-                                      i32 2, label %ontwo ]
+ switch i32 %val, label %otherwise [ i32 0, label %onzero
+                                     i32 1, label %onone
+                                     i32 2, label %ontwo ]
 </pre>
 </div>
 
@@ -2575,13 +2716,16 @@ type.  '<tt>op2</tt>' is treated as an unsigned value.</p>
 
 <p>The value produced is <tt>op1</tt> * 2<sup><tt>op2</tt></sup> mod 2<sup>n</sup>,
 where n is the width of the result.  If <tt>op2</tt> is (statically or dynamically) negative or
-equal to or larger than the number of bits in <tt>op1</tt>, the result is undefined.</p>
+equal to or larger than the number of bits in <tt>op1</tt>, the result is undefined.
+If the arguments are vectors, each vector element of <tt>op1</tt> is shifted by the
+corresponding shift amount in <tt>op2</tt>.</p>
 
 <h5>Example:</h5><pre>
   &lt;result&gt; = shl i32 4, %var   <i>; yields {i32}: 4 &lt;&lt; %var</i>
   &lt;result&gt; = shl i32 4, 2      <i>; yields {i32}: 16</i>
   &lt;result&gt; = shl i32 1, 10     <i>; yields {i32}: 1024</i>
   &lt;result&gt; = shl i32 1, 32     <i>; undefined</i>
+  &lt;result&gt; = shl &lt;2 x i32&gt; &lt; i32 1, i32 1&gt;, &lt; i32 1, i32 2&gt;   <i>; yields: result=&lt;2 x i32&gt; &lt; i32 2, i32 4&gt;</i>
 </pre>
 </div>
 <!-- _______________________________________________________________________ -->
@@ -2606,7 +2750,9 @@ type.  '<tt>op2</tt>' is treated as an unsigned value.</p>
 <p>This instruction always performs a logical shift right operation. The most
 significant bits of the result will be filled with zero bits after the 
 shift.  If <tt>op2</tt> is (statically or dynamically) equal to or larger than
-the number of bits in <tt>op1</tt>, the result is undefined.</p>
+the number of bits in <tt>op1</tt>, the result is undefined. If the arguments are
+vectors, each vector element of <tt>op1</tt> is shifted by the corresponding shift
+amount in <tt>op2</tt>.</p>
 
 <h5>Example:</h5>
 <pre>
@@ -2615,6 +2761,7 @@ the number of bits in <tt>op1</tt>, the result is undefined.</p>
   &lt;result&gt; = lshr i8  4, 3   <i>; yields {i8}:result = 0</i>
   &lt;result&gt; = lshr i8 -2, 1   <i>; yields {i8}:result = 0x7FFFFFFF </i>
   &lt;result&gt; = lshr i32 1, 32  <i>; undefined</i>
+  &lt;result&gt; = lshr &lt;2 x i32&gt; &lt; i32 -2, i32 4&gt;, &lt; i32 1, i32 2&gt;   <i>; yields: result=&lt;2 x i32&gt; &lt; i32 0x7FFFFFFF, i32 1&gt;</i>
 </pre>
 </div>
 
@@ -2640,8 +2787,9 @@ type.  '<tt>op2</tt>' is treated as an unsigned value.</p>
 <p>This instruction always performs an arithmetic shift right operation, 
 The most significant bits of the result will be filled with the sign bit 
 of <tt>op1</tt>.  If <tt>op2</tt> is (statically or dynamically) equal to or
-larger than the number of bits in <tt>op1</tt>, the result is undefined.
-</p>
+larger than the number of bits in <tt>op1</tt>, the result is undefined. If the
+arguments are vectors, each vector element of <tt>op1</tt> is shifted by the
+corresponding shift amount in <tt>op2</tt>.</p>
 
 <h5>Example:</h5>
 <pre>
@@ -2650,6 +2798,7 @@ larger than the number of bits in <tt>op1</tt>, the result is undefined.
   &lt;result&gt; = ashr i8  4, 3   <i>; yields {i8}:result = 0</i>
   &lt;result&gt; = ashr i8 -2, 1   <i>; yields {i8}:result = -1</i>
   &lt;result&gt; = ashr i32 1, 32  <i>; undefined</i>
+  &lt;result&gt; = ashr &lt;2 x i32&gt; &lt; i32 -2, i32 4&gt;, &lt; i32 1, i32 3&gt;   <i>; yields: result=&lt;2 x i32&gt; &lt; i32 -1, i32 0&gt;</i>
 </pre>
 </div>
 
@@ -3158,13 +3307,13 @@ choose to align the allocation on any convenient boundary.</p>
 <h5>Semantics:</h5>
 
 <p>Memory is allocated using the system "<tt>malloc</tt>" function, and
-a pointer is returned.  The result of a zero byte allocattion is undefined.  The
+a pointer is returned.  The result of a zero byte allocation is undefined.  The
 result is null if there is insufficient memory available.</p>
 
 <h5>Example:</h5>
 
 <pre>
-  %array  = malloc [4 x i8 ]                    <i>; yields {[%4 x i8]*}:array</i>
+  %array  = malloc [4 x i8                    <i>; yields {[%4 x i8]*}:array</i>
 
   %size   = <a href="#i_add">add</a> i32 2, 2                        <i>; yields {i32}:size = i32 4</i>
   %array1 = malloc i8, i32 4                    <i>; yields {i8*}:array1</i>
@@ -3172,6 +3321,10 @@ result is null if there is insufficient memory available.</p>
   %array3 = malloc i32, i32 4, align 1024       <i>; yields {i32*}:array3</i>
   %array4 = malloc i32, align 1024              <i>; yields {i32*}:array4</i>
 </pre>
+
+<p>Note that the code generator does not yet respect the
+   alignment value.</p>
+
 </div>
 
 <!-- _______________________________________________________________________ -->
@@ -3184,7 +3337,7 @@ result is null if there is insufficient memory available.</p>
 <h5>Syntax:</h5>
 
 <pre>
-  free &lt;type&gt; &lt;value&gt;                              <i>; yields {void}</i>
+  free &lt;type&gt; &lt;value&gt;                           <i>; yields {void}</i>
 </pre>
 
 <h5>Overview:</h5>
@@ -3207,7 +3360,7 @@ is a noop.</p>
 <h5>Example:</h5>
 
 <pre>
-  %array  = <a href="#i_malloc">malloc</a> [4 x i8]                    <i>; yields {[4 x i8]*}:array</i>
+  %array  = <a href="#i_malloc">malloc</a> [4 x i8]                     <i>; yields {[4 x i8]*}:array</i>
             free   [4 x i8]* %array
 </pre>
 </div>
@@ -3258,10 +3411,10 @@ is legal, but the result is undefined.</p>
 <h5>Example:</h5>
 
 <pre>
-  %ptr = alloca i32                              <i>; yields {i32*}:ptr</i>
-  %ptr = alloca i32, i32 4                       <i>; yields {i32*}:ptr</i>
-  %ptr = alloca i32, i32 4, align 1024           <i>; yields {i32*}:ptr</i>
-  %ptr = alloca i32, align 1024                  <i>; yields {i32*}:ptr</i>
+  %ptr = alloca i32                             <i>; yields {i32*}:ptr</i>
+  %ptr = alloca i32, i32 4                      <i>; yields {i32*}:ptr</i>
+  %ptr = alloca i32, i32 4, align 1024          <i>; yields {i32*}:ptr</i>
+  %ptr = alloca i32, align 1024                 <i>; yields {i32*}:ptr</i>
 </pre>
 </div>
 
@@ -3402,8 +3555,8 @@ int *foo(struct ST *s) {
 
 <div class="doc_code">
 <pre>
-%RT = type { i8 , [10 x [20 x i32]], i8  }
-%ST = type { i32, double, %RT }
+%RT = <a href="#namedtypes">type</a> { i8 , [10 x [20 x i32]], i8  }
+%ST = <a href="#namedtypes">type</a> { i32, double, %RT }
 
 define i32* %foo(%ST* %s) {
 entry:
@@ -3997,6 +4150,10 @@ Otherwise, the result is an <tt>i1</tt>.
   &lt;result&gt; = icmp ule i16 -4, 5        <i>; yields: result=false</i>
   &lt;result&gt; = icmp sge i16  4, 5        <i>; yields: result=false</i>
 </pre>
+
+<p>Note that the code generator does not yet support vector types with
+   the <tt>icmp</tt> instruction.</p>
+
 </div>
 
 <!-- _______________________________________________________________________ -->
@@ -4089,6 +4246,10 @@ always yields an <a href="#t_primitive">i1</a> result, as follows:</p>
   &lt;result&gt; = fcmp olt float 4.0, 5.0    <i>; yields: result=true</i>
   &lt;result&gt; = fcmp ueq double 1.0, 2.0   <i>; yields: result=false</i>
 </pre>
+
+<p>Note that the code generator does not yet support vector types with
+   the <tt>fcmp</tt> instruction.</p>
+
 </div>
 
 <!-- _______________________________________________________________________ -->
@@ -4286,6 +4447,10 @@ by element.
 <pre>
   %X = select i1 true, i8 17, i8 42          <i>; yields i8:17</i>
 </pre>
+
+<p>Note that the code generator does not yet support conditions
+   with vector type.</p>
+
 </div>
 
 
@@ -4434,6 +4599,10 @@ argument.</p>
 
 <p>See the <a href="#int_varargs">variable argument processing</a> section.</p>
 
+<p>Note that the code generator does not yet fully support va_arg
+   on many targets. Also, it does not currently support va_arg with
+   aggregate types on any target.</p>
+
 </div>
 
 <!-- *********************************************************************** -->
@@ -5073,7 +5242,13 @@ for more efficient code generation.
 <div class="doc_text">
 
 <h5>Syntax:</h5>
+<p>This is an overloaded intrinsic. You can use llvm.memcpy on any integer bit
+width. Not all targets support all bit widths however.</p>
 <pre>
+  declare void @llvm.memcpy.i8(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
+                                i8 &lt;len&gt;, i32 &lt;align&gt;)
+  declare void @llvm.memcpy.i16(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
+                                i16 &lt;len&gt;, i32 &lt;align&gt;)
   declare void @llvm.memcpy.i32(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
                                 i32 &lt;len&gt;, i32 &lt;align&gt;)
   declare void @llvm.memcpy.i64(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
@@ -5127,7 +5302,13 @@ be set to 0 or 1.
 <div class="doc_text">
 
 <h5>Syntax:</h5>
+<p>This is an overloaded intrinsic. You can use llvm.memmove on any integer bit
+width. Not all targets support all bit widths however.</p>
 <pre>
+  declare void @llvm.memmove.i8(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
+                                 i8 &lt;len&gt;, i32 &lt;align&gt;)
+  declare void @llvm.memmove.i16(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
+                                 i16 &lt;len&gt;, i32 &lt;align&gt;)
   declare void @llvm.memmove.i32(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
                                  i32 &lt;len&gt;, i32 &lt;align&gt;)
   declare void @llvm.memmove.i64(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
@@ -5182,7 +5363,13 @@ be set to 0 or 1.
 <div class="doc_text">
 
 <h5>Syntax:</h5>
+<p>This is an overloaded intrinsic. You can use llvm.memset on any integer bit
+width. Not all targets support all bit widths however.</p>
 <pre>
+  declare void @llvm.memset.i8(i8 * &lt;dest&gt;, i8 &lt;val&gt;,
+                                i8 &lt;len&gt;, i32 &lt;align&gt;)
+  declare void @llvm.memset.i16(i8 * &lt;dest&gt;, i8 &lt;val&gt;,
+                                i16 &lt;len&gt;, i32 &lt;align&gt;)
   declare void @llvm.memset.i32(i8 * &lt;dest&gt;, i8 &lt;val&gt;,
                                 i32 &lt;len&gt;, i32 &lt;align&gt;)
   declare void @llvm.memset.i64(i8 * &lt;dest&gt;, i8 &lt;val&gt;,
@@ -5807,54 +5994,6 @@ declare i8* @llvm.init.trampoline(i8* &lt;tramp&gt;, i8* &lt;func&gt;, i8* &lt;n
 </p>
 </div>
 
-<!-- ======================================================================= -->
-<div class="doc_subsection">
-  <a name="int_stackprotect">Stack Protector Intrinsic</a>
-</div>
-
-<div class="doc_text">
-<p>
-  This intrinsic is used when stack protectors are required. LLVM generates a
-  call to load the randomized stack protector guard's value. The intrinsic is
-  used so that LLVM can ensure that the stack guard is placed onto the stack in
-  the appropriate place&mdash;before local variables are allocated on the stack.
-</p>
-</div>
-
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-  <a name="int_ssp">'<tt>llvm.stackprotector</tt>' Intrinsic</a>
-</div>
-<div class="doc_text">
-<h5>Syntax:</h5>
-<pre>
-declare void @llvm.stackprotector( i8* &lt;guard&gt;, i8** &lt;slot&gt; )
-
-</pre>
-<h5>Overview:</h5>
-<p>
-  The <tt>llvm.stackprotector</tt> intrinsic takes the <tt>guard</tt> and stores
-  it onto the stack at <tt>slot</tt>. The stack slot is adjusted to ensure that
-  it's before local variables are allocated on the stack.
-</p>
-<h5>Arguments:</h5>
-<p>
-  The <tt>llvm.stackprotector</tt> intrinsic requires two pointer arguments. The
-  first argument is the value loaded from the stack guard
-  <tt>@__stack_chk_guard</tt>. The second variable is an <tt>alloca</tt> that
-  has enough space to hold the value of the guard.
-</p>
-<h5>Semantics:</h5>
-<p>
-  This intrinsic causes the prologue/epilogue inserter to force the position of
-  the <tt>AllocaInst</tt> stack slot to be before local variables on the
-  stack. This is to ensure that if a local variable on the stack is overwritten,
-  it will destroy the value of the guard. When the function exits, the guard on
-  the stack is checked against the original guard. If they're different, then
-  the program aborts by calling the <tt>__stack_chk_fail()</tt> function.
-</p>
-</div>
-
 <!-- ======================================================================= -->
 <div class="doc_subsection">
   <a name="int_atomics">Atomic Operations and Synchronization Intrinsics</a>
@@ -6472,13 +6611,47 @@ call of the abort() function.
 </p>
 </div>
 
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+  <a name="int_stackprotector">'<tt>llvm.stackprotector</tt>' Intrinsic</a>
+</div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre>
+declare void @llvm.stackprotector( i8* &lt;guard&gt;, i8** &lt;slot&gt; )
+
+</pre>
+<h5>Overview:</h5>
+<p>
+  The <tt>llvm.stackprotector</tt> intrinsic takes the <tt>guard</tt> and stores
+  it onto the stack at <tt>slot</tt>. The stack slot is adjusted to ensure that
+  it is placed on the stack before local variables.
+</p>
+<h5>Arguments:</h5>
+<p>
+  The <tt>llvm.stackprotector</tt> intrinsic requires two pointer arguments. The
+  first argument is the value loaded from the stack guard
+  <tt>@__stack_chk_guard</tt>. The second variable is an <tt>alloca</tt> that
+  has enough space to hold the value of the guard.
+</p>
+<h5>Semantics:</h5>
+<p>
+  This intrinsic causes the prologue/epilogue inserter to force the position of
+  the <tt>AllocaInst</tt> stack slot to be before local variables on the
+  stack. This is to ensure that if a local variable on the stack is overwritten,
+  it will destroy the value of the guard. When the function exits, the guard on
+  the stack is checked against the original guard. If they're different, then
+  the program aborts by calling the <tt>__stack_chk_fail()</tt> function.
+</p>
+</div>
+
 <!-- *********************************************************************** -->
 <hr>
 <address>
   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
-  src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
+  src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
   <a href="http://validator.w3.org/check/referer"><img
-  src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
+  src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
 
   <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>