BasicAA: Only query twice if the result of the more general query was MayAlias
authorArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 26 Mar 2013 18:07:53 +0000 (18:07 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 26 Mar 2013 18:07:53 +0000 (18:07 +0000)
commitaadf10435ae70d7690b0e8cd5ac790db1d338734
treeb3865bddb3bc69c367eb9eb8a977c833fc401878
parent9fb5ab558b9874ac7065337a9ac274e2d857da16
BasicAA: Only query twice if the result of the more general query was MayAlias

This is a compile time optimization. Before the patch we would do two traversals
on each call to aliasGEP - one with a set size parameter one with UnknownSize.
We can do better by first checking the result of the alias query with
UnknownSize.
Only if this one returns MayAlias do we query a second time using size and type.

This recovers an about 7% compile time regression on spec/ammp.

radar://12349960

llvm-svn: 178045
llvm/lib/Analysis/BasicAliasAnalysis.cpp