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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245314
91177308-0d34-0410-b5e6-
96231b3b80d8
/// 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.