<!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="#common">Helpful Hints for Common Operations</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="#coreclasses">The Core LLVM Class Heirarchy 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>
<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><a href="#GlobalVariable">The <tt>GlobalVariable</tt> class</a>
</ul>
<li><a href="#Module">The <tt>Module</tt> class</a>
<li><a href="#Constant">The <tt>Constant</tt> class</a>
<ul>
<li>
<li>
</ul>
</ul>
<li><a href="#Type">The <tt>Type</tt> class</a>
<li><a href="#Argument">The <tt>Argument</tt> class</a>
</ul>
<li>The <tt>SymbolTable</tt> class
<li>The <tt>ilist</tt> and <tt>iplist</tt> classes
<ul>
<li>Creating, inserting, moving and deleting from LLVM lists
</ul>
<li>Important iterator invalidation semantics to be aware of
</ul>
<!--
III. Useful things to know about the LLVM source base:
III.1 Useful links that introduce the STL
III.2 isa<>, cast<>, dyn_cast<>
III.3 Makefiles, useful options
III.4 How to use opt & analyze to debug stuff
III.5 How to write a regression test
III.6 DEBUG() and Statistics (-debug & -stats)
III.7 The -time-passes option
III.8 ... more as needed ...
-->
<p><b>Written by <a href="mailto:dhurjati@cs.uiuc.edu">Dinakar Dhurjati</a>
and <a href="mailto:sabre@nondot.org">Chris Lattner</a></b><p>
</ol>
<!-- *********************************************************************** -->
<table width="100%" bgcolor="#330077" border=0 cellpadding=4 cellspacing=0>
<tr><td align=center><font color="#EEEEFF" size=+2 face="Georgia,Palatino"><b>
<a name="introduction">Introduction
</b></font></td></tr></table><ul>
<!-- *********************************************************************** -->
This document is meant to hi-light some of the important classes and interfaces
available in the LLVM source-base. This manual is not indended to explain what
LLVM is, how it works, and what LLVM code looks like. It assumes that you know
the basics of LLVM and are interested in writing transformations or otherwise
analyzing or manipulating the code.<p>
This document should get you oriented so that you can find your way in the
continuously growing source code that makes up the LLVM infrastructure. Note
that this manual is not intended to serve as a replacement for reading the
source code, so if you think there should be a method in one of these classes to
do something, but it's not listed, check the source. Links to the <a
href="/doxygen/">doxygen</a> sources are provided to make this as easy as
possible.<p>
The first section of this document describes general information that is useful
to know when working in the LLVM infrastructure, and the second describes the
Core LLVM classes. In the future this manual will be extended with information
describing how to use extension libraries, such as dominator information, CFG
traversal routines, and useful utilities like the <tt><a
href="/doxygen/InstVisitor_8h-source.html">InstVisitor</a></tt> template.<p>
<!-- *********************************************************************** -->
</ul><table width="100%" bgcolor="#330077" border=0 cellpadding=4 cellspacing=0>
<tr><td align=center><font color="#EEEEFF" size=+2 face="Georgia,Palatino"><b>
<a name="general">General Information
</b></font></td></tr></table><ul>
<!-- *********************************************************************** -->
This section contains general information that is useful if you are working in
the LLVM source-base, but that isn't specific to any particular API.<p>
<!-- ======================================================================= -->
</ul><table width="100%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
<tr><td> </td><td width="100%">
<font color="#EEEEFF" face="Georgia,Palatino"><b>
<a name="stl">The C++ Standard Template Library</a>
</b></font></td></tr