Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Remove bbFallsThrough restriction in fgOptimizeEmptyBlock #99634

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/coreclr/jit/fgbasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5924,12 +5924,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 @@ -1621,15 +1621,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