From: Cameron Zwarich Date: Mon, 3 Jan 2011 04:07:46 +0000 (+0000) Subject: Use a RecyclingAllocator to allocate values for MachineCSE's ScopedHashTable for X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=53eeba586dac8a25db63fe02a00ef10feb8b3925;p=oota-llvm.git Use a RecyclingAllocator to allocate values for MachineCSE's ScopedHashTable for a 28% speedup of MachineCSE time on 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122735 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp index fc3f5943d71..bb1db866585 100644 --- a/lib/CodeGen/MachineCSE.cpp +++ b/lib/CodeGen/MachineCSE.cpp @@ -25,6 +25,7 @@ #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/RecyclingAllocator.h" using namespace llvm; @@ -65,10 +66,13 @@ namespace { private: const unsigned LookAheadLimit; - typedef ScopedHashTableScope ScopeType; + typedef RecyclingAllocator > AllocatorTy; + typedef ScopedHashTable ScopedHTType; + typedef ScopedHTType::ScopeTy ScopeType; DenseMap ScopeMap; - ScopedHashTable VNT; + ScopedHTType VNT; SmallVector Exps; unsigned CurrVN;