X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FAliasAnalysis.html;h=6663f0caa75fb1d7f1a4b49ca24c8225872677fa;hb=bb318c073e0442ad86aa499ed329058ebce9b4c7;hp=01492293eef1be8bd531f60ee6b861ed954c0b77;hpb=fcd3725747845f2718b60ac40a0bb97b761fb42e;p=oota-llvm.git diff --git a/docs/AliasAnalysis.html b/docs/AliasAnalysis.html index 01492293eef..6663f0caa75 100644 --- a/docs/AliasAnalysis.html +++ b/docs/AliasAnalysis.html @@ -2,13 +2,13 @@ "http://www.w3.org/TR/html4/strict.dtd">
-Many transformations need information about alias sets that are active in some scope, rather than information about pairwise aliasing. The AliasSetTracker class is used -to efficiently build these Alias Sets from the pairwise alias analysis +href="/doxygen/classllvm_1_1AliasSetTracker.html">AliasSetTracker class +is used to efficiently build these Alias Sets from the pairwise alias analysis information provided by the AliasAnalysis interface.
First you initialize the AliasSetTracker by using the "add" methods @@ -601,7 +608,6 @@ are.
-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 +global does not have its address taken, the pass knows that no pointers alias +the global. This pass also keeps track of functions that it knows never access +memory or never read memory. This allows certain optimizations (e.g. GCSE) to +eliminate call instructions entirely. +
+ +The real power of this pass is that it provides context-sensitive mod/ref +information for call instructions. This allows the optimizer to know that +calls to a function do not clobber or read the value of the global, allowing +loads and stores to be eliminated.
+ +Note that this pass is somewhat limited in its scope (only support +non-address taken globals), but is very quick analysis.
+Note that -steens-aa is available in the optional "poolalloc" +module, it is not part of the LLVM core.
+Note that -ds-aa is available in the optional "poolalloc" +module, it is not part of the LLVM core.
+ @@ -821,8 +855,8 @@ pointer.
-The -load-vn pass uses alias analysis to "value
+
+ The -load-vn pass uses alias analysis to "value
number" loads and pointers values, which is used by the GCSE pass to
eliminate instructions. The -load-vn pass relies on alias information
and must-alias information. This combination of passes can make the following
@@ -840,18 +874,19 @@ calls into direct calls.
These passes are useful for evaluating the various alias analysis implementations. You can use them with commands like 'opt -anders-aa -ds-aa --aa-eval foo.bc -disable-output -stats'. +-aa-eval foo.bc -disable-output -stats'.
+The -print-alias-sets pass is exposed as part of the -analyze tool to print out the Alias Sets formed by the opt tool to print out the Alias Sets formed by the AliasSetTracker class. This is useful if you're using -the AliasSetTracker class.
+the AliasSetTracker class. To use it, use something like: + ++% opt -ds-aa -print-alias-sets -disable-output ++
The -count-aa pass is useful to see how many queries a particular -pass is making and what responses are returned by the alias analysis. An -example usage is:
+pass is making and what responses are returned by the alias analysis. As an +example, +- $ opt -basicaa -count-aa -ds-aa -count-aa -licm +% opt -basicaa -count-aa -ds-aa -count-aa -licm+
Which will print out how many queries (and what responses are returned) by -the -licm pass (of the -ds-aa pass) and how many queries are -made of the -basicaa pass by the -ds-aa pass. This can be -useful when debugging a transformation or an alias analysis implementation.
+will print out how many queries (and what responses are returned) by the +-licm pass (of the -ds-aa pass) and how many queries are made +of the -basicaa pass by the -ds-aa pass. This can be useful +when debugging a transformation or an alias analysis implementation.
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, +caching layer on top of alias analysis that is able to answer the question of +what preceding memory operations a given instruction depends on, either at an +intra- or inter-block level. Because of its laziness and caching +policy, using MemDep can be a significant performance win over accessing alias +analysis directly.
+ +