mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
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
This commit is contained in:
parent
041ee7e6fa
commit
53eeba586d
@ -25,6 +25,7 @@
|
|||||||
#include "llvm/ADT/SmallSet.h"
|
#include "llvm/ADT/SmallSet.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
|
#include "llvm/Support/RecyclingAllocator.h"
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -65,10 +66,13 @@ namespace {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
const unsigned LookAheadLimit;
|
const unsigned LookAheadLimit;
|
||||||
typedef ScopedHashTableScope<MachineInstr*, unsigned,
|
typedef RecyclingAllocator<BumpPtrAllocator,
|
||||||
MachineInstrExpressionTrait> ScopeType;
|
ScopedHashTableVal<MachineInstr*, unsigned> > AllocatorTy;
|
||||||
|
typedef ScopedHashTable<MachineInstr*, unsigned,
|
||||||
|
MachineInstrExpressionTrait, AllocatorTy> ScopedHTType;
|
||||||
|
typedef ScopedHTType::ScopeTy ScopeType;
|
||||||
DenseMap<MachineBasicBlock*, ScopeType*> ScopeMap;
|
DenseMap<MachineBasicBlock*, ScopeType*> ScopeMap;
|
||||||
ScopedHashTable<MachineInstr*, unsigned, MachineInstrExpressionTrait> VNT;
|
ScopedHTType VNT;
|
||||||
SmallVector<MachineInstr*, 64> Exps;
|
SmallVector<MachineInstr*, 64> Exps;
|
||||||
unsigned CurrVN;
|
unsigned CurrVN;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user