[cfe-commits] r99823 - in /cfe/trunk/lib/CodeGen: CGDebugInfo.cpp CGDebugInfo.h

Ted Kremenek kremenek at apple.com
Mon Mar 29 11:29:57 PDT 2010


Author: kremenek
Date: Mon Mar 29 13:29:57 2010
New Revision: 99823

URL: http://llvm.org/viewvc/llvm-project?rev=99823&view=rev
Log:
Change 'TypeCache' from being an std::map to a llvm::DenseMap.  This reduces codegen time
on one .i file from 403.gcc by 0.5%.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/lib/CodeGen/CGDebugInfo.h

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=99823&r1=99822&r2=99823&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Mar 29 13:29:57 2010
@@ -1212,7 +1212,7 @@
   Ty = UnwrapTypeForDebugInfo(Ty);
   
   // Check for existing entry.
-  std::map<void *, llvm::WeakVH>::iterator it =
+  llvm::DenseMap<void *, llvm::WeakVH>::iterator it =
     TypeCache.find(Ty.getAsOpaquePtr());
   if (it != TypeCache.end()) {
     // Verify that the debug info still exists.

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=99823&r1=99822&r2=99823&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Mon Mar 29 13:29:57 2010
@@ -53,7 +53,7 @@
   
   /// TypeCache - Cache of previously constructed Types.
   // FIXME: Eliminate this map.  Be careful of iterator invalidation.
-  std::map<void *, llvm::WeakVH> TypeCache;
+  llvm::DenseMap<void *, llvm::WeakVH> TypeCache;
 
   bool BlockLiteralGenericSet;
   llvm::DIType BlockLiteralGeneric;





More information about the cfe-commits mailing list