[BasicAA] Reduce no of map seaches [NFCI].
authorAlina Sbirlea <asbirlea@google.com>
Thu, 21 Mar 2019 05:02:05 +0000 (05:02 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Thu, 21 Mar 2019 05:02:05 +0000 (05:02 +0000)
commit4fdbd822fc1a3a20197d51cda1b2cc8e6f14df7b
tree0bfed6a0874a7b267663e1f3a664190b8632c84a
parenta262531dd2ed2c5591c72adf4949a0cdc65ef061
[BasicAA] Reduce no of map seaches [NFCI].

Summary:
This is a refactoring patch.
- Reduce the number of map searches by reusing the iterator.
- Add asserts to check that the entry is in the cache, as this is something BasicAA relies on to avoid infinite recursion.

Reviewers: chandlerc, aschwaighofer

Subscribers: sanjoy, jlebar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59151

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