[llvm-commits] [llvm] r122733 - /llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp

Chris Lattner sabre at nondot.org
Sun Jan 2 19:53:50 PST 2011


Author: lattner
Date: Sun Jan  2 21:53:50 2011
New Revision: 122733

URL: http://llvm.org/viewvc/llvm-project?rev=122733&view=rev
Log:
switch the load table to use a recycling bump pointer allocator,
speeding earlycse up by 6%.

Modified:
    llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp?rev=122733&r1=122732&r2=122733&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp Sun Jan  2 21:53:50 2011
@@ -221,7 +221,10 @@
   /// the current generation count.  The current generation count is
   /// incremented after every possibly writing memory operation, which ensures
   /// that we only CSE loads with other loads that have no intervening store.
-  typedef ScopedHashTable<Value*, std::pair<Value*, unsigned> > LoadHTType;
+  typedef RecyclingAllocator<BumpPtrAllocator,
+    ScopedHashTableVal<Value*, std::pair<Value*, unsigned> > > LoadMapAllocator;
+  typedef ScopedHashTable<Value*, std::pair<Value*, unsigned>,
+                          DenseMapInfo<Value*>, LoadMapAllocator> LoadHTType;
   LoadHTType *AvailableLoads;
   
   /// AvailableCalls - This scoped hash table contains the current values





More information about the llvm-commits mailing list