A DenseMap of a std::map isn't a very good idea because the "grow()" method will
authorBill Wendling <isanbard@gmail.com>
Thu, 12 Jan 2012 01:41:03 +0000 (01:41 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 12 Jan 2012 01:41:03 +0000 (01:41 +0000)
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

lib/Analysis/LazyValueInfo.cpp

index d27d911610386963d304a334918c80213f2b1ae5..a5216359250a6ce8dfc33a035a3d8cfc9148ce34 100644 (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);
 }