Save all registers by default, as they can be used to pass parameters
[oota-llvm.git] / docs / ProgrammersManual.html
index 950c937824ae2cc2ed802badd7567a36ffcdcd1d..9ecafe5dc5fad34fa369cc3ac340262356df42ef 100644 (file)
@@ -35,7 +35,7 @@ option</a>
 and the <tt>-debug-only</tt> option</a> </li>
         </ul>
       </li>
-      <li><a href="#Statistic">The <tt>Statistic</tt> template &amp; <tt>-stats</tt>
+      <li><a href="#Statistic">The <tt>Statistic</tt> class &amp; <tt>-stats</tt>
 option</a></li>
 <!--
       <li>The <tt>InstVisitor</tt> template
@@ -99,6 +99,7 @@ with another <tt>Value</tt></a> </li>
 
   <li><a href="#coreclasses">The Core LLVM Class Hierarchy Reference</a>
     <ul>
+      <li><a href="#Type">The <tt>Type</tt> class</a> </li>
       <li><a href="#Value">The <tt>Value</tt> class</a>
         <ul>
           <li><a href="#User">The <tt>User</tt> class</a>
@@ -122,7 +123,6 @@ with another <tt>Value</tt></a> </li>
               </li>
            </ul>
          </li>
-          <li><a href="#Type">The <tt>Type</tt> class</a> </li>
           <li><a href="#Argument">The <tt>Argument</tt> class</a></li>
         </ul>
       </li>
@@ -395,7 +395,7 @@ tool) is run with the '<tt>-debug</tt>' command line argument:</p>
 
 <div class="doc_code">
 <pre>
-DEBUG(std::cerr &lt;&lt; "I am here!\n");
+DOUT &lt;&lt; "I am here!\n";
 </pre>
 </div>
 
@@ -440,16 +440,16 @@ option as follows:</p>
 
 <div class="doc_code">
 <pre>
-DEBUG(std::cerr &lt;&lt; "No debug type\n");
+DOUT &lt;&lt; "No debug type\n";
 #undef  DEBUG_TYPE
 #define DEBUG_TYPE "foo"
-DEBUG(std::cerr &lt;&lt; "'foo' debug type\n");
+DOUT &lt;&lt; "'foo' debug type\n";
 #undef  DEBUG_TYPE
 #define DEBUG_TYPE "bar"
-DEBUG(std::cerr &lt;&lt; "'bar' debug type\n");
+DOUT &lt;&lt; "'bar' debug type\n";
 #undef  DEBUG_TYPE
 #define DEBUG_TYPE ""
-DEBUG(std::cerr &lt;&lt; "No debug type (2)\n");
+DOUT &lt;&lt; "No debug type (2)\n";
 </pre>
 </div>
 
@@ -485,7 +485,7 @@ even if the source lives in multiple files.</p>
 
 <!-- ======================================================================= -->
 <div class="doc_subsection">
-  <a name="Statistic">The <tt>Statistic</tt> template &amp; <tt>-stats</tt>
+  <a name="Statistic">The <tt>Statistic</tt> class &amp; <tt>-stats</tt>
   option</a>
 </div>
 
@@ -493,7 +493,7 @@ even if the source lives in multiple files.</p>
 
 <p>The "<tt><a
 href="/doxygen/Statistic_8h-source.html">llvm/ADT/Statistic.h</a></tt>" file
-provides a template named <tt>Statistic</tt> that is used as a unified way to
+provides a class named <tt>Statistic</tt> that is used as a unified way to
 keep track of what the LLVM compiler is doing and how effective various
 optimizations are.  It is useful to see what optimizations are contributing to
 making a particular program run faster.</p>
@@ -501,7 +501,7 @@ making a particular program run faster.</p>
 <p>Often you may run your pass on some big program, and you're interested to see
 how many times it makes a certain transformation.  Although you can do this with
 hand inspection, or some ad-hoc method, this is a real pain and not very useful
-for big programs.  Using the <tt>Statistic</tt> template makes it very easy to
+for big programs.  Using the <tt>Statistic</tt> class makes it very easy to
 keep track of this information, and the calculated information is presented in a
 uniform manner with the rest of the passes being executed.</p>
 
@@ -513,13 +513,15 @@ it are as follows:</p>
 
 <div class="doc_code">
 <pre>
-static Statistic&lt;&gt; NumXForms("mypassname", "The # of times I did stuff");
+#define <a href="#DEBUG_TYPE">DEBUG_TYPE</a> "mypassname"   <i>// This goes before any #includes.</i>
+STATISTIC(NumXForms, "The # of times I did stuff");
 </pre>
 </div>
 
-      <p>The <tt>Statistic</tt> template can emulate just about any data-type,
-      but if you do not specify a template argument, it defaults to acting like
-      an unsigned int counter (this is usually what you want).</p></li>
+  <p>The <tt>STATISTIC</tt> macro defines a static variable, whose name is
+    specified by the first argument.  The pass name is taken from the DEBUG_TYPE
+    macro, and the description is taken from the second argument.  The variable
+    defined ("NumXForms" in this case) acts like an unsigned integer.</p></li>
 
     <li><p>Whenever you make a transformation, bump the counter:</p>
 
@@ -695,8 +697,8 @@ an example that prints the name of a <tt>BasicBlock</tt> and the number of
 for (Function::iterator i = func-&gt;begin(), e = func-&gt;end(); i != e; ++i)
   // <i>Print out the name of the basic block if it has one, and then the</i>
   // <i>number of instructions that it contains</i>
-  std::cerr &lt;&lt; "Basic block (name=" &lt;&lt; i-&gt;getName() &lt;&lt; ") has "
-            &lt;&lt; i-&gt;size() &lt;&lt; " instructions.\n";
+  llvm::cerr &lt;&lt; "Basic block (name=" &lt;&lt; i-&gt;getName() &lt;&lt; ") has "
+             &lt;&lt; i-&gt;size() &lt;&lt; " instructions.\n";
 </pre>
 </div>
 
@@ -728,14 +730,14 @@ a <tt>BasicBlock</tt>:</p>
 for (BasicBlock::iterator i = blk-&gt;begin(), e = blk-&gt;end(); i != e; ++i)
    // <i>The next statement works since operator&lt;&lt;(ostream&amp;,...)</i>
    // <i>is overloaded for Instruction&amp;</i>
-   std::cerr &lt;&lt; *i &lt;&lt; "\n";
+   llvm::cerr &lt;&lt; *i &lt;&lt; "\n";
 </pre>
 </div>
 
 <p>However, this isn't really the best way to print out the contents of a
 <tt>BasicBlock</tt>!  Since the ostream operators are overloaded for virtually
 anything you'll care about, you could have just invoked the print routine on the
-basic block itself: <tt>std::cerr &lt;&lt; *blk &lt;&lt; "\n";</tt>.</p>
+basic block itself: <tt>llvm::cerr &lt;&lt; *blk &lt;&lt; "\n";</tt>.</p>
 
 </div>
 
@@ -761,7 +763,7 @@ small example that shows how to dump all instructions in a function to the stand
 
 // <i>F is a ptr to a Function instance</i>
 for (inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i)
-  std::cerr &lt;&lt; *i &lt;&lt; "\n";
+  llvm::cerr &lt;&lt; *i &lt;&lt; "\n";
 </pre>
 </div>
 
@@ -837,7 +839,7 @@ without actually obtaining it via iteration over some structure:</p>
 void printNextInstruction(Instruction* inst) {
   BasicBlock::iterator it(inst);
   ++it; // <i>After this line, it refers to the instruction after *inst</i>
-  if (it != inst-&gt;getParent()-&gt;end()) std::cerr &lt;&lt; *it &lt;&lt; "\n";
+  if (it != inst-&gt;getParent()-&gt;end()) llvm::cerr &lt;&lt; *it &lt;&lt; "\n";
 }
 </pre>
 </div>
@@ -942,7 +944,7 @@ If you look at its definition, it has only a single pointer member.</p>
 <div class="doc_text">
 
 <p>Frequently, we might have an instance of the <a
-href="/doxygen/structllvm_1_1Value.html">Value Class</a> and we want to
+href="/doxygen/classllvm_1_1Value.html">Value Class</a> and we want to
 determine which <tt>User</tt>s use the <tt>Value</tt>.  The list of all
 <tt>User</tt>s of a particular <tt>Value</tt> is called a <i>def-use</i> chain.
 For example, let's say we have a <tt>Function*</tt> named <tt>F</tt> to a
@@ -956,8 +958,8 @@ Function* F = ...;
 
 for (Value::use_iterator i = F-&gt;use_begin(), e = F-&gt;use_end(); i != e; ++i)
   if (Instruction *Inst = dyn_cast&lt;Instruction&gt;(*i)) {
-    std::cerr &lt;&lt; "F is used in instruction:\n";
-    std::cerr &lt;&lt; *Inst &lt;&lt; "\n";
+    llvm::cerr &lt;&lt; "F is used in instruction:\n";
+    llvm::cerr &lt;&lt; *Inst &lt;&lt; "\n";
   }
 </pre>
 </div>
@@ -1223,7 +1225,7 @@ ReplaceInstWithInst(instToReplace-&gt;getParent()-&gt;getInstList(), ii,
 
 <p>You can use <tt>Value::replaceAllUsesWith</tt> and
 <tt>User::replaceUsesOfWith</tt> to change more than one use at a time.  See the
-doxygen documentation for the <a href="/doxygen/structllvm_1_1Value.html">Value Class</a>
+doxygen documentation for the <a href="/doxygen/classllvm_1_1Value.html">Value Class</a>
 and <a href="/doxygen/classllvm_1_1User.html">User Class</a>, respectively, for more
 information.</p>
 
@@ -1276,8 +1278,8 @@ system.
 For our purposes below, we need three concepts.  First, an "Opaque Type" is 
 exactly as defined in the <a href="LangRef.html#t_opaque">language 
 reference</a>.  Second an "Abstract Type" is any type which includes an 
-opaque type as part of its type graph (for example "<tt>{ opaque, int }</tt>").
-Third, a concrete type is a type that is not an abstract type (e.g. "<tt>[ int
+opaque type as part of its type graph (for example "<tt>{ opaque, i32 }</tt>").
+Third, a concrete type is a type that is not an abstract type (e.g. "<tt>{ i32
 float }</tt>").
 </p>
 
@@ -1298,7 +1300,7 @@ to be emitted to an output .ll file:
 
 <div class="doc_code">
 <pre>
-%mylist = type { %mylist*, int }
+%mylist = type { %mylist*, i32 }
 </pre>
 </div>
 
@@ -1315,7 +1317,7 @@ Elts.push_back(PointerType::get(StructTy));
 Elts.push_back(Type::IntTy);
 StructType *NewSTy = StructType::get(Elts);
 
-// <i>At this point, NewSTy = "{ opaque*, int }". Tell VMCore that</i>
+// <i>At this point, NewSTy = "{ opaque*, i32 }". Tell VMCore that</i>
 // <i>the struct and the opaque type are actually the same.</i>
 cast&lt;OpaqueType&gt;(StructTy.get())-&gt;<a href="#refineAbstractTypeTo">refineAbstractTypeTo</a>(NewSTy);
 
@@ -1355,7 +1357,7 @@ existing types, and all duplicates are deleted (to preserve pointer equality).
 
 <p>
 In the example above, the OpaqueType object is definitely deleted.
-Additionally, if there is an "{ \2*, int}" type already created in the system,
+Additionally, if there is an "{ \2*, i32}" type already created in the system,
 the pointer and struct type created are <b>also</b> deleted.  Obviously whenever
 a type is deleted, any "Type*" pointers in the program are invalidated.  As
 such, it is safest to avoid having <i>any</i> "Type*" pointers to abstract types
@@ -1409,8 +1411,8 @@ To support this, a class can derive from the AbstractTypeUser class.  This class
 allows it to get callbacks when certain types are resolved.  To register to get
 callbacks for a particular type, the DerivedType::{add/remove}AbstractTypeUser
 methods can be called on a type.  Note that these methods only work for <i>
-abstract</i> types.  Concrete types (those that do not include an opaque objects
-somewhere) can never be refined.
+  abstract</i> types.  Concrete types (those that do not include any opaque 
+objects) can never be refined.
 </p>
 </div>
 
@@ -1424,14 +1426,14 @@ somewhere) can never be refined.
 <p>This class provides a symbol table that the <a
 href="#Function"><tt>Function</tt></a> and <a href="#Module">
 <tt>Module</tt></a> classes use for naming definitions. The symbol table can
-provide a name for any <a href="#Value"><tt>Value</tt></a> or <a
-href="#Type"><tt>Type</tt></a>.  <tt>SymbolTable</tt> is an abstract data
-type. It hides the data it contains and provides access to it through a
-controlled interface.</p>
-
-<p>Note that the symbol table class is should not be directly accessed by most
-clients.  It should only be used when iteration over the symbol table names
-themselves are required, which is very special purpose.  Note that not all LLVM
+provide a name for any <a href="#Value"><tt>Value</tt></a>
+<tt>SymbolTable</tt> is an abstract data type. It hides the data it contains 
+and provides access to it through a controlled interface.</p>
+
+<p>Note that the <tt>SymbolTable</tt> class should not be directly accessed 
+by most clients.  It should only be used when iteration over the symbol table 
+names themselves are required, which is very special purpose.  Note that not 
+all LLVM
 <a href="#Value">Value</a>s have names, and those without names (i.e. they have
 an empty name) do not exist in the symbol table.
 </p>
@@ -1440,9 +1442,8 @@ an empty name) do not exist in the symbol table.
 structure of the information it holds. The class contains two 
 <tt>std::map</tt> objects. The first, <tt>pmap</tt>, is a map of 
 <tt>Type*</tt> to maps of name (<tt>std::string</tt>) to <tt>Value*</tt>. 
-The second, <tt>tmap</tt>, is a map of names to <tt>Type*</tt>. Thus, Values
-are stored in two-dimensions and accessed by <tt>Type</tt> and name. Types,
-however, are stored in a single dimension and accessed only by name.</p>
+Thus, Values are stored in two-dimensions and accessed by <tt>Type</tt> and 
+name.</p> 
 
 <p>The interface of this class provides three basic types of operations:
 <ol>
@@ -1454,7 +1455,7 @@ however, are stored in a single dimension and accessed only by name.</p>
   <a href="#SymbolTable_insert"><tt>insert</tt></a>.</li>
   <li><em>Iterators</em>. Iterators allow the user to traverse the content
   of the symbol table in well defined ways, such as the method
-  <a href="#SymbolTable_type_begin"><tt>type_begin</tt></a>.</li>
+  <a href="#SymbolTable_plane_begin"><tt>plane_begin</tt></a>.</li>
 </ol>
 
 <h3>Accessors</h3>
@@ -1465,15 +1466,6 @@ however, are stored in a single dimension and accessed only by name.</p>
   <tt>Ty</tt> parameter for a <tt>Value</tt> with the provided <tt>name</tt>.
   If a suitable <tt>Value</tt> is not found, null is returned.</dd>
 
-  <dt><tt>Type* lookupType( const std::string&amp; name) const</tt>:</dt>
-  <dd>The <tt>lookupType</tt> method searches through the types for a
-  <tt>Type</tt> with the provided <tt>name</tt>. If a suitable <tt>Type</tt>
-  is not found, null is returned.</dd>
-
-  <dt><tt>bool hasTypes() const</tt>:</dt>
-  <dd>This function returns true if an entry has been made into the type
-  map.</dd>
-
   <dt><tt>bool isEmpty() const</tt>:</dt>
   <dd>This function returns true if both the value and types maps are
   empty</dd>
@@ -1491,12 +1483,6 @@ however, are stored in a single dimension and accessed only by name.</p>
   name. There can be a many to one mapping between names and constants
   or types.</dd>
 
-  <dt><tt>void insert(const std::string&amp; Name, Type *Typ)</tt>:</dt>
-  <dd> Inserts a type into the symbol table with the specified name. There
-  can be a many-to-one mapping between names and types. This method
-  allows a type with an existing entry in the symbol table to get
-  a new name.</dd>
-
   <dt><tt>void remove(Value* Val)</tt>:</dt>
  <dd> This method removes a named value from the symbol table. The
   type and name of the Value are extracted from \p N and used to
@@ -1504,21 +1490,11 @@ however, are stored in a single dimension and accessed only by name.</p>
   not in the symbol table, this method silently ignores the
   request.</dd>
 
-  <dt><tt>void remove(Type* Typ)</tt>:</dt>
-  <dd> This method removes a named type from the symbol table. The
-  name of the type is extracted from \P T and used to look up
-  the Type in the type map. If the Type is not in the symbol
-  table, this method silently ignores the request.</dd>
-
   <dt><tt>Value* remove(const std::string&amp; Name, Value *Val)</tt>:</dt>
   <dd> Remove a constant or type with the specified name from the 
   symbol table.</dd>
 
-  <dt><tt>Type* remove(const std::string&amp; Name, Type* T)</tt>:</dt>
-  <dd> Remove a type with the specified name from the symbol table.
-  Returns the removed Type.</dd>
-
-  <dt><tt>Value *value_remove(const value_iterator&amp; It)</tt>:</dt>
+  <dt><tt>Value *remove(const value_iterator&amp; It)</tt>:</dt>
   <dd> Removes a specific value from the symbol table. 
   Returns the removed value.</dd>
 
@@ -1545,16 +1521,6 @@ for (SymbolTable::plane_const_iterator PI = ST.plane_begin(),
      PE = ST.plane_end(); PI != PE; ++PI ) {
   PI-&gt;first  // <i>This is the Type* of the plane</i>
   PI-&gt;second // <i>This is the SymbolTable::ValueMap of name/Value pairs</i>
-}
-    </tt></pre></td>
-  </tr>
-  <tr>
-    <td align="left">All name/Type Pairs</td><td>TI</td>
-    <td align="left"><pre><tt>
-for (SymbolTable::type_const_iterator TI = ST.type_begin(),
-     TE = ST.type_end(); TI != TE; ++TI ) {
-  TI-&gt;first  // <i>This is the name of the type</i>
-  TI-&gt;second // <i>This is the Type* value associated with the name</i>
 }
     </tt></pre></td>
   </tr>
@@ -1616,20 +1582,6 @@ will loop infinitely.</p>
   marker for end of iteration of the type plane.
   Note: the type plane must already exist before using this.</dd>
 
-  <dt><tt>type_iterator type_begin()</tt>:</dt>
-  <dd>Get an iterator to the start of the name/Type map.</dd>
-
-  <dt><tt>type_const_iterator type_begin() cons</tt>:</dt>
-  <dd> Get a const_iterator to the start of the name/Type map.</dd>
-
-  <dt><tt>type_iterator type_end()</tt>:</dt>
-  <dd>Get an iterator to the end of the name/Type map. This serves as the
-  marker for end of iteration of the types.</dd>
-
-  <dt><tt>type_const_iterator type_end() const</tt>:</dt>
-  <dd>Get a const-iterator to the end of the name/Type map. This serves 
-  as the marker for end of iteration of the types.</dd>
-
   <dt><tt>plane_const_iterator find(const Type* Typ ) const</tt>:</dt>
   <dd>This method returns a plane_const_iterator for iteration over
   the type planes starting at a specific plane, given by \p Ty.</dd>
@@ -1650,6 +1602,8 @@ will loop infinitely.</p>
 <!-- *********************************************************************** -->
 
 <div class="doc_text">
+<p><tt>#include "<a href="/doxygen/Type_8h-source.html">llvm/Type.h</a>"</tt>
+<br>doxygen info: <a href="/doxygen/classllvm_1_1Type.html">Type Class</a></p>
 
 <p>The Core LLVM classes are the primary means of representing the program
 being inspected or transformed.  The core LLVM classes are defined in
@@ -1658,6 +1612,116 @@ the <tt>lib/VMCore</tt> directory.</p>
 
 </div>
 
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="Type">The <tt>Type</tt> class and Derived Types</a>
+</div>
+
+<div class="doc_text">
+
+  <p><tt>Type</tt> is a superclass of all type classes. Every <tt>Value</tt> has
+  a <tt>Type</tt>. <tt>Type</tt> cannot be instantiated directly but only
+  through its subclasses. Certain primitive types (<tt>VoidType</tt>,
+  <tt>LabelType</tt>, <tt>FloatType</tt> and <tt>DoubleType</tt>) have hidden 
+  subclasses. They are hidden because they offer no useful functionality beyond
+  what the <tt>Type</tt> class offers except to distinguish themselves from 
+  other subclasses of <tt>Type</tt>.</p>
+  <p>All other types are subclasses of <tt>DerivedType</tt>.  Types can be 
+  named, but this is not a requirement. There exists exactly 
+  one instance of a given shape at any one time.  This allows type equality to
+  be performed with address equality of the Type Instance. That is, given two 
+  <tt>Type*</tt> values, the types are identical if the pointers are identical.
+  </p>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+  <a name="m_Value">Important Public Methods</a>
+</div>
+
+<div class="doc_text">
+
+<ul>
+  <li><tt>bool isInteger() const</tt>: Returns true for any integer type.</li>
+
+  <li><tt>bool isFloatingPoint()</tt>: Return true if this is one of the two
+  floating point types.</li>
+
+  <li><tt>bool isAbstract()</tt>: Return true if the type is abstract (contains
+  an OpaqueType anywhere in its definition).</li>
+
+  <li><tt>bool isSized()</tt>: Return true if the type has known size. Things
+  that don't have a size are abstract types, labels and void.</li>
+
+</ul>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+  <a name="m_Value">Important Derived Types</a>
+</div>
+<div class="doc_text">
+<dl>
+  <dt><tt>IntegerType</tt></dt>
+  <dd>Subclass of DerivedType that represents integer types of any bit width. 
+  Any bit width between <tt>IntegerType::MIN_INT_BITS</tt> (1) and 
+  <tt>IntegerType::MAX_INT_BITS</tt> (~8 million) can be represented.
+  <ul>
+    <li><tt>static const IntegerType* get(unsigned NumBits)</tt>: get an integer
+    type of a specific bit width.</li>
+    <li><tt>unsigned getBitWidth() const</tt>: Get the bit width of an integer
+    type.</li>
+  </ul>
+  </dd>
+  <dt><tt>SequentialType</tt></dt>
+  <dd>This is subclassed by ArrayType and PointerType
+    <ul>
+      <li><tt>const Type * getElementType() const</tt>: Returns the type of each
+      of the elements in the sequential type. </li>
+    </ul>
+  </dd>
+  <dt><tt>ArrayType</tt></dt>
+  <dd>This is a subclass of SequentialType and defines the interface for array 
+  types.
+    <ul>
+      <li><tt>unsigned getNumElements() const</tt>: Returns the number of 
+      elements in the array. </li>
+    </ul>
+  </dd>
+  <dt><tt>PointerType</tt></dt>
+  <dd>Subclass of SequentialType for pointer types.</li>
+  <dt><tt>PackedType</tt></dt>
+  <dd>Subclass of SequentialType for packed (vector) types. A 
+  packed type is similar to an ArrayType but is distinguished because it is 
+  a first class type wherease ArrayType is not. Packed types are used for 
+  vector operations and are usually small vectors of of an integer or floating 
+  point type.</dd>
+  <dt><tt>StructType</tt></dt>
+  <dd>Subclass of DerivedTypes for struct types.</dd>
+  <dt><tt>FunctionType</tt></dt>
+  <dd>Subclass of DerivedTypes for function types.
+    <ul>
+      <li><tt>bool isVarArg() const</tt>: Returns true if its a vararg
+      function</li>
+      <li><tt> const Type * getReturnType() const</tt>: Returns the
+      return type of the function.</li>
+      <li><tt>const Type * getParamType (unsigned i)</tt>: Returns
+      the type of the ith parameter.</li>
+      <li><tt> const unsigned getNumParams() const</tt>: Returns the
+      number of formal parameters.</li>
+    </ul>
+  </dd>
+  <dt><tt>OpaqueType</tt></dt>
+  <dd>Sublcass of DerivedType for abstract types. This class 
+  defines no content and is used as a placeholder for some other type. Note 
+  that OpaqueType is used (temporarily) during type resolution for forward 
+  references of types. Once the referenced type is resolved, the OpaqueType 
+  is replaced with the actual type. OpaqueType can also be used for data 
+  abstraction. At link time opaque types can be resolved to actual types 
+  of the same name.</dd>
+</dl>
+</div>
+
 <!-- ======================================================================= -->
 <div class="doc_subsection">
   <a name="Value">The <tt>Value</tt> class</a>
@@ -1667,7 +1731,7 @@ the <tt>lib/VMCore</tt> directory.</p>
 
 <p><tt>#include "<a href="/doxygen/Value_8h-source.html">llvm/Value.h</a>"</tt>
 <br> 
-doxygen info: <a href="/doxygen/structllvm_1_1Value.html">Value Class</a></p>
+doxygen info: <a href="/doxygen/classllvm_1_1Value.html">Value Class</a></p>
 
 <p>The <tt>Value</tt> class is the most important class in the LLVM Source
 base.  It represents a typed value that may be used (among other things) as an
@@ -1695,7 +1759,7 @@ method. In addition, all LLVM values can be named.  The "name" of the
 
 <div class="doc_code">
 <pre>
-%<b>foo</b> = add int 1, 2
+%<b>foo</b> = add i32 1, 2
 </pre>
 </div>
 
@@ -1851,15 +1915,38 @@ way as for other <a href="#User"><tt>User</tt></a>s (with the
 the <tt>Instruction</tt> class is the <tt>llvm/Instruction.def</tt> file. This
 file contains some meta-data about the various different types of instructions
 in LLVM.  It describes the enum values that are used as opcodes (for example
-<tt>Instruction::Add</tt> and <tt>Instruction::SetLE</tt>), as well as the
+<tt>Instruction::Add</tt> and <tt>Instruction::ICmp</tt>), as well as the
 concrete sub-classes of <tt>Instruction</tt> that implement the instruction (for
 example <tt><a href="#BinaryOperator">BinaryOperator</a></tt> and <tt><a
-href="#SetCondInst">SetCondInst</a></tt>).  Unfortunately, the use of macros in
+href="#CmpInst">CmpInst</a></tt>).  Unfortunately, the use of macros in
 this file confuses doxygen, so these enum values don't show up correctly in the
 <a href="/doxygen/classllvm_1_1Instruction.html">doxygen output</a>.</p>
 
 </div>
 
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+  <a name="s_Instruction">Important Subclasses of the <tt>Instruction</tt>
+  class</a>
+</div>
+<div class="doc_text">
+  <ul>
+    <li><tt><a name="BinaryOperator">BinaryOperator</a></tt>
+    <p>This subclasses represents all two operand instructions whose operands
+    must be the same type, except for the comparison instructions.</p></li>
+    <li><tt><a name="CastInst">CastInst</a></tt>
+    <p>This subclass is the parent of the 12 casting instructions. It provides
+    common operations on cast instructions.</p>
+    <li><tt><a name="CmpInst">CmpInst</a></tt>
+    <p>This subclass respresents the two comparison instructions, 
+    <a href="LangRef.html#i_icmp">ICmpInst</a> (integer opreands), and
+    <a href="LangRef.html#i_fcmp">FCmpInst</a> (floating point operands).</p>
+    <li><tt><a name="TerminatorInst">TerminatorInst</a></tt>
+    <p>This subclass is the parent of all terminator instructions (those which
+    can terminate a block).</p>
+  </ul>
+  </div>
+
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection">
   <a name="m_Instruction">Important Public Members of the <tt>Instruction</tt>
@@ -2013,11 +2100,11 @@ global is always a pointer to its contents. It is important to remember this
 when using the <tt>GetElementPtrInst</tt> instruction because this pointer must
 be dereferenced first. For example, if you have a <tt>GlobalVariable</tt> (a
 subclass of <tt>GlobalValue)</tt> that is an array of 24 ints, type <tt>[24 x
-int]</tt>, then the <tt>GlobalVariable</tt> is a pointer to that array. Although
+i32]</tt>, then the <tt>GlobalVariable</tt> is a pointer to that array. Although
 the address of the first element of this array and the value of the
 <tt>GlobalVariable</tt> are the same, they have different types. The
-<tt>GlobalVariable</tt>'s type is <tt>[24 x int]</tt>. The first element's type
-is <tt>int.</tt> Because of this, accessing a global value requires you to
+<tt>GlobalVariable</tt>'s type is <tt>[24 x i32]</tt>. The first element's type
+is <tt>i32.</tt> Because of this, accessing a global value requires you to
 dereference the pointer with <tt>GetElementPtrInst</tt> first, then its elements
 can be accessed. This is explained in the <a href="LangRef.html#globalvars">LLVM
 Language Reference Manual</a>.</p>
@@ -2390,7 +2477,7 @@ provide a name for it (probably based on the name of the translation unit).</p>
 <div class="doc_text">
 
 <p>Constant represents a base class for different types of constants. It
-is subclassed by ConstantBool, ConstantInt, ConstantArray etc for representing 
+is subclassed by  ConstantInt, ConstantArray, etc. for representing 
 the various types of Constants.</p>
 
 </div>
@@ -2406,12 +2493,16 @@ the various types of Constants.</p>
 <div class="doc_subsubsection">Important Subclasses of Constant </div>
 <div class="doc_text">
 <ul>
-  <li>ConstantInt : This subclass of Constant represents an integer constant.
+  <li>ConstantInt : This subclass of Constant represents an integer constant of
+  any width, including boolean (1 bit integer).
     <ul>
       <li><tt>int64_t getSExtValue() const</tt>: Returns the underlying value of
       this constant as a sign extended signed integer value.</li>
       <li><tt>uint64_t getZExtValue() const</tt>: Returns the underlying value 
       of this constant as a zero extended unsigned integer value.</li>
+      <li><tt>static ConstantInt* get(const Type *Ty, uint64_t Val)</tt>: 
+      Returns the ConstantInt object that represents the value provided by 
+      <tt>Val</tt> for integer type <tt>Ty</tt>.</li>
     </ul>
   </li>
   <li>ConstantFP : This class represents a floating point constant.
@@ -2420,7 +2511,6 @@ the various types of Constants.</p>
       this constant. </li>
     </ul>
   </li>
-  <li>ConstantBool : This represents a boolean constant.
     <ul>
       <li><tt>bool getValue() const</tt>: Returns the underlying value of this 
       constant. </li>
@@ -2443,93 +2533,6 @@ the various types of Constants.</p>
   </li>
 </ul>
 </div>
-
-<!-- ======================================================================= -->
-<div class="doc_subsection">
-  <a name="Type">The <tt>Type</tt> class and Derived Types</a>
-</div>
-
-<div class="doc_text">
-
-<p>Type as noted earlier is also a subclass of a Value class.  Any primitive
-type (like int, short etc) in LLVM is an instance of Type Class.  All other
-types are instances of subclasses of type like FunctionType, ArrayType
-etc. DerivedType is the interface for all such dervied types including
-FunctionType, ArrayType, PointerType, StructType. Types can have names. They can
-be recursive (StructType).  There exists exactly one instance of any type
-structure at a time. This allows using pointer equality of Type *s for comparing
-types.</p>
-
-</div>
-
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-  <a name="m_Value">Important Public Methods</a>
-</div>
-
-<div class="doc_text">
-
-<ul>
-
-  <li><tt>bool isSigned() const</tt>: Returns whether an integral numeric type
-  is signed. This is true for SByteTy, ShortTy, IntTy, LongTy. Note that this is
-  not true for Float and Double. </li>
-
-  <li><tt>bool isUnsigned() const</tt>: Returns whether a numeric type is
-  unsigned. This is not quite the complement of isSigned... nonnumeric types
-  return false as they do with isSigned. This returns true for UByteTy,
-  UShortTy, UIntTy, and ULongTy. </li>
-
-  <li><tt>bool isInteger() const</tt>: Equivalent to isSigned() || isUnsigned().</li>
-
-  <li><tt>bool isIntegral() const</tt>: Returns true if this is an integral
-  type, which is either Bool type or one of the Integer types.</li>
-
-  <li><tt>bool isFloatingPoint()</tt>: Return true if this is one of the two
-  floating point types.</li>
-
-  <li><tt>isLosslesslyConvertableTo (const Type *Ty) const</tt>: Return true if
-  this type can be converted to 'Ty' without any reinterpretation of bits. For
-  example, uint to int or one pointer type to another.</li>
-</ul>
-</div>
-
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-  <a name="m_Value">Important Derived Types</a>
-</div>
-<div class="doc_text">
-<ul>
-  <li>SequentialType : This is subclassed by ArrayType and PointerType
-    <ul>
-      <li><tt>const Type * getElementType() const</tt>: Returns the type of each
-      of the elements in the sequential type. </li>
-    </ul>
-  </li>
-  <li>ArrayType : This is a subclass of SequentialType and defines interface for
-  array types.
-    <ul>
-      <li><tt>unsigned getNumElements() const</tt>: Returns the number of 
-      elements in the array. </li>
-    </ul>
-  </li>
-  <li>PointerType : Subclass of SequentialType for  pointer types. </li>
-  <li>StructType : subclass of DerivedTypes for struct types </li>
-  <li>FunctionType : subclass of DerivedTypes for function types.
-    <ul>
-      <li><tt>bool isVarArg() const</tt>: Returns true if its a vararg
-      function</li>
-      <li><tt> const Type * getReturnType() const</tt>: Returns the
-      return type of the function.</li>
-      <li><tt>const Type * getParamType (unsigned i)</tt>: Returns
-      the type of the ith parameter.</li>
-      <li><tt> const unsigned getNumParams() const</tt>: Returns the
-      number of formal parameters.</li>
-    </ul>
-  </li>
-</ul>
-</div>
-
 <!-- ======================================================================= -->
 <div class="doc_subsection">
   <a name="Argument">The <tt>Argument</tt> class</a>