mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 936891 - IonMonkey: Fix safepoint handling to mind the differences between LSRA and Backtracking. r=bhackett
This commit is contained in:
parent
d7da59c249
commit
0ebddaa032
@ -1132,7 +1132,7 @@ BacktrackingAllocator::populateSafepoints()
|
||||
|
||||
for (size_t k = 0; k < reg->numIntervals(); k++) {
|
||||
LiveInterval *interval = reg->getInterval(k);
|
||||
if (!interval->covers(inputOf(ins)))
|
||||
if (!interval->covers(outputOf(ins)))
|
||||
continue;
|
||||
|
||||
LAllocation *a = interval->getAllocation();
|
||||
|
@ -618,6 +618,17 @@ class LiveRangeAllocator : public RegisterAllocator
|
||||
return addMove(moves, from, to);
|
||||
}
|
||||
|
||||
size_t findFirstNonCallSafepoint(CodePosition from) const
|
||||
{
|
||||
size_t i = 0;
|
||||
for (; i < graph.numNonCallSafepoints(); i++) {
|
||||
const LInstruction *ins = graph.getNonCallSafepoint(i);
|
||||
if (from <= (forLSRA ? inputOf(ins) : outputOf(ins)))
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
void addLiveRegistersForInterval(VirtualRegister *reg, LiveInterval *interval)
|
||||
{
|
||||
// Fill in the live register sets for all non-call safepoints.
|
||||
@ -633,7 +644,7 @@ class LiveRangeAllocator : public RegisterAllocator
|
||||
size_t i = findFirstNonCallSafepoint(start);
|
||||
for (; i < graph.numNonCallSafepoints(); i++) {
|
||||
LInstruction *ins = graph.getNonCallSafepoint(i);
|
||||
CodePosition pos = inputOf(ins);
|
||||
CodePosition pos = forLSRA ? inputOf(ins) : outputOf(ins);
|
||||
|
||||
// Safepoints are sorted, so we can shortcut out of this loop
|
||||
// if we go out of range.
|
||||
|
@ -341,17 +341,6 @@ class RegisterAllocator
|
||||
return getMoveGroupAfter(pos.ins());
|
||||
}
|
||||
|
||||
size_t findFirstNonCallSafepoint(CodePosition from) const
|
||||
{
|
||||
size_t i = 0;
|
||||
for (; i < graph.numNonCallSafepoints(); i++) {
|
||||
const LInstruction *ins = graph.getNonCallSafepoint(i);
|
||||
if (from <= inputOf(ins))
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
CodePosition minimalDefEnd(LInstruction *ins) {
|
||||
// Compute the shortest interval that captures vregs defined by ins.
|
||||
// Watch for instructions that are followed by an OSI point and/or Nop.
|
||||
|
Loading…
Reference in New Issue
Block a user