mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Fix a pasto. Also simplify for Bill's benefit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82505 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2571,17 +2571,19 @@ void SimpleRegisterCoalescing::CalculateSpillWeights() {
|
||||
continue;
|
||||
|
||||
bool HasDef = mopi.isDef();
|
||||
bool HasUse = mopi.isUse();
|
||||
bool HasUse = !HasDef;
|
||||
for (unsigned j = i+1; j != e; ++j) {
|
||||
const MachineOperand &mopj = MI->getOperand(j);
|
||||
if (!mopj.isReg() || mopj.getReg() != Reg)
|
||||
continue;
|
||||
HasDef |= mopj.isDef();
|
||||
HasUse |= mopj.isUse();
|
||||
if (HasDef && HasUse)
|
||||
break;
|
||||
}
|
||||
|
||||
LiveInterval &RegInt = li_->getInterval(Reg);
|
||||
float Weight = li_->getSpillWeight(HasDef, HasUse, loopDepth+1);
|
||||
float Weight = li_->getSpillWeight(HasDef, HasUse, loopDepth);
|
||||
if (HasDef && isExit) {
|
||||
// Looks like this is a loop count variable update.
|
||||
MachineInstrIndex DefIdx =
|
||||
|
Reference in New Issue
Block a user