OSDN Git Service

PR15967 Fix in basicaa for faulty returning no alias.
authorArnold Schwaighofer <aschwaighofer@apple.com>
Wed, 26 Mar 2014 21:30:19 +0000 (21:30 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Wed, 26 Mar 2014 21:30:19 +0000 (21:30 +0000)
commit1a444489e9d90915cfdda0720489893896ef1503
treece8511d82006a9bd986353d1e762bdb645f13513
parent5391ac47598a4c6e54b59af84885350deaf95b5e
PR15967 Fix in basicaa for faulty returning no alias.

This commit consist of two parts.
The first part fix the PR15967. The wrong conclusion was made when the MaxLookup
limit was reached. The fix introduce a out parameter (MaxLookupReached) to
DecomposeGEPExpression that the function aliasGEP can act upon.
The second part is introducing the constant MaxLookupSearchDepth to make sure
that DecomposeGEPExpression and GetUnderlyingObject use the same search depth.
This is a small cleanup to clarify the original algorithm.

Patch by Karl-Johan Karlsson!

llvm-svn: 204859
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/2014-03-18-Maxlookup-reached.ll [new file with mode: 0644]