mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
MachineCSE: Add a target query for the LookAheadLimit heurisitic
This is used to determine whether or not to CSE physical register defs. Differential Revision: http://reviews.llvm.org/D9472 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236923 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,7 +48,7 @@ namespace {
|
||||
MachineRegisterInfo *MRI;
|
||||
public:
|
||||
static char ID; // Pass identification
|
||||
MachineCSE() : MachineFunctionPass(ID), LookAheadLimit(5), CurrVN(0) {
|
||||
MachineCSE() : MachineFunctionPass(ID), LookAheadLimit(0), CurrVN(0) {
|
||||
initializeMachineCSEPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace {
|
||||
}
|
||||
|
||||
private:
|
||||
const unsigned LookAheadLimit;
|
||||
unsigned LookAheadLimit;
|
||||
typedef RecyclingAllocator<BumpPtrAllocator,
|
||||
ScopedHashTableVal<MachineInstr*, unsigned> > AllocatorTy;
|
||||
typedef ScopedHashTable<MachineInstr*, unsigned,
|
||||
@@ -716,5 +716,6 @@ bool MachineCSE::runOnMachineFunction(MachineFunction &MF) {
|
||||
MRI = &MF.getRegInfo();
|
||||
AA = &getAnalysis<AliasAnalysis>();
|
||||
DT = &getAnalysis<MachineDominatorTree>();
|
||||
LookAheadLimit = TII->getMachineCSELookAheadLimit();
|
||||
return PerformCSE(DT->getRootNode());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user