A DenseMap of a std::map isn't a very good idea because the "grow()" method will

need to make a deep copy of each of the std::maps. Use a std::map of the
std::map instead. This improves the compile time of sqlite3 by ~2%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148003 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2012-01-12 01:41:03 +00:00
parent 0a338868b7
commit 805e2247fc

View File

@ -364,7 +364,7 @@ namespace {
/// ValueCache - This is all of the cached information for all values,
/// mapped from Value* to key information.
DenseMap<LVIValueHandle, ValueCacheEntryTy> ValueCache;
std::map<LVIValueHandle, ValueCacheEntryTy> ValueCache;
/// OverDefinedCache - This tracks, on a per-block basis, the set of
/// values that are over-defined at the end of that block. This is required
@ -492,7 +492,7 @@ void LazyValueInfoCache::eraseBlock(BasicBlock *BB) {
E = ToErase.end(); I != E; ++I)
OverDefinedCache.erase(*I);
for (DenseMap<LVIValueHandle, ValueCacheEntryTy>::iterator
for (std::map<LVIValueHandle, ValueCacheEntryTy>::iterator
I = ValueCache.begin(), E = ValueCache.end(); I != E; ++I)
I->second.erase(BB);
}