зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1338642 - Backout bug 1315596 (Don't evict bundles which won't help with allocating the target bundle), r=sunfish.
This commit is contained in:
Родитель
9d0be99a0b
Коммит
be3d9f1c9f
|
@ -1389,29 +1389,6 @@ BacktrackingAllocator::computeRequirement(LiveBundle* bundle,
|
|||
return true;
|
||||
}
|
||||
|
||||
// Return whether |conflicting| has any fixed uses of registers which overlap
|
||||
// with |bundle|.
|
||||
bool
|
||||
BacktrackingAllocator::hasFixedUseOverlap(LiveBundle* bundle, const LiveBundleVector& conflicting)
|
||||
{
|
||||
for (size_t i = 0; i < conflicting.length(); i++) {
|
||||
LiveBundle* existing = conflicting[i];
|
||||
for (LiveRange::BundleLinkIterator iter = existing->rangesBegin(); iter; iter++) {
|
||||
LiveRange* range = LiveRange::get(*iter);
|
||||
if (range->hasDefinition()) {
|
||||
LDefinition* def = vregs[range->vreg()].def();
|
||||
if (def->policy() == LDefinition::FIXED && bundle->rangeFor(range->from()))
|
||||
return true;
|
||||
}
|
||||
for (UsePositionIterator iter(range->usesBegin()); iter; iter++) {
|
||||
if (iter->usePolicy() == LUse::FIXED && bundle->rangeFor(iter->pos))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
BacktrackingAllocator::tryAllocateRegister(PhysicalRegister& r, LiveBundle* bundle,
|
||||
bool* success, bool* pfixed, LiveBundleVector& conflicting)
|
||||
|
@ -1479,12 +1456,7 @@ BacktrackingAllocator::tryAllocateRegister(PhysicalRegister& r, LiveBundle* bund
|
|||
}
|
||||
#endif
|
||||
|
||||
if (hasFixedUseOverlap(bundle, aliasedConflicting)) {
|
||||
// Ignore conflicting bundles whose eviction will not allow the
|
||||
// bundle to be allocated.
|
||||
JitSpew(JitSpew_RegAlloc,
|
||||
" Ignoring conflict due to fixed use/def overlap with bundle");
|
||||
} else if (conflicting.empty()) {
|
||||
if (conflicting.empty()) {
|
||||
if (!conflicting.appendAll(aliasedConflicting))
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -715,7 +715,6 @@ class BacktrackingAllocator : protected RegisterAllocator
|
|||
MOZ_MUST_USE bool processBundle(MIRGenerator* mir, LiveBundle* bundle);
|
||||
MOZ_MUST_USE bool computeRequirement(LiveBundle* bundle, Requirement *prequirement,
|
||||
Requirement *phint);
|
||||
bool hasFixedUseOverlap(LiveBundle* bundle, const LiveBundleVector& conflicting);
|
||||
MOZ_MUST_USE bool tryAllocateRegister(PhysicalRegister& r, LiveBundle* bundle, bool* success,
|
||||
bool* pfixed, LiveBundleVector& conflicting);
|
||||
MOZ_MUST_USE bool evictBundle(LiveBundle* bundle);
|
||||
|
|
Загрузка…
Ссылка в новой задаче