<h2>Section Example</h2>
<div> <!-- h2+div is applied -->
<p>Section preamble.</p>
<h3>Subsection Example</h3>
<p> <!-- h3+p is applied -->
Subsection body
</p>
<!-- End of section body -->
</div>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129901
91177308-0d34-0410-b5e6-
96231b3b80d8
</h2>
<!-- *********************************************************************** -->
</h2>
<!-- *********************************************************************** -->
<p>Alias Analysis (aka Pointer Analysis) is a class of techniques which attempt
to determine whether or not two pointers ever can point to the same object in
<p>Alias Analysis (aka Pointer Analysis) is a class of techniques which attempt
to determine whether or not two pointers ever can point to the same object in
</h2>
<!-- *********************************************************************** -->
</h2>
<!-- *********************************************************************** -->
<p>The <a
href="http://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html"><tt>AliasAnalysis</tt></a>
<p>The <a
href="http://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html"><tt>AliasAnalysis</tt></a>
<a href="LangRef.html#constants">constants</a> are all defined within the
same function.</p>
<a href="LangRef.html#constants">constants</a> are all defined within the
same function.</p>
<!-- ======================================================================= -->
<h3>
<a name="pointers">Representation of Pointers</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="pointers">Representation of Pointers</a>
</h3>
<p>Most importantly, the <tt>AliasAnalysis</tt> class provides several methods
which are used to query whether or not two memory objects alias, whether
<p>Most importantly, the <tt>AliasAnalysis</tt> class provides several methods
which are used to query whether or not two memory objects alias, whether
<a name="alias">The <tt>alias</tt> method</a>
</h3>
<a name="alias">The <tt>alias</tt> method</a>
</h3>
<p>The <tt>alias</tt> method is the primary interface used to determine whether
or not two memory objects alias each other. It takes two memory objects as
input and returns MustAlias, PartialAlias, MayAlias, or NoAlias as
<p>The <tt>alias</tt> method is the primary interface used to determine whether
or not two memory objects alias each other. It takes two memory objects as
input and returns MustAlias, PartialAlias, MayAlias, or NoAlias as
<p>Like all <tt>AliasAnalysis</tt> interfaces, the <tt>alias</tt> method requires
that either the two pointer values be defined within the same function, or at
least one of the values is a <a href="LangRef.html#constants">constant</a>.</p>
<p>Like all <tt>AliasAnalysis</tt> interfaces, the <tt>alias</tt> method requires
that either the two pointer values be defined within the same function, or at
least one of the values is a <a href="LangRef.html#constants">constant</a>.</p>
<!-- _______________________________________________________________________ -->
<h4>
<a name="MustMayNo">Must, May, and No Alias Responses</a>
</h4>
<!-- _______________________________________________________________________ -->
<h4>
<a name="MustMayNo">Must, May, and No Alias Responses</a>
</h4>
<p>The NoAlias response may be used when there is never an immediate dependence
between any memory reference <i>based</i> on one pointer and any memory
reference <i>based</i> the other. The most obvious example is when the two
<p>The NoAlias response may be used when there is never an immediate dependence
between any memory reference <i>based</i> on one pointer and any memory
reference <i>based</i> the other. The most obvious example is when the two
<!-- ======================================================================= -->
<h3>
<a name="ModRefInfo">The <tt>getModRefInfo</tt> methods</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="ModRefInfo">The <tt>getModRefInfo</tt> methods</a>
</h3>
<p>The <tt>getModRefInfo</tt> methods return information about whether the
execution of an instruction can read or modify a memory location. Mod/Ref
<p>The <tt>getModRefInfo</tt> methods return information about whether the
execution of an instruction can read or modify a memory location. Mod/Ref
<a name="OtherItfs">Other useful <tt>AliasAnalysis</tt> methods</a>
</h3>
<a name="OtherItfs">Other useful <tt>AliasAnalysis</tt> methods</a>
</h3>
<p>
Several other tidbits of information are often collected by various alias
analysis implementations and can be put to good use by various clients.
</p>
<p>
Several other tidbits of information are often collected by various alias
analysis implementations and can be put to good use by various clients.
</p>
<!-- _______________________________________________________________________ -->
<h4>
The <tt>pointsToConstantMemory</tt> method
</h4>
<!-- _______________________________________________________________________ -->
<h4>
The <tt>pointsToConstantMemory</tt> method
</h4>
<p>The <tt>pointsToConstantMemory</tt> method returns true if and only if the
analysis can prove that the pointer only points to unchanging memory locations
<p>The <tt>pointsToConstantMemory</tt> method returns true if and only if the
analysis can prove that the pointer only points to unchanging memory locations
<tt>onlyReadsMemory</tt> methods</a>
</h4>
<tt>onlyReadsMemory</tt> methods</a>
</h4>
<p>These methods are used to provide very simple mod/ref information for
function calls. The <tt>doesNotAccessMemory</tt> method returns true for a
<p>These methods are used to provide very simple mod/ref information for
function calls. The <tt>doesNotAccessMemory</tt> method returns true for a
<!-- *********************************************************************** -->
<h2>
<a name="writingnew">Writing a new <tt>AliasAnalysis</tt> Implementation</a>
</h2>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<h2>
<a name="writingnew">Writing a new <tt>AliasAnalysis</tt> Implementation</a>
</h2>
<!-- *********************************************************************** -->
<p>Writing a new alias analysis implementation for LLVM is quite
straight-forward. There are already several implementations that you can use
<p>Writing a new alias analysis implementation for LLVM is quite
straight-forward. There are already several implementations that you can use
For a examples, take a look at the <a href="#impls">various alias analysis
implementations</a> included with LLVM.</p>
For a examples, take a look at the <a href="#impls">various alias analysis
implementations</a> included with LLVM.</p>
<!-- ======================================================================= -->
<h3>
<a name="passsubclasses">Different Pass styles</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="passsubclasses">Different Pass styles</a>
</h3>
<p>The first step to determining what type of <a
href="WritingAnLLVMPass.html">LLVM pass</a> you need to use for your Alias
<p>The first step to determining what type of <a
href="WritingAnLLVMPass.html">LLVM pass</a> you need to use for your Alias
<a name="requiredcalls">Required initialization calls</a>
</h3>
<a name="requiredcalls">Required initialization calls</a>
</h3>
<p>Your subclass of <tt>AliasAnalysis</tt> is required to invoke two methods on
the <tt>AliasAnalysis</tt> base class: <tt>getAnalysisUsage</tt> and
<p>Your subclass of <tt>AliasAnalysis</tt> is required to invoke two methods on
the <tt>AliasAnalysis</tt> base class: <tt>getAnalysisUsage</tt> and
<a name="interfaces">Interfaces which may be specified</a>
</h3>
<a name="interfaces">Interfaces which may be specified</a>
</h3>
<p>All of the <a
href="/doxygen/classllvm_1_1AliasAnalysis.html"><tt>AliasAnalysis</tt></a>
<p>All of the <a
href="/doxygen/classllvm_1_1AliasAnalysis.html"><tt>AliasAnalysis</tt></a>
<a name="chaining"><tt>AliasAnalysis</tt> chaining behavior</a>
</h3>
<a name="chaining"><tt>AliasAnalysis</tt> chaining behavior</a>
</h3>
<p>With only two special exceptions (the <tt><a
href="#basic-aa">basicaa</a></tt> and <a href="#no-aa"><tt>no-aa</tt></a>
<p>With only two special exceptions (the <tt><a
href="#basic-aa">basicaa</a></tt> and <a href="#no-aa"><tt>no-aa</tt></a>
<a name="updating">Updating analysis results for transformations</a>
</h3>
<a name="updating">Updating analysis results for transformations</a>
</h3>
<p>
Alias analysis information is initially computed for a static snapshot of the
program, but clients will use this information to make transformations to the
<p>
Alias analysis information is initially computed for a static snapshot of the
program, but clients will use this information to make transformations to the
example, when an instruction is deleted), and clients of alias analysis must be
sure to call these interfaces appropriately.
</p>
example, when an instruction is deleted), and clients of alias analysis must be
sure to call these interfaces appropriately.
</p>
<!-- _______________________________________________________________________ -->
<h4>The <tt>deleteValue</tt> method</h4>
<!-- _______________________________________________________________________ -->
<h4>The <tt>deleteValue</tt> method</h4>
The <tt>deleteValue</tt> method is called by transformations when they remove an
instruction or any other value from the program (including values that do not
use pointers). Typically alias analyses keep data structures that have entries
The <tt>deleteValue</tt> method is called by transformations when they remove an
instruction or any other value from the program (including values that do not
use pointers). Typically alias analyses keep data structures that have entries
<!-- _______________________________________________________________________ -->
<h4>The <tt>copyValue</tt> method</h4>
<!-- _______________________________________________________________________ -->
<h4>The <tt>copyValue</tt> method</h4>
The <tt>copyValue</tt> method is used when a new value is introduced into the
program. There is no way to introduce a value into the program that did not
exist before (this doesn't make sense for a safe compiler transformation), so
The <tt>copyValue</tt> method is used when a new value is introduced into the
program. There is no way to introduce a value into the program that did not
exist before (this doesn't make sense for a safe compiler transformation), so
<!-- _______________________________________________________________________ -->
<h4>The <tt>replaceWithNewValue</tt> method</h4>
<!-- _______________________________________________________________________ -->
<h4>The <tt>replaceWithNewValue</tt> method</h4>
This method is a simple helper method that is provided to make clients easier to
use. It is implemented by copying the old analysis information to the new
value, then deleting the old value. This method cannot be overridden by alias
This method is a simple helper method that is provided to make clients easier to
use. It is implemented by copying the old analysis information to the new
value, then deleting the old value. This method cannot be overridden by alias
<!-- _______________________________________________________________________ -->
<h4>The <tt>addEscapingUse</tt> method</h4>
<!-- _______________________________________________________________________ -->
<h4>The <tt>addEscapingUse</tt> method</h4>
<p>The <tt>addEscapingUse</tt> method is used when the uses of a pointer
value have changed in ways that may invalidate precomputed analysis information.
Implementations may either use this callback to provide conservative responses
<p>The <tt>addEscapingUse</tt> method is used when the uses of a pointer
value have changed in ways that may invalidate precomputed analysis information.
Implementations may either use this callback to provide conservative responses
<!-- ======================================================================= -->
<h3>
<a name="implefficiency">Efficiency Issues</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="implefficiency">Efficiency Issues</a>
</h3>
<p>From the LLVM perspective, the only thing you need to do to provide an
efficient alias analysis is to make sure that alias analysis <b>queries</b> are
<p>From the LLVM perspective, the only thing you need to do to provide an
efficient alias analysis is to make sure that alias analysis <b>queries</b> are
<a name="limitations">Limitations</a>
</h3>
<a name="limitations">Limitations</a>
</h3>
<p>The AliasAnalysis infrastructure has several limitations which make
writing a new <tt>AliasAnalysis</tt> implementation difficult.</p>
<p>The AliasAnalysis infrastructure has several limitations which make
writing a new <tt>AliasAnalysis</tt> implementation difficult.</p>
<!-- *********************************************************************** -->
<h2>
<a name="using">Using alias analysis results</a>
</h2>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<h2>
<a name="using">Using alias analysis results</a>
</h2>
<!-- *********************************************************************** -->
<p>There are several different ways to use alias analysis results. In order of
preference, these are...</p>
<p>There are several different ways to use alias analysis results. In order of
preference, these are...</p>
<!-- ======================================================================= -->
<h3>
<a name="memdep">Using the <tt>MemoryDependenceAnalysis</tt> Pass</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="memdep">Using the <tt>MemoryDependenceAnalysis</tt> Pass</a>
</h3>
<p>The <tt>memdep</tt> pass uses alias analysis to provide high-level dependence
information about memory-using instructions. This will tell you which store
<p>The <tt>memdep</tt> pass uses alias analysis to provide high-level dependence
information about memory-using instructions. This will tell you which store
<a name="ast">Using the <tt>AliasSetTracker</tt> class</a>
</h3>
<a name="ast">Using the <tt>AliasSetTracker</tt> class</a>
</h3>
<p>Many transformations need information about alias <b>sets</b> that are active
in some scope, rather than information about pairwise aliasing. The <tt><a
<p>Many transformations need information about alias <b>sets</b> that are active
in some scope, rather than information about pairwise aliasing. The <tt><a
duration of the loop nest. Both of these transformations only apply if the
pointer argument is loop-invariant.</p>
duration of the loop nest. Both of these transformations only apply if the
pointer argument is loop-invariant.</p>
<!-- _______________________________________________________________________ -->
<h4>
The AliasSetTracker implementation
</h4>
<!-- _______________________________________________________________________ -->
<h4>
The AliasSetTracker implementation
</h4>
<p>The AliasSetTracker class is implemented to be as efficient as possible. It
uses the union-find algorithm to efficiently merge AliasSets when a pointer is
<p>The AliasSetTracker class is implemented to be as efficient as possible. It
uses the union-find algorithm to efficiently merge AliasSets when a pointer is
<!-- ======================================================================= -->
<h3>
<a name="direct">Using the <tt>AliasAnalysis</tt> interface directly</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="direct">Using the <tt>AliasAnalysis</tt> interface directly</a>
</h3>
<p>If neither of these utility class are what your pass needs, you should use
the interfaces exposed by the <tt>AliasAnalysis</tt> class directly. Try to use
<p>If neither of these utility class are what your pass needs, you should use
the interfaces exposed by the <tt>AliasAnalysis</tt> class directly. Try to use
<!-- *********************************************************************** -->
<h2>
<a name="exist">Existing alias analysis implementations and clients</a>
</h2>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<h2>
<a name="exist">Existing alias analysis implementations and clients</a>
</h2>
<!-- *********************************************************************** -->
<p>If you're going to be working with the LLVM alias analysis infrastructure,
you should know what clients and implementations of alias analysis are
<p>If you're going to be working with the LLVM alias analysis infrastructure,
you should know what clients and implementations of alias analysis are
be aware of the <a href="#aliasanalysis-debug">the clients</a> that are useful
for monitoring and evaluating different implementations.</p>
be aware of the <a href="#aliasanalysis-debug">the clients</a> that are useful
for monitoring and evaluating different implementations.</p>
<!-- ======================================================================= -->
<h3>
<a name="impls">Available <tt>AliasAnalysis</tt> implementations</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="impls">Available <tt>AliasAnalysis</tt> implementations</a>
</h3>
<p>This section lists the various implementations of the <tt>AliasAnalysis</tt>
interface. With the exception of the <a href="#no-aa"><tt>-no-aa</tt></a> and
<a href="#basic-aa"><tt>-basicaa</tt></a> implementations, all of these <a
href="#chaining">chain</a> to other alias analysis implementations.</p>
<p>This section lists the various implementations of the <tt>AliasAnalysis</tt>
interface. With the exception of the <a href="#no-aa"><tt>-no-aa</tt></a> and
<a href="#basic-aa"><tt>-basicaa</tt></a> implementations, all of these <a
href="#chaining">chain</a> to other alias analysis implementations.</p>
<!-- _______________________________________________________________________ -->
<h4>
<a name="no-aa">The <tt>-no-aa</tt> pass</a>
</h4>
<!-- _______________________________________________________________________ -->
<h4>
<a name="no-aa">The <tt>-no-aa</tt> pass</a>
</h4>
<p>The <tt>-no-aa</tt> pass is just like what it sounds: an alias analysis that
never returns any useful information. This pass can be useful if you think that
<p>The <tt>-no-aa</tt> pass is just like what it sounds: an alias analysis that
never returns any useful information. This pass can be useful if you think that
<a name="basic-aa">The <tt>-basicaa</tt> pass</a>
</h4>
<a name="basic-aa">The <tt>-basicaa</tt> pass</a>
</h4>
<p>The <tt>-basicaa</tt> pass is an aggressive local analysis that "knows"
many important facts:</p>
<p>The <tt>-basicaa</tt> pass is an aggressive local analysis that "knows"
many important facts:</p>
<a name="globalsmodref">The <tt>-globalsmodref-aa</tt> pass</a>
</h4>
<a name="globalsmodref">The <tt>-globalsmodref-aa</tt> pass</a>
</h4>
<p>This pass implements a simple context-sensitive mod/ref and alias analysis
for internal global variables that don't "have their address taken". If a
<p>This pass implements a simple context-sensitive mod/ref and alias analysis
for internal global variables that don't "have their address taken". If a
<a name="steens-aa">The <tt>-steens-aa</tt> pass</a>
</h4>
<a name="steens-aa">The <tt>-steens-aa</tt> pass</a>
</h4>
<p>The <tt>-steens-aa</tt> pass implements a variation on the well-known
"Steensgaard's algorithm" for interprocedural alias analysis. Steensgaard's
<p>The <tt>-steens-aa</tt> pass implements a variation on the well-known
"Steensgaard's algorithm" for interprocedural alias analysis. Steensgaard's
<a name="ds-aa">The <tt>-ds-aa</tt> pass</a>
</h4>
<a name="ds-aa">The <tt>-ds-aa</tt> pass</a>
</h4>
<p>The <tt>-ds-aa</tt> pass implements the full Data Structure Analysis
algorithm. Data Structure Analysis is a modular unification-based,
<p>The <tt>-ds-aa</tt> pass implements the full Data Structure Analysis
algorithm. Data Structure Analysis is a modular unification-based,
<a name="scev-aa">The <tt>-scev-aa</tt> pass</a>
</h4>
<a name="scev-aa">The <tt>-scev-aa</tt> pass</a>
</h4>
<p>The <tt>-scev-aa</tt> pass implements AliasAnalysis queries by
translating them into ScalarEvolution queries. This gives it a
<p>The <tt>-scev-aa</tt> pass implements AliasAnalysis queries by
translating them into ScalarEvolution queries. This gives it a
<!-- ======================================================================= -->
<h3>
<a name="aliasanalysis-xforms">Alias analysis driven transformations</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="aliasanalysis-xforms">Alias analysis driven transformations</a>
</h3>
LLVM includes several alias-analysis driven transformations which can be used
with any of the implementations above.
LLVM includes several alias-analysis driven transformations which can be used
with any of the implementations above.
<!-- _______________________________________________________________________ -->
<h4>
<a name="adce">The <tt>-adce</tt> pass</a>
</h4>
<!-- _______________________________________________________________________ -->
<h4>
<a name="adce">The <tt>-adce</tt> pass</a>
</h4>
<p>The <tt>-adce</tt> pass, which implements Aggressive Dead Code Elimination
uses the <tt>AliasAnalysis</tt> interface to delete calls to functions that do
<p>The <tt>-adce</tt> pass, which implements Aggressive Dead Code Elimination
uses the <tt>AliasAnalysis</tt> interface to delete calls to functions that do
<a name="licm">The <tt>-licm</tt> pass</a>
</h4>
<a name="licm">The <tt>-licm</tt> pass</a>
</h4>
<p>The <tt>-licm</tt> pass implements various Loop Invariant Code Motion related
transformations. It uses the <tt>AliasAnalysis</tt> interface for several
<p>The <tt>-licm</tt> pass implements various Loop Invariant Code Motion related
transformations. It uses the <tt>AliasAnalysis</tt> interface for several
<a name="argpromotion">The <tt>-argpromotion</tt> pass</a>
</h4>
<a name="argpromotion">The <tt>-argpromotion</tt> pass</a>
</h4>
<p>
The <tt>-argpromotion</tt> pass promotes by-reference arguments to be passed in
by-value instead. In particular, if pointer arguments are only loaded from it
<p>
The <tt>-argpromotion</tt> pass promotes by-reference arguments to be passed in
by-value instead. In particular, if pointer arguments are only loaded from it
<p>These passes use AliasAnalysis information to reason about loads and stores.
</p>
</div>
<p>These passes use AliasAnalysis information to reason about loads and stores.
</p>
</div>
<!-- ======================================================================= -->
<h3>
<a name="aliasanalysis-debug">Clients for debugging and evaluation of
implementations</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="aliasanalysis-debug">Clients for debugging and evaluation of
implementations</a>
</h3>
<p>These passes are useful for evaluating the various alias analysis
implementations. You can use them with commands like '<tt>opt -ds-aa
-aa-eval foo.bc -disable-output -stats</tt>'.</p>
<p>These passes are useful for evaluating the various alias analysis
implementations. You can use them with commands like '<tt>opt -ds-aa
-aa-eval foo.bc -disable-output -stats</tt>'.</p>
<!-- _______________________________________________________________________ -->
<h4>
<a name="print-alias-sets">The <tt>-print-alias-sets</tt> pass</a>
</h4>
<!-- _______________________________________________________________________ -->
<h4>
<a name="print-alias-sets">The <tt>-print-alias-sets</tt> pass</a>
</h4>
<p>The <tt>-print-alias-sets</tt> pass is exposed as part of the
<tt>opt</tt> tool to print out the Alias Sets formed by the <a
<p>The <tt>-print-alias-sets</tt> pass is exposed as part of the
<tt>opt</tt> tool to print out the Alias Sets formed by the <a
<a name="count-aa">The <tt>-count-aa</tt> pass</a>
</h4>
<a name="count-aa">The <tt>-count-aa</tt> pass</a>
</h4>
<p>The <tt>-count-aa</tt> pass is useful to see how many queries a particular
pass is making and what responses are returned by the alias analysis. As an
<p>The <tt>-count-aa</tt> pass is useful to see how many queries a particular
pass is making and what responses are returned by the alias analysis. As an
<a name="aa-eval">The <tt>-aa-eval</tt> pass</a>
</h4>
<a name="aa-eval">The <tt>-aa-eval</tt> pass</a>
</h4>
<p>The <tt>-aa-eval</tt> pass simply iterates through all pairs of pointers in a
function and asks an alias analysis whether or not the pointers alias. This
<p>The <tt>-aa-eval</tt> pass simply iterates through all pairs of pointers in a
function and asks an alias analysis whether or not the pointers alias. This
<!-- *********************************************************************** -->
<h2>
<a name="memdep">Memory Dependence Analysis</a>
</h2>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<h2>
<a name="memdep">Memory Dependence Analysis</a>
</h2>
<!-- *********************************************************************** -->
<p>If you're just looking to be a client of alias analysis information, consider
using the Memory Dependence Analysis interface instead. MemDep is a lazy,
<p>If you're just looking to be a client of alias analysis information, consider
using the Memory Dependence Analysis interface instead. MemDep is a lazy,
</h2>
<!-- *********************************************************************** -->
</h2>
<!-- *********************************************************************** -->
<p>This document contains the release notes for the LLVM Compiler
Infrastructure, release 2.9. Here we describe the status of LLVM, including
<p>This document contains the release notes for the LLVM Compiler
Infrastructure, release 2.9. Here we describe the status of LLVM, including
</h2>
<!-- *********************************************************************** -->
</h2>
<!-- *********************************************************************** -->
<p>
The LLVM 2.9 distribution currently consists of code from the core LLVM
repository (which roughly includes the LLVM optimizers, code generators
<p>
The LLVM 2.9 distribution currently consists of code from the core LLVM
repository (which roughly includes the LLVM optimizers, code generators
development. Here we include updates on these subprojects.
</p>
development. Here we include updates on these subprojects.
</p>
<!--=========================================================================-->
<h3>
<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
</h3>
<!--=========================================================================-->
<h3>
<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
</h3>
<p><a href="http://clang.llvm.org/">Clang</a> is an LLVM front end for the C,
C++, and Objective-C languages. Clang aims to provide a better user experience
<p><a href="http://clang.llvm.org/">Clang</a> is an LLVM front end for the C,
C++, and Objective-C languages. Clang aims to provide a better user experience
<a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
</h3>
<a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
</h3>
<p>
<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
<a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
<p>
<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
<a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
<a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
</h3>
<a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
</h3>
<p>
The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
is a simple library that provides an implementation of the low-level
<p>
The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
is a simple library that provides an implementation of the low-level
<a name="lldb">LLDB: Low Level Debugger</a>
</h3>
<a name="lldb">LLDB: Low Level Debugger</a>
</h3>
<p>
<a href="http://lldb.llvm.org/">LLDB</a> is a brand new member of the LLVM
umbrella of projects. LLDB is a next generation, high-performance debugger. It
<p>
<a href="http://lldb.llvm.org/">LLDB</a> is a brand new member of the LLVM
umbrella of projects. LLDB is a next generation, high-performance debugger. It
<a name="libc++">libc++: C++ Standard Library</a>
</h3>
<a name="libc++">libc++: C++ Standard Library</a>
</h3>
<p>
<a href="http://libcxx.llvm.org/">libc++</a> is another new member of the LLVM
family. It is an implementation of the C++ standard library, written from the
<p>
<a href="http://libcxx.llvm.org/">libc++</a> is another new member of the LLVM
family. It is an implementation of the C++ standard library, written from the
<a name="LLBrowse">LLBrowse: IR Browser</a>
</h3>
<a name="LLBrowse">LLBrowse: IR Browser</a>
</h3>
<p>
<a href="http://llvm.org/svn/llvm-project/llbrowse/trunk/doc/LLBrowse.html">
LLBrowse</a> is an interactive viewer for LLVM modules. It can load any LLVM
<p>
<a href="http://llvm.org/svn/llvm-project/llbrowse/trunk/doc/LLBrowse.html">
LLBrowse</a> is an interactive viewer for LLVM modules. It can load any LLVM
<a name="vmkit">VMKit</a>
</h3>
<a name="vmkit">VMKit</a>
</h3>
<p>The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation
of a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and
just-in-time compilation. As of LLVM 2.9, VMKit now supports generational
<p>The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation
of a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and
just-in-time compilation. As of LLVM 2.9, VMKit now supports generational
<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
</h3>
<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
</h3>
<p>
<a href="http://klee.llvm.org/">KLEE</a> is a symbolic execution framework for
programs in LLVM bitcode form. KLEE tries to symbolically evaluate "all" paths
<p>
<a href="http://klee.llvm.org/">KLEE</a> is a symbolic execution framework for
programs in LLVM bitcode form. KLEE tries to symbolically evaluate "all" paths
<!-- *********************************************************************** -->
<h2>
<!-- *********************************************************************** -->
<h2>
</h2>
<!-- *********************************************************************** -->
</h2>
<!-- *********************************************************************** -->
<p>An exciting aspect of LLVM is that it is used as an enabling technology for
a lot of other language and tools projects. This section lists some of the
projects that have already been updated to work with LLVM 2.9.</p>
<p>An exciting aspect of LLVM is that it is used as an enabling technology for
a lot of other language and tools projects. This section lists some of the
projects that have already been updated to work with LLVM 2.9.</p>
<!--=========================================================================-->
<h3>Crack Programming Language</h3>
<!--=========================================================================-->
<h3>Crack Programming Language</h3>
<p>
<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide the
ease of development of a scripting language with the performance of a compiled
<p>
<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide the
ease of development of a scripting language with the performance of a compiled
<!--=========================================================================-->
<h3>TTA-based Codesign Environment (TCE)</h3>
<!--=========================================================================-->
<h3>TTA-based Codesign Environment (TCE)</h3>
<p>TCE is a toolset for designing application-specific processors (ASP) based on
the Transport triggered architecture (TTA). The toolset provides a complete
co-design flow from C/C++ programs down to synthesizable VHDL and parallel
<p>TCE is a toolset for designing application-specific processors (ASP) based on
the Transport triggered architecture (TTA). The toolset provides a complete
co-design flow from C/C++ programs down to synthesizable VHDL and parallel
<!--=========================================================================-->
<h3>PinaVM</h3>
<!--=========================================================================-->
<h3>PinaVM</h3>
<p><a href="http://gitorious.org/pinavm/pages/Home">PinaVM</a> is an open
source, <a href="http://www.systemc.org/">SystemC</a> front-end. Unlike many
other front-ends, PinaVM actually executes the elaboration of the
<p><a href="http://gitorious.org/pinavm/pages/Home">PinaVM</a> is an open
source, <a href="http://www.systemc.org/">SystemC</a> front-end. Unlike many
other front-ends, PinaVM actually executes the elaboration of the
<!--=========================================================================-->
<h3>Pure</h3>
<!--=========================================================================-->
<h3>Pure</h3>
<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
algebraic/functional
programming language based on term rewriting. Programs are collections
<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
algebraic/functional
programming language based on term rewriting. Programs are collections
<!--=========================================================================-->
<h3 id="icedtea">IcedTea Java Virtual Machine Implementation</h3>
<!--=========================================================================-->
<h3 id="icedtea">IcedTea Java Virtual Machine Implementation</h3>
<p>
<a href="http://icedtea.classpath.org/wiki/Main_Page">IcedTea</a> provides a
harness to build OpenJDK using only free software build tools and to provide
<p>
<a href="http://icedtea.classpath.org/wiki/Main_Page">IcedTea</a> provides a
harness to build OpenJDK using only free software build tools and to provide
<!--=========================================================================-->
<h3>Glasgow Haskell Compiler (GHC)</h3>
<!--=========================================================================-->
<h3>Glasgow Haskell Compiler (GHC)</h3>
<p>GHC is an open source, state-of-the-art programming suite for Haskell,
a standard lazy functional programming language. It includes an
optimizing static compiler generating good code for a variety of
<p>GHC is an open source, state-of-the-art programming suite for Haskell,
a standard lazy functional programming language. It includes an
optimizing static compiler generating good code for a variety of
<!--=========================================================================-->
<h3>Polly - Polyhedral optimizations for LLVM</h3>
<!--=========================================================================-->
<h3>Polly - Polyhedral optimizations for LLVM</h3>
<p>Polly is a project that aims to provide advanced memory access optimizations
to better take advantage of SIMD units, cache hierarchies, multiple cores or
even vector accelerators for LLVM. Built around an abstract mathematical
<p>Polly is a project that aims to provide advanced memory access optimizations
to better take advantage of SIMD units, cache hierarchies, multiple cores or
even vector accelerators for LLVM. Built around an abstract mathematical
<!--=========================================================================-->
<h3>Rubinius</h3>
<!--=========================================================================-->
<h3>Rubinius</h3>
<p><a href="http://github.com/evanphx/rubinius">Rubinius</a> is an environment
for running Ruby code which strives to write as much of the implementation in
Ruby as possible. Combined with a bytecode interpreting VM, it uses LLVM to
<p><a href="http://github.com/evanphx/rubinius">Rubinius</a> is an environment
for running Ruby code which strives to write as much of the implementation in
Ruby as possible. Combined with a bytecode interpreting VM, it uses LLVM to
<a name="FAUST">FAUST Real-Time Audio Signal Processing Language</a>
</h3>
<a name="FAUST">FAUST Real-Time Audio Signal Processing Language</a>
</h3>
<p>
<a href="http://faust.grame.fr">FAUST</a> is a compiled language for real-time
audio signal processing. The name FAUST stands for Functional AUdio STream. Its
<p>
<a href="http://faust.grame.fr">FAUST</a> is a compiled language for real-time
audio signal processing. The name FAUST stands for Functional AUdio STream. Its
<!-- *********************************************************************** -->
<h2>
<a name="whatsnew">What's New in LLVM 2.9?</a>
</h2>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<h2>
<a name="whatsnew">What's New in LLVM 2.9?</a>
</h2>
<!-- *********************************************************************** -->
<p>This release includes a huge number of bug fixes, performance tweaks and
minor improvements. Some of the major improvements and new features are listed
in this section.
</p>
<p>This release includes a huge number of bug fixes, performance tweaks and
minor improvements. Some of the major improvements and new features are listed
in this section.
</p>
<!--=========================================================================-->
<h3>
<a name="majorfeatures">Major New Features</a>
</h3>
<!--=========================================================================-->
<h3>
<a name="majorfeatures">Major New Features</a>
</h3>
<p>LLVM 2.9 includes several major new capabilities:</p>
<p>LLVM 2.9 includes several major new capabilities:</p>
<a name="coreimprovements">LLVM IR and Core Improvements</a>
</h3>
<a name="coreimprovements">LLVM IR and Core Improvements</a>
</h3>
<p>LLVM IR has several new features for better support of new targets and that
expose new optimization opportunities:</p>
<p>LLVM IR has several new features for better support of new targets and that
expose new optimization opportunities:</p>
<a name="optimizer">Optimizer Improvements</a>
</h3>
<a name="optimizer">Optimizer Improvements</a>
</h3>
<p>In addition to a large array of minor performance tweaks and bug fixes, this
release includes a few major enhancements and additions to the optimizers:</p>
<p>In addition to a large array of minor performance tweaks and bug fixes, this
release includes a few major enhancements and additions to the optimizers:</p>
<a name="mc">MC Level Improvements</a>
</h3>
<a name="mc">MC Level Improvements</a>
</h3>
<p>
The LLVM Machine Code (aka MC) subsystem was created to solve a number
of problems in the realm of assembly, disassembly, object file format handling,
<p>
The LLVM Machine Code (aka MC) subsystem was created to solve a number
of problems in the realm of assembly, disassembly, object file format handling,
<a name="codegen">Target Independent Code Generator Improvements</a>
</h3>
<a name="codegen">Target Independent Code Generator Improvements</a>
</h3>
<p>We have put a significant amount of work into the code generator
infrastructure, which allows us to implement more aggressive algorithms and make
<p>We have put a significant amount of work into the code generator
infrastructure, which allows us to implement more aggressive algorithms and make
<a name="x86">X86-32 and X86-64 Target Improvements</a>
</h3>
<a name="x86">X86-32 and X86-64 Target Improvements</a>
</h3>
<p>New features and major changes in the X86 target include:
</p>
<p>New features and major changes in the X86 target include:
</p>
<a name="ARM">ARM Target Improvements</a>
</h3>
<a name="ARM">ARM Target Improvements</a>
</h3>
<p>New features of the ARM target include:
</p>
<p>New features of the ARM target include:
</p>
<a name="OtherTS">Other Target Specific Improvements</a>
</h3>
<a name="OtherTS">Other Target Specific Improvements</a>
</h3>
<ul>
<li>MicroBlaze: major updates for aggressive delay slot filler, MC-based
assembly printing, assembly instruction parsing, ELF .o file emission, and MC
<ul>
<li>MicroBlaze: major updates for aggressive delay slot filler, MC-based
assembly printing, assembly instruction parsing, ELF .o file emission, and MC
<a name="changes">Major Changes and Removed Features</a>
</h3>
<a name="changes">Major Changes and Removed Features</a>
</h3>
<p>If you're already an LLVM user or developer with out-of-tree changes based
on LLVM 2.8, this section lists some "gotchas" that you may run into upgrading
<p>If you're already an LLVM user or developer with out-of-tree changes based
on LLVM 2.8, this section lists some "gotchas" that you may run into upgrading
<a name="api_changes">Internal API Changes</a>
</h3>
<a name="api_changes">Internal API Changes</a>
</h3>
<p>In addition, many APIs have changed in this release. Some of the major
LLVM API changes are:</p>
<p>In addition, many APIs have changed in this release. Some of the major
LLVM API changes are:</p>
<!-- *********************************************************************** -->
<h2>
<a name="knownproblems">Known Problems</a>
</h2>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<h2>
<a name="knownproblems">Known Problems</a>
</h2>
<!-- *********************************************************************** -->
<p>This section contains significant known problems with the LLVM system,
listed by component. If you run into a problem, please check the <a
href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
there isn't already one.</p>
<p>This section contains significant known problems with the LLVM system,
listed by component. If you run into a problem, please check the <a
href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
there isn't already one.</p>
<!-- ======================================================================= -->
<h3>
<a name="experimental">Experimental features included with this release</a>
</h3>
<!-- ======================================================================= -->
<h3>
<a name="experimental">Experimental features included with this release</a>
</h3>
<p>The following components of this LLVM release are either untested, known to
be broken or unreliable, or are in early development. These components should
<p>The following components of this LLVM release are either untested, known to
be broken or unreliable, or are in early development. These components should
<a name="x86-be">Known problems with the X86 back-end</a>
</h3>
<a name="x86-be">Known problems with the X86 back-end</a>
</h3>
<ul>
<li>The X86 backend does not yet support
<ul>
<li>The X86 backend does not yet support
<a name="ppc-be">Known problems with the PowerPC back-end</a>
</h3>
<a name="ppc-be">Known problems with the PowerPC back-end</a>
</h3>
<ul>
<li>The Linux PPC32/ABI support needs testing for the interpreter and static
<ul>
<li>The Linux PPC32/ABI support needs testing for the interpreter and static
<a name="arm-be">Known problems with the ARM back-end</a>
</h3>
<a name="arm-be">Known problems with the ARM back-end</a>
</h3>
<ul>
<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
<ul>
<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
<a name="sparc-be">Known problems with the SPARC back-end</a>
</h3>
<a name="sparc-be">Known problems with the SPARC back-end</a>
</h3>
<ul>
<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
<ul>
<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
<a name="mips-be">Known problems with the MIPS back-end</a>
</h3>
<a name="mips-be">Known problems with the MIPS back-end</a>
</h3>
<ul>
<li>64-bit MIPS targets are not supported yet.</li>
<ul>
<li>64-bit MIPS targets are not supported yet.</li>
<a name="alpha-be">Known problems with the Alpha back-end</a>
</h3>
<a name="alpha-be">Known problems with the Alpha back-end</a>
</h3>
<a name="c-be">Known problems with the C back-end</a>
</h3>
<a name="c-be">Known problems with the C back-end</a>
</h3>
<p>The C backend has numerous problems and is not being actively maintained.
Depending on it for anything serious is not advised.</p>
<p>The C backend has numerous problems and is not being actively maintained.
Depending on it for anything serious is not advised.</p>
<a name="llvm-gcc">Known problems with the llvm-gcc front-end</a>
</h3>
<a name="llvm-gcc">Known problems with the llvm-gcc front-end</a>
</h3>
<p><b>LLVM 2.9 will be the last release of llvm-gcc.</b></p>
<p><b>LLVM 2.9 will be the last release of llvm-gcc.</b></p>
consider using <a href="#dragonegg">dragonegg</a> instead.</p>
</div>
consider using <a href="#dragonegg">dragonegg</a> instead.</p>
</div>
<!-- *********************************************************************** -->
<h2>
<a name="additionalinfo">Additional Information</a>
</h2>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<h2>
<a name="additionalinfo">Additional Information</a>
</h2>
<!-- *********************************************************************** -->
<p>A wide variety of additional information is available on the <a
href="http://llvm.org/">LLVM web page</a>, in particular in the <a
<p>A wide variety of additional information is available on the <a
href="http://llvm.org/">LLVM web page</a>, in particular in the <a
+h2+div, h2+p {text-align: left; padding-left: 20pt; padding-right: 10pt;}
+h3+div, h3+p {text-align: left; padding-left: 20pt; padding-right: 10pt;}
+h4+div, h4+p {text-align: left; padding-left: 20pt; padding-right: 10pt;}
+
/* It is preferrable to use <pre class="doc_code"> everywhere instead of the
* <div class="doc_code"><pre>...</ptr></div> construct.
*
/* It is preferrable to use <pre class="doc_code"> everywhere instead of the
* <div class="doc_code"><pre>...</ptr></div> construct.
*