[LLVMdev] RegisterAnalysisGroup
Chris Lattner
sabre at nondot.org
Fri Sep 14 13:51:02 PDT 2007
On Sep 14, 2007, at 1:43 PM, David Greene wrote:
> Can someone explain how RegisterPass and RegisterAnalysisGroup
> conspire to pick the right member of an analysis group when command-
> line
> options dictate non-default implementations?
>
> For example, when I pass -anders-aa to opt, where in the code is
> that option
> parsed and setNormalCtor called on the analysis group to change
> from the
> default basicaa?
When basicaa registers itself as part of the analysis group, it uses:
RegisterPass<BasicAliasAnalysis>
X("basicaa", "Basic Alias Analysis (default AA impl)");
// Declare that we implement the AliasAnalysis interface
RegisterAnalysisGroup<AliasAnalysis, true> Y(X);
The "true" says that it is the default,
-Chris
More information about the llvm-dev
mailing list