Skip to content

Commit 26b53dc

Browse files
bcueu not needed here, avoid putting masking to/from dead blocks
1 parent 979016d commit 26b53dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Backend/BackwardPass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,11 +3261,9 @@ BackwardPass::ProcessBlock(BasicBlock * block)
32613261
// block, which we can keep from being cleaned up, and which will always be handled
32623262
// before the loop is looked at (in this phase), since it is placed after the loop.
32633263
AssertOrFailFast(maskingBlock->upwardExposedUses);
3264-
AssertOrFailFast(maskingBlock->byteCodeUpwardExposedUsed);
32653264
AssertOrFailFast(maskingBlock->upwardExposedFields);
32663265
BVSparse<JitArenaAllocator> *symsToMask = JitAnew(alloc, BVSparse<JitArenaAllocator>, alloc);
32673266
symsToMask->Or(maskingBlock->upwardExposedUses);
3268-
symsToMask->Or(maskingBlock->byteCodeUpwardExposedUsed);
32693267
symsToMask->Or(maskingBlock->upwardExposedFields);
32703268
symsToMask->And(syms);
32713269
// If nothing is exposed, we have nothing to mask, and nothing to do here.
@@ -3568,7 +3566,9 @@ BackwardPass::ProcessBlock(BasicBlock * block)
35683566
if (this->tag == Js::DeadStorePhase
35693567
// We don't need the masking blocks in asmjs/wasm mode
35703568
&& !block->GetFirstInstr()->m_func->GetJITFunctionBody()->IsAsmJsMode()
3571-
&& !block->GetFirstInstr()->m_func->GetJITFunctionBody()->IsWasmFunction())
3569+
&& !block->GetFirstInstr()->m_func->GetJITFunctionBody()->IsWasmFunction()
3570+
&& !block->isDead
3571+
&& !block->isDeleted)
35723572
{
35733573
FOREACH_PREDECESSOR_BLOCK(blockPred, block)
35743574
{
@@ -3580,7 +3580,7 @@ BackwardPass::ProcessBlock(BasicBlock * block)
35803580
// Note that we're doing this backwards - looking from the target into the loop. We
35813581
// do this because this way because we're going backwards over the blocks anyway; a
35823582
// block inserted after the branch may be impossible to correctly handle.
3583-
if (blockPred->loop != nullptr)
3583+
if (!blockPred->isDead && !blockPred->isDeleted && blockPred->loop != nullptr)
35843584
{
35853585
Loop* targetLoop = block->loop;
35863586
Loop* startingLoop = blockPred->loop;

0 commit comments

Comments
 (0)