[BasicAA] Avoid calling GetUnderlyingObject, when the result of a previous call can...
authorEhsan Amiri <amehsan@ca.ibm.com>
Fri, 12 Aug 2016 16:05:03 +0000 (16:05 +0000)
committerEhsan Amiri <amehsan@ca.ibm.com>
Fri, 12 Aug 2016 16:05:03 +0000 (16:05 +0000)
commit17e17010758aa06f03e878b0ee1f72f60e08575e
tree74516fa5501fe4634f71726dee61574eda3ba84d
parent2e8f82d962fb0d45c73ef9f32473f579030793db
[BasicAA] Avoid calling GetUnderlyingObject, when the result of a previous call can be reused.

Recursive calls to aliasCheck from alias[GEP|Select|PHI] may result in a second call to GetUnderlyingObject for a Value, whose underlying object is already computed. This patch ensures that in this situations, the underlying object is not computed again, and the result of the previous call is resued.

https://reviews.llvm.org/D22305

llvm-svn: 278519
llvm/include/llvm/Analysis/BasicAliasAnalysis.h
llvm/lib/Analysis/BasicAliasAnalysis.cpp