<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>LLVM Programmer's Manual</title></head>
<body bgcolor=white>
<table width="100%" bgcolor="#330077" border=0 cellpadding=4 cellspacing=0>
<tr><td> <font size=+3 color="#EEEEFF" face="Georgia,Palatino,Times,Roman"><b>LLVM Programmer's Manual</b></font></td>
</tr></table>
<ol>
<li><a href="#introduction">Introduction</a>
<li><a href="#general">General Information</a>
<ul>
<li><a href="#stl">The C++ Standard Template Library</a>
<li>The isa<>, cast<> and dyn_cast<> templates
</ul>
<li><a href="#common">Helpful Hints for Common Operations</a>
<ul>
<li><a href="#inspection">Basic Inspection and Traversal Routines</a>
<ul>
<li><a href="#iterate_function">Iterating over the <tt>BasicBlock</tt>s
in a <tt>Function</tt></a>
<li><a href="#iterate_basicblock">Iterating over the <tt>Instruction</tt>s
in a <tt>BasicBlock</tt></a>
<li><a href="#iterate_convert">Turning an iterator into a class
pointer</a>
<li><a href="#iterate_complex">Finding call sites: a more complex
example</a>
</ul>
<li><a href="#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>isa<>, cast<>, and dyn_cast<> templates
<!--
<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><a href="#coreclasses">The Core LLVM Class Hierarchy Reference</a>
<ul>
<li><a href="#Value">The <tt>Value</tt> class</a>
<ul>
<li><a href="#User">The <tt>User</tt> class</a>
<ul>
<li><a href="#Instruction">The <tt>Instruction</tt> class</a>
<ul>
<li>
</ul>
<li><a href="#GlobalValue">The <tt>GlobalValue</tt> class</a>
<ul>
<li><a href="#BasicBlock">The <tt>BasicBlock</tt> class</a>
<li><a href="#Function">The <tt>Function</tt> class</a>
<li><