BasicAA: Use reachabilty instead of dominance for checking value equality in phi
authorArnold Schwaighofer <aschwaighofer@apple.com>
Fri, 3 Jan 2014 05:47:03 +0000 (05:47 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Fri, 3 Jan 2014 05:47:03 +0000 (05:47 +0000)
commit3036182e99f4efe74aa1309963271004ed71823b
treeecd0e35d8e2ae41b474760ebf787dd62dade5bd2
parent74a990b16c0206a6d1caa4dbac9f965b690614da
BasicAA: Use reachabilty instead of dominance for checking value equality in phi
cycles

This allows the value equality check to work even if we don't have a dominator
tree. Also add some more comments.

I was worried about compile time impacts and did not implement reachability but
used the dominance check in the initial patch. The trade-off was that the
dominator tree was required.
The llvm utility function isPotentiallyReachable cuts off the recursive search
after 32 visits. Testing did not show any compile time regressions showing my
worries unjustfied.

No compile time or performance regressions at O3 -flto -mavx on test-suite +
externals.

Addresses review comments from r198290.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198400 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/BasicAliasAnalysis.cpp
test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
test/Analysis/BasicAA/phi-aa.ll
test/Analysis/BasicAA/phi-spec-order.ll
test/Analysis/GlobalsModRef/aliastest.ll
test/Transforms/ObjCARC/weak-copies.ll
test/Transforms/ObjCARC/weak-dce.ll