[LLVMdev] Comparison of Alias Analysis in LLVM

David Gardner daveg at xmos.com
Wed Jan 4 09:10:06 PST 2012


Jianzhou Zhao <jianzhou <at> seas.upenn.edu> writes:
> The documents say that all the aa analysis are chained, and give an
> example like opt -basicaa -ds-aa -licm. In this case, does ds-aa
> automatically call basicaa for the case when ds-aa can only return
> MayAlias? This looks magic to me. Is this handled by AnalysisGroup
> magically?

As I understand it, the simplest AA pass which can determine reliable
information is the one which is used, which then chains on to more
complex (and presumably slower) passes.  In this way something like
basicaa can determine a few things as definite and anything it cannot
determine it chains onto another pass (e.g. ds- aa) to have a go at.
This will continue until it finds a definite answer or runs out of AA
passes.

The chaining is used with masking of the results to ensure that the
result only becomes more accurate, even if a chained-to pass doesn't
have any idea what to do (at least for mod/ref info, so I presume it
is similar for alias() calls). 





More information about the llvm-dev mailing list