summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-06-21 06:45:54 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-06-21 06:45:54 +0000
commitf593a65497ae66b909d4793643082e8672586213 (patch)
tree37fb0f0002fadb36c08d1227578d983a8ea6cbcc /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent4b49be1cbef6944ec913f5289c1c2efaa42e70ee (diff)
downloadbcm5719-llvm-f593a65497ae66b909d4793643082e8672586213.tar.gz
bcm5719-llvm-f593a65497ae66b909d4793643082e8672586213.zip
Undo spill weight tweak. Need to investigate the performance regressions.
llvm-svn: 52572
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 2a10cad8874..83df4d174a4 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -979,7 +979,6 @@ rewriteInstructionForSpills(const LiveInterval &li, const VNInfo *VNI,
unsigned loopDepth = loopInfo->getLoopDepth(MBB);
bool CanFold = false;
RestartInstruction:
- bool isMem = MI->getDesc().mayLoad() || MI->getDesc().mayStore();
for (unsigned i = 0; i != MI->getNumOperands(); ++i) {
MachineOperand& mop = MI->getOperand(i);
if (!mop.isRegister())
@@ -1047,7 +1046,7 @@ rewriteInstructionForSpills(const LiveInterval &li, const VNInfo *VNI,
}
// Update stack slot spill weight if we are splitting.
- float Weight = getSpillWeight(HasDef, HasUse, isMem, loopDepth);
+ float Weight = getSpillWeight(HasDef, HasUse, loopDepth);
if (!TrySplit)
SSWeight += Weight;
@@ -1240,7 +1239,6 @@ rewriteInstructionsForSpills(const LiveInterval &li, bool TrySplit,
bool MIHasUse = rwi.HasUse;
bool MIHasDef = rwi.HasDef;
MachineInstr *MI = rwi.MI;
- bool isMem = MI->getDesc().mayLoad() || MI->getDesc().mayStore();
// If MI def and/or use the same register multiple times, then there
// are multiple entries.
unsigned NumUses = MIHasUse;
@@ -1388,7 +1386,7 @@ rewriteInstructionsForSpills(const LiveInterval &li, bool TrySplit,
// Update spill weight.
unsigned loopDepth = loopInfo->getLoopDepth(MBB);
- nI.weight += getSpillWeight(HasDef, HasUse, isMem, loopDepth);
+ nI.weight += getSpillWeight(HasDef, HasUse, loopDepth);
}
if (NewVReg && TrySplit && AllCanFold) {
@@ -1630,7 +1628,6 @@ addIntervalsForSpills(const LiveInterval &li,
LiveInterval &nI = getOrCreateInterval(VReg);
bool isReMat = vrm.isReMaterialized(VReg);
MachineInstr *MI = getInstructionFromIndex(index);
- bool isMem = MI->getDesc().mayLoad() || MI->getDesc().mayStore();
bool CanFold = false;
bool FoundUse = false;
Ops.clear();
@@ -1683,7 +1680,7 @@ addIntervalsForSpills(const LiveInterval &li,
// Update spill slot weight.
if (!isReMat)
- SSWeight += getSpillWeight(true, false, isMem, loopDepth);
+ SSWeight += getSpillWeight(true, false, loopDepth);
}
Id = SpillMBBs.find_next(Id);
}
@@ -1703,7 +1700,6 @@ addIntervalsForSpills(const LiveInterval &li,
LiveInterval &nI = getOrCreateInterval(VReg);
bool isReMat = vrm.isReMaterialized(VReg);
MachineInstr *MI = getInstructionFromIndex(index);
- bool isMem = MI->getDesc().mayLoad() || MI->getDesc().mayStore();
bool CanFold = false;
Ops.clear();
if (restores[i].canFold) {
@@ -1757,7 +1753,7 @@ addIntervalsForSpills(const LiveInterval &li,
// Update spill slot weight.
if (!isReMat)
- SSWeight += getSpillWeight(false, true, isMem, loopDepth);
+ SSWeight += getSpillWeight(false, true, loopDepth);
}
Id = RestoreMBBs.find_next(Id);
}
OpenPOWER on IntegriCloud