зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1169460 - Fix imprecise computation in BacktrackingAllocator::minimalUse, r=sunfish.
This commit is contained in:
Родитель
d8454f0a42
Коммит
4ccefce630
|
@ -2326,11 +2326,12 @@ BacktrackingAllocator::minimalDef(LiveRange* range, LNode* ins)
|
|||
}
|
||||
|
||||
bool
|
||||
BacktrackingAllocator::minimalUse(LiveRange* range, LNode* ins)
|
||||
BacktrackingAllocator::minimalUse(LiveRange* range, UsePosition* use)
|
||||
{
|
||||
// Whether this is a minimal range capturing a use at ins.
|
||||
// Whether this is a minimal range capturing |use|.
|
||||
LNode* ins = insData[use->pos];
|
||||
return (range->from() == inputOf(ins)) &&
|
||||
(range->to() == outputOf(ins) || range->to() == outputOf(ins).next());
|
||||
(range->to() == (use->use->usedAtStart() ? outputOf(ins) : outputOf(ins).next()));
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -2368,12 +2369,12 @@ BacktrackingAllocator::minimalBundle(LiveBundle* bundle, bool* pfixed)
|
|||
if (fixed)
|
||||
return false;
|
||||
fixed = true;
|
||||
if (minimalUse(range, insData[iter->pos]))
|
||||
if (minimalUse(range, *iter))
|
||||
minimal = true;
|
||||
break;
|
||||
|
||||
case LUse::REGISTER:
|
||||
if (minimalUse(range, insData[iter->pos]))
|
||||
if (minimalUse(range, *iter))
|
||||
minimal = true;
|
||||
break;
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ class BacktrackingAllocator : protected RegisterAllocator
|
|||
struct PrintLiveRange;
|
||||
|
||||
bool minimalDef(LiveRange* range, LNode* ins);
|
||||
bool minimalUse(LiveRange* range, LNode* ins);
|
||||
bool minimalUse(LiveRange* range, UsePosition* use);
|
||||
bool minimalBundle(LiveBundle* bundle, bool* pfixed = nullptr);
|
||||
|
||||
// Heuristic methods.
|
||||
|
|
Загрузка…
Ссылка в новой задаче