Skip to content

Commit

Permalink
Document problems that I encountered when working on -scev-aa.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106776 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Dan Gohman committed Jun 24, 2010
1 parent 8acf676 commit 3f43dc3
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/AliasAnalysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<li><a href="#chaining"><tt>AliasAnalysis</tt> chaining behavior</a></li>
<li><a href="#updating">Updating analysis results for transformations</a></li>
<li><a href="#implefficiency">Efficiency Issues</a></li>
<li><a href="#passmanager">Pass Manager Issues</a></li>
</ul>
</li>

Expand Down Expand Up @@ -502,6 +503,45 @@

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="passmanager">Pass Manager Issues</a>
</div>

<div class="doc_text">

<p>PassManager support for alternative AliasAnalysis implementation
has some issues.</p>

<p>There is no way to override the default alias analysis. It would
be very useful to be able to do something like "opt -my-aa -O2" and
have it use -my-aa for all passes which need AliasAnalysis, but there
is currently no support for that, short of changing the source code
and recompiling. Similarly, there is also no way of setting a chain
of analyses as the default.</p>

<p>There is no way for transform passes to declare that they preserve
<tt>AliasAnalysis</tt> implementations. The <tt>AliasAnalysis</tt>
interface includes <tt>deleteValue</tt> and <tt>copyValue</tt> methods
which are intended to allow a pass to keep an AliasAnalysis consistent,
however there's no way for a pass to declare in its
<tt>getAnalysisUsage</tt> that it does so. Some passes attempt to use
<tt>AU.addPreserved&lt;AliasAnalysis&gt;</tt>, however this doesn't
actually have any effect.</tt>

<p><tt>AliasAnalysisCounter</tt> (<tt>-count-aa</tt>) and <tt>AliasDebugger</tt>
(<tt>-debug-aa</tt>) are implemented as <tt>ModulePass</tt> classes, so if your
alias analysis uses <tt>FunctionPass</tt>, it won't be able to use
these utilities. If you try to use them, the pass manager will
silently route alias analysis queries directly to
<tt>BasicAliasAnalysis</tt> instead.</p>

<p>Similarly, the <tt>opt -p</tt> option introduces <tt>ModulePass</tt>
passes between each pass, which prevents the use of <tt>FunctionPass</tt>
alias analysis passes.</p>

</div>

<!-- *********************************************************************** -->
<div class="doc_section">
<a name="using">Using alias analysis results</a>
Expand Down

0 comments on commit 3f43dc3

Please sign in to comment.