From a3de0186b8b9a5fde155c3db0b8fd715fde19e35 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 24 Jun 2010 19:34:03 +0000 Subject: [PATCH] Document problems that I encountered when working on -scev-aa. llvm-svn: 106776 --- llvm/docs/AliasAnalysis.html | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/llvm/docs/AliasAnalysis.html b/llvm/docs/AliasAnalysis.html index 5b4eb937a52f..42b01ac7ec42 100644 --- a/llvm/docs/AliasAnalysis.html +++ b/llvm/docs/AliasAnalysis.html @@ -31,6 +31,7 @@
  • AliasAnalysis chaining behavior
  • Updating analysis results for transformations
  • Efficiency Issues
  • +
  • Pass Manager Issues
  • @@ -502,6 +503,45 @@ method as possible (within reason).

    + +
    + Pass Manager Issues +
    + +
    + +

    PassManager support for alternative AliasAnalysis implementation +has some issues.

    + +

    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.

    + +

    There is no way for transform passes to declare that they preserve +AliasAnalysis implementations. The AliasAnalysis +interface includes deleteValue and copyValue 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 +getAnalysisUsage that it does so. Some passes attempt to use +AU.addPreserved<AliasAnalysis>, however this doesn't +actually have any effect. + +

    AliasAnalysisCounter (-count-aa) and AliasDebugger +(-debug-aa) are implemented as ModulePass classes, so if your +alias analysis uses FunctionPass, 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 +BasicAliasAnalysis instead.

    + +

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

    + +
    +
    Using alias analysis results