|
@@ -48,7 +48,7 @@ namespace {
|
|
MachineRegisterInfo *MRI;
|
|
MachineRegisterInfo *MRI;
|
|
public:
|
|
public:
|
|
static char ID; // Pass identification
|
|
static char ID; // Pass identification
|
|
- MachineCSE() : MachineFunctionPass(ID), LookAheadLimit(5), CurrVN(0) {
|
|
|
|
|
|
+ MachineCSE() : MachineFunctionPass(ID), LookAheadLimit(0), CurrVN(0) {
|
|
initializeMachineCSEPass(*PassRegistry::getPassRegistry());
|
|
initializeMachineCSEPass(*PassRegistry::getPassRegistry());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -69,7 +69,7 @@ namespace {
|
|
}
|
|
}
|
|
|
|
|
|
private:
|
|
private:
|
|
- const unsigned LookAheadLimit;
|
|
|
|
|
|
+ unsigned LookAheadLimit;
|
|
typedef RecyclingAllocator<BumpPtrAllocator,
|
|
typedef RecyclingAllocator<BumpPtrAllocator,
|
|
ScopedHashTableVal<MachineInstr*, unsigned> > AllocatorTy;
|
|
ScopedHashTableVal<MachineInstr*, unsigned> > AllocatorTy;
|
|
typedef ScopedHashTable<MachineInstr*, unsigned,
|
|
typedef ScopedHashTable<MachineInstr*, unsigned,
|
|
@@ -716,5 +716,6 @@ bool MachineCSE::runOnMachineFunction(MachineFunction &MF) {
|
|
MRI = &MF.getRegInfo();
|
|
MRI = &MF.getRegInfo();
|
|
AA = &getAnalysis<AliasAnalysis>();
|
|
AA = &getAnalysis<AliasAnalysis>();
|
|
DT = &getAnalysis<MachineDominatorTree>();
|
|
DT = &getAnalysis<MachineDominatorTree>();
|
|
|
|
+ LookAheadLimit = TII->getMachineCSELookAheadLimit();
|
|
return PerformCSE(DT->getRootNode());
|
|
return PerformCSE(DT->getRootNode());
|
|
}
|
|
}
|