aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-03 03:53:50 +0000
committerChris Lattner <sabre@nondot.org>2011-01-03 03:53:50 +0000
commit71230acbbe734678b9ced643fa024166413b8824 (patch)
tree22d310db4411a8235e7100801b7919d7dcdc101f
parentef87fc2e0a19c3da55c596244e71e2ad03ae4b43 (diff)
downloadexternal_llvm-71230acbbe734678b9ced643fa024166413b8824.zip
external_llvm-71230acbbe734678b9ced643fa024166413b8824.tar.gz
external_llvm-71230acbbe734678b9ced643fa024166413b8824.tar.bz2
switch the load table to use a recycling bump pointer allocator,
speeding earlycse up by 6%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122733 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/EarlyCSE.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/EarlyCSE.cpp b/lib/Transforms/Scalar/EarlyCSE.cpp
index 06c1b91..4ff150a 100644
--- a/lib/Transforms/Scalar/EarlyCSE.cpp
+++ b/lib/Transforms/Scalar/EarlyCSE.cpp
@@ -221,7 +221,10 @@ public:
/// 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