[llvm-commits] [llvm] r52787 - /llvm/trunk/include/llvm/Support/Mangler.h

Owen Anderson resistor at mac.com
Thu Jun 26 10:20:16 PDT 2008


Author: resistor
Date: Thu Jun 26 12:20:16 2008
New Revision: 52787

URL: http://llvm.org/viewvc/llvm-project?rev=52787&view=rev
Log:
Use a DenseMap instead of an std::map for mangled name lookup.  This is 
improves AsmPrinter runtime on instcombine from 0.3920s to 0.3836s.

Modified:
    llvm/trunk/include/llvm/Support/Mangler.h

Modified: llvm/trunk/include/llvm/Support/Mangler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Mangler.h?rev=52787&r1=52786&r2=52787&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/Mangler.h (original)
+++ llvm/trunk/include/llvm/Support/Mangler.h Thu Jun 26 12:20:16 2008
@@ -14,6 +14,7 @@
 #ifndef LLVM_SUPPORT_MANGLER_H
 #define LLVM_SUPPORT_MANGLER_H
 
+#include "llvm/ADT/DenseMap.h"
 #include <map>
 #include <set>
 #include <string>
@@ -40,7 +41,7 @@
   
   /// Memo - This is used to remember the name that we assign a value.
   ///
-  std::map<const Value*, std::string> Memo;
+  DenseMap<const Value*, std::string> Memo;
 
   /// Count - This simple counter is used to unique value names.
   ///





More information about the llvm-commits mailing list