diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-01-03 04:07:46 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-01-03 04:07:46 +0000 |
commit | 18f164f7c907f6b60a60c5714d64d32a7f7124a0 (patch) | |
tree | 7bf10cb36ddb5bc214d6b235046edd00140d4c4b /llvm/lib/CodeGen/MachineCSE.cpp | |
parent | 00f1b801b1ee8e11129a6ed847a842e095db655a (diff) | |
download | bcm5719-llvm-18f164f7c907f6b60a60c5714d64d32a7f7124a0.tar.gz bcm5719-llvm-18f164f7c907f6b60a60c5714d64d32a7f7124a0.zip |
Use a RecyclingAllocator to allocate values for MachineCSE's ScopedHashTable for
a 28% speedup of MachineCSE time on 403.gcc.
llvm-svn: 122735
Diffstat (limited to 'llvm/lib/CodeGen/MachineCSE.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineCSE.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp index fc3f5943d71..bb1db866585 100644 --- a/llvm/lib/CodeGen/MachineCSE.cpp +++ b/llvm/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<MachineInstr*, unsigned, - MachineInstrExpressionTrait> ScopeType; + typedef RecyclingAllocator<BumpPtrAllocator, + ScopedHashTableVal<MachineInstr*, unsigned> > AllocatorTy; + typedef ScopedHashTable<MachineInstr*, unsigned, + MachineInstrExpressionTrait, AllocatorTy> ScopedHTType; + typedef ScopedHTType::ScopeTy ScopeType; DenseMap<MachineBasicBlock*, ScopeType*> ScopeMap; - ScopedHashTable<MachineInstr*, unsigned, MachineInstrExpressionTrait> VNT; + ScopedHTType VNT; SmallVector<MachineInstr*, 64> Exps; unsigned CurrVN; |