Bug 1511538 - Check implicitly used flags when flagging phis for removed uses. r=jandem

--HG--
extra : rebase_source : c2023de0c5b4a44c32c7fd134f07f8194a7e9f26
This commit is contained in:
Nicolas B. Pierron 2019-01-09 21:27:50 -05:00
Родитель eca8e2da04
Коммит 95227645ba
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -95,7 +95,8 @@ static bool DepthFirstSearchUse(MIRGenerator* mir,
}
MPhi* cphi = cdef->toPhi();
if (cphi->getUsageAnalysis() == PhiUsage::Used || cphi->isUseRemoved()) {
if (cphi->getUsageAnalysis() == PhiUsage::Used || cphi->isUseRemoved() ||
cphi->isImplicitlyUsed()) {
// The information got cached on the Phi the last time it
// got visited, or when flagging operands of removed
// instructions.
@ -225,7 +226,8 @@ static bool FlagPhiInputsAsHavingRemovedUses(MIRGenerator* mir,
// If the Phi is either Used or Unused, set the UseRemoved flag
// accordingly.
if (phi->getUsageAnalysis() == PhiUsage::Used || phi->isUseRemoved()) {
if (phi->getUsageAnalysis() == PhiUsage::Used || phi->isUseRemoved() ||
phi->isImplicitlyUsed()) {
def->setUseRemoved();
continue;
} else if (phi->getUsageAnalysis() == PhiUsage::Unused) {