Revert r102948.
[oota-llvm.git] / docs / LangRef.html
index aa6b797837c939a565bbea646784d1a0e433b489..9a093577025e1381da9c160d9bc9c87b3e743a88 100644 (file)
@@ -2337,7 +2337,7 @@ has undefined behavior.</p>
    behavior.</p>
 
 <p>There is currently no way of representing a trap value in the IR; they
-   only exist when produced by instructions such as
+   only exist when produced by operations such as
    <a href="#i_add"><tt>add</tt></a> with the <tt>nsw</tt> flag.</p>
 
 <p>Trap value behavior is defined in terms of value <i>dependence</i>:</p>
@@ -2357,16 +2357,18 @@ has undefined behavior.</p>
     <a href="#i_ret"><tt>ret</tt></a> instructions that dynamically transfer
     control back to them.</li>
 
+<li><a href="#i_invoke"><tt>Invoke</tt></a> instructions depend on the
+    <a href="#i_ret"><tt>ret</tt></a>, <a href="#i_unwind"><tt>unwind</tt></a>,
+    or exception-throwing call instructions that dynamically transfer control
+    back to them.</li>
+
 <li>Non-volatile loads and stores depend on the most recent stores to all of the
     referenced memory addresses, following the order in the IR
     (including loads and stores implied by intrinsics such as
     <a href="#int_memcpy"><tt>@llvm.memcpy</tt></a>.)</li>
 
-<!-- FIXME: padding in the middle of a struct -->
-
-<!-- TODO: In the case of multiple threads, this only applies to loads and
-     stores from the same thread as the store, or which are sequenced after the
-     store by synchronization. -->
+<!-- TODO: In the case of multiple threads, this only applies if the store
+     "happens-before" the load or store. -->
 
 <!-- TODO: floating-point exception state -->
 
@@ -2374,15 +2376,11 @@ has undefined behavior.</p>
     recent preceding instruction with externally visible side effects, following
     the order in the IR. (This includes volatile loads and stores.)</li>
 
-<li>An instruction <i>control-depends</i> on a <a href="#i_br"><tt>br</tt></a>,
-    <a href="#i_switch"><tt>switch</tt></a>, or
-    <a href="#i_indirectbr"><tt>indirectbr</tt></a> if the <tt>br</tt>,
-    <tt>switch</tt>, or <tt>indirectbr</tt> has multiple successors and the
-    instruction is always executed when control transfers to one of the
-    successors, and may not be executed when control is transfered to
-    another.</li>
-
-<!-- FIXME: invoke, unwind, exceptions -->
+<li>An instruction <i>control-depends</i> on a
+    <a href="#terminators">terminator instruction</a>
+    if the terminator instruction has multiple successors and the instruction
+    is always executed when control transfers to one of the successors, and
+    may not be executed when control is transfered to another.</li>
 
 <li>Dependence is transitive.</li>
 
@@ -2796,8 +2794,12 @@ should not be exposed to source languages.</p>
 </div>
 
 <div class="doc_text">
-
-<p>TODO: Describe this.</p>
+<pre>
+%0 = type { i32, void ()* }
+@llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, void ()* @ctor }]
+</pre>
+<p>The <tt>@llvm.global_ctors</tt> array contains a list of constructor functions and associated priorities.  The functions referenced by this array will be called in ascending order of priority (i.e. lowest first) when the module is loaded.  The order of functions with the same priority is not defined.
+</p>
 
 </div>
 
@@ -2807,8 +2809,13 @@ should not be exposed to source languages.</p>
 </div>
 
 <div class="doc_text">
+<pre>
+%0 = type { i32, void ()* }
+@llvm.global_dtors = appending global [1 x %0] [%0 { i32 65535, void ()* @dtor }]
+</pre>
 
-<p>TODO: Describe this.</p>
+<p>The <tt>@llvm.global_dtors</tt> array contains a list of destructor functions and associated priorities.  The functions referenced by this array will be called in descending order of priority (i.e. highest first) when the module is loaded.  The order of functions with the same priority is not defined.
+</p>
 
 </div>