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

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 16 08:31:52 PST 2006



Changes in directory llvm/docs:

ExtendingLLVM.html updated: 1.21 -> 1.22
---
Log message:

Add a couple very minor tweaks


---
Diffs of the changes:  (+12 -8)

 ExtendingLLVM.html |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)


Index: llvm/docs/ExtendingLLVM.html
diff -u llvm/docs/ExtendingLLVM.html:1.21 llvm/docs/ExtendingLLVM.html:1.22
--- llvm/docs/ExtendingLLVM.html:1.21	Mon Jan 16 01:54:23 2006
+++ llvm/docs/ExtendingLLVM.html	Mon Jan 16 10:31:40 2006
@@ -26,7 +26,8 @@
 
 <div class="doc_author">    
   <p>Written by <a href="http://misha.brukman.net">Misha Brukman</a>,
-  Brad Jones, and <a href="http://nondot.org/sabre">Chris Lattner</a></p>
+  Brad Jones, Nate Begeman,
+  and <a href="http://nondot.org/sabre">Chris Lattner</a></p>
 </div>
 
 <!-- *********************************************************************** -->
@@ -123,7 +124,8 @@
 code in all cases, just emit the expansion in <tt>visitCallInst</tt> in
 <tt>Writer.cpp</tt>.  If the intrinsic has some way to express it with GCC 
 (or any other compiler) extensions, it can be conditionally supported based on 
-the compiler compiling the CBE output (see llvm.prefetch for an example).  
+the compiler compiling the CBE output (see <tt>llvm.prefetch</tt> for an 
+example).  
 Third, if the intrinsic really has no way to be lowered, just have the code 
 generator emit code that prints an error message and calls abort if executed.
 </dd>
@@ -136,13 +138,14 @@
 code, you will likely need to add support for your intrinsic there as well.
 This is usually accomplished by adding a new node, and then teaching the
 SelectionDAG code how to handle that node.  To do this, follow the steps in
-the next section, Adding a new SelectionDAG node.</dd>
+the <a href="#sdnode">Adding a new SelectionDAG node</a> section.</dd>
 
 <dl>
 <dt>Once you have added the new node, add code to 
 <tt>SelectionDAG/SelectionDAGISel.cpp</tt> to recognize the intrinsic.  In most
 cases, the intrinsic will just be turned into the node you just added.  For an
-example of this, see how <tt>visitIntrinsicCall</tt> handles Intrinsic::ctpop
+example of this, see how <tt>visitIntrinsicCall</tt> handles 
+<tt>Intrinsic::ctpop_*</tt>.
 </dt>
 
 </div>
@@ -182,14 +185,15 @@
     targets supported by the SelectionDAG framework will natively support the
     new node.  In this case, you must also add code in your node's case
     statement in <tt>LegalizeOp</tt> to Expand your node into simpler, legal
-    operations.  The case for ISD::UREM for expanding a remainder into a
-    multiply and a subtract is a good example.</li>
+    operations.  The case for <tt>ISD::UREM</tt> for expanding a remainder into
+    a divide, multiply, and a subtract is a good example.</li>
 <li><tt>lib/CodeGen/SelectionDAG/LegalizeDAG.cpp</tt>:
     If targets may support the new node being added only at certain sizes, you 
     will also need to add code to your node's case statement in 
     <tt>LegalizeOp</tt> to Promote your node's operands to a larger size, and 
     perform the correct operation.  You will also need to add code to 
-    <tt>PromoteOp</tt> to do this as well.  For a good example, see ISD::BSWAP,
+    <tt>PromoteOp</tt> to do this as well.  For a good example, see 
+    <tt>ISD::BSWAP</tt>,
     which promotes its operand to a wider size, performs the byteswap, and then
     shifts the correct bytes right to emulate the narrower byteswap in the
     wider type.</li>
@@ -401,7 +405,7 @@
 
   <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
   <br>
-  Last modified: $Date: 2006/01/16 07:54:23 $
+  Last modified: $Date: 2006/01/16 16:31:40 $
 </address>
 
 </body>






More information about the llvm-commits mailing list