1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

If an interval is being undone clear its preference as well since the source interval may have been undone as well.

llvm-svn: 43670
This commit is contained in:
Evan Cheng 2007-11-04 08:32:21 +00:00
parent 67cd357fb8
commit 9a5c2f1169

View File

@ -209,7 +209,7 @@ void RALinScan::ComputeRelatedRegClasses() {
/// different register classes or because the coalescer was overly
/// conservative.
unsigned RALinScan::attemptTrivialCoalescing(LiveInterval &cur, unsigned Reg) {
if (cur.preference && cur.preference == Reg || !cur.containsOneValue())
if ((cur.preference && cur.preference == Reg) || !cur.containsOneValue())
return Reg;
VNInfo *vni = cur.getValNumInfo(0);
@ -791,6 +791,11 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur)
vrm_->clearVirt(i->reg);
unhandled_.push(i);
}
// It interval has a preference, it must be defined by a copy. Clear the
// preference now since the source interval allocation may have been undone
// as well.
i->preference = 0;
}
// Rewind the iterators in the active, inactive, and fixed lists back to the