Skip to content

Commit

Permalink
JIT: Remove bbFallsThrough restriction in fgOptimizeEmptyBlock (#99634)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanasifkhalid authored Mar 14, 2024
1 parent b4bc0aa commit 76b4cf8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions src/coreclr/jit/fgbasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5933,12 +5933,6 @@ BasicBlock* Compiler::fgRelocateEHRange(unsigned regionIndex, FG_RELOCATE_TYPE r
insertAfterBlk->Next()); // We insert at the end, not at the beginning, of the funclet region.
}

// These asserts assume we aren't moving try regions (which we might need to do). Only
// try regions can have fall through into or out of the region.

noway_assert(!bPrev->bbFallsThrough()); // There can be no fall through into a filter or handler region
noway_assert(!bLast->bbFallsThrough()); // There can be no fall through out of a handler region

#ifdef DEBUG
if (verbose)
{
Expand Down
9 changes: 0 additions & 9 deletions src/coreclr/jit/fgopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1617,15 +1617,6 @@ bool Compiler::fgOptimizeEmptyBlock(BasicBlock* block)
break;
}
}
else
{
// TODO-NoFallThrough: Once BBJ_COND blocks have pointers to their false branches,
// allow removing empty BBJ_ALWAYS and pointing bPrev's false branch to block's target.
if (bPrev->bbFallsThrough() && !block->JumpsToNext())
{
break;
}
}

/* Do not remove a block that jumps to itself - used for while (true){} */
if (block->TargetIs(block))
Expand Down

0 comments on commit 76b4cf8

Please sign in to comment.