зеркало из 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
|
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)) &&
|
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
|
bool
|
||||||
|
@ -2368,12 +2369,12 @@ BacktrackingAllocator::minimalBundle(LiveBundle* bundle, bool* pfixed)
|
||||||
if (fixed)
|
if (fixed)
|
||||||
return false;
|
return false;
|
||||||
fixed = true;
|
fixed = true;
|
||||||
if (minimalUse(range, insData[iter->pos]))
|
if (minimalUse(range, *iter))
|
||||||
minimal = true;
|
minimal = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LUse::REGISTER:
|
case LUse::REGISTER:
|
||||||
if (minimalUse(range, insData[iter->pos]))
|
if (minimalUse(range, *iter))
|
||||||
minimal = true;
|
minimal = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -707,7 +707,7 @@ class BacktrackingAllocator : protected RegisterAllocator
|
||||||
struct PrintLiveRange;
|
struct PrintLiveRange;
|
||||||
|
|
||||||
bool minimalDef(LiveRange* range, LNode* ins);
|
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);
|
bool minimalBundle(LiveBundle* bundle, bool* pfixed = nullptr);
|
||||||
|
|
||||||
// Heuristic methods.
|
// Heuristic methods.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче