Phi speculation improvement for BasicAA
authorHal Finkel <hfinkel@anl.gov>
Sat, 17 Nov 2012 02:33:15 +0000 (02:33 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 17 Nov 2012 02:33:15 +0000 (02:33 +0000)
commita6f86fc6fa98a4b6386f3d9cbe756be0556709cb
tree332631fa57237136de9f788ad60492c6955ccdb9
parent6fd8c8d98fec5a19d96cdd89897616ba3e4d4204
Phi speculation improvement for BasicAA

This is a partial solution to PR14351. It removes some of the special
significance of the first incoming phi value in the phi aliasing checking logic
in BasicAA. In the context of a loop, the old logic assumes that the first
incoming value is the interesting one (meaning that it is the one that comes
from outside the loop), but this is often not the case.  With this change, we
now test first the incoming value that comes from a block other than the parent
of the phi being tested.

llvm-svn: 168245
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/phi-spec-order.ll [new file with mode: 0644]