diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2015-08-18 16:54:36 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2015-08-18 16:54:36 +0000 |
commit | 1846ea3c71381c5fcce0fbff5bcadfebc42a13d7 (patch) | |
tree | 888655533e9211ee833437ac43ae0c5b465ec6aa /llvm/lib/Analysis/LazyValueInfo.cpp | |
parent | 1cd6d88e4d9558d58a4467514034496fb0a4b7de (diff) | |
download | bcm5719-llvm-1846ea3c71381c5fcce0fbff5bcadfebc42a13d7.tar.gz bcm5719-llvm-1846ea3c71381c5fcce0fbff5bcadfebc42a13d7.zip |
[LVI] Use a SmallDenseMap instead of std::map for ValueCacheEntryTy
Historically there seems to be some resistance regarding the change to DenseMap
(r147980). However, I couldn't find cases of iterator invalidation for
ValueCacheEntryTy, but only for ValueCache, which I left untouched.
This reduces 20s on an internal testcase. Follow up from r245309.
Differential Revision: http://reviews.llvm.org/D11651
rdar://problem/21320066
llvm-svn: 245314
Diffstat (limited to 'llvm/lib/Analysis/LazyValueInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/LazyValueInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index 5904257492b..a984bc40ac1 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/lib/Analysis/LazyValueInfo.cpp @@ -315,7 +315,8 @@ namespace { /// This is all of the cached block information for exactly one Value*. /// The entries are sorted by the BasicBlock* of the /// entries, allowing us to do a lookup with a binary search. - typedef std::map<AssertingVH<BasicBlock>, LVILatticeVal> ValueCacheEntryTy; + typedef SmallDenseMap<AssertingVH<BasicBlock>, LVILatticeVal, 4> + ValueCacheEntryTy; /// This is all of the cached information for all values, /// mapped from Value* to key information. |