As a concrete example of an Analysis Group in action, consider the
`AliasAnalysis <https://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`_
analysis group. The default implementation of the alias analysis interface
-(the `basicaa <https://llvm.org/doxygen/structBasicAliasAnalysis.html>`_ pass)
+(the `basic-aa <https://llvm.org/doxygen/structBasicAliasAnalysis.html>`_ pass)
just does a few simple checks that don't require significant analysis to
compute (such as: two different globals can never alias each other, etc).
Passes that use the `AliasAnalysis
the designated interface.
From the user's perspective, commands work just like normal. Issuing the
-command ``opt -gvn ...`` will cause the ``basicaa`` class to be instantiated
+command ``opt -gvn ...`` will cause the ``basic-aa`` class to be instantiated
and added to the pass sequence. Issuing the command ``opt -somefancyaa -gvn
...`` will cause the ``gvn`` pass to use the ``somefancyaa`` alias analysis
(which doesn't actually exist, it's just a hypothetical example) instead.
namespace {
// Declare that we implement the AliasAnalysis interface
- INITIALIZE_AG_PASS(BasicAA, AliasAnalysis, "basicaa",
+ INITIALIZE_AG_PASS(BasicAA, AliasAnalysis, "basic-aa",
"Basic Alias Analysis (default AA impl)",
false, // Is CFG Only?
true, // Is Analysis?