<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>LLVM Programmer's Manual</title></head><bodybgcolor=white><tablewidth="100%"bgcolor="#330077"border=0cellpadding=4cellspacing=0><tr><td> <fontsize=+3color="#EEEEFF"face="Georgia,Palatino,Times,Roman"><b>LLVM Programmer's Manual</b></font></td></tr></table><ol><li><ahref="#introduction">Introduction</a><li><ahref="#general">General Information</a><ul><li><ahref="#stl">The C++ Standard Template Library</a><li><ahref="#isa">The <tt>isa<></tt>, <tt>cast<></tt> and
<tt>dyn_cast<></tt> templates</a></ul><li><ahref="#common">Helpful Hints for Common Operations</a><ul><li><ahref="#inspection">Basic Inspection and Traversal Routines</a><ul><li><ahref="#iterate_function">Iterating over the <tt>BasicBlock</tt>s
in a <tt>Function</tt></a><li><ahref="#iterate_basicblock">Iterating over the <tt>Instruction</tt>s
in a <tt>BasicBlock</tt></a><li><ahref="#iterate_institer">Iterating over the <tt>Instruction</tt>s
in a <tt>Function</tt></a><li><ahref="#iterate_convert">Turning an iterator into a class
pointer</a><li><ahref="#iterate_complex">Finding call sites: a more complex
example</a><li><ahref="#iterate_chains">Iterating over def-use & use-def
chains</a></ul><li><ahref="#simplechanges">Making simple changes</a><ul><li>Creating and inserting new <tt>Instruction</tt>s
<li>Deleting <tt>Instruction</tt>s
<li>Replacing an <tt>Instruction</tt> with another <tt>Value</tt></ul><!-- <li>Working with the Control Flow Graph <ul> <li>Accessing predecessors and successors of a <tt>BasicBlock</tt> <li> <li> </ul> <li>Useful LLVM APIs <ul> <li>The general graph API <li>The <tt>InstVisitor</tt> template <li>The DEBUG() macro <li>The <tt>Statistic</tt> template--></ul><!-- <li>Useful related topics <ul> <li>The <tt>-time-passes</tt> option <li>How to use the LLVM Makefile system <li>How to write a regression test <li> </ul>--></ul><li><ahref="#coreclasses">The Core LLVM Class Hierarchy Reference</a><ul><li><ahref="#Value">The <tt>Value</tt> class</a><ul><