Skip to content
Merged
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
10 changes: 9 additions & 1 deletion src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,13 @@ static BasicBlockVisit VisitEHSuccs(Compiler* comp, BasicBlock* block, TFunc fun
template <typename TFunc>
BasicBlockVisit BasicBlock::VisitEHSuccs(Compiler* comp, TFunc func)
{
// These are "pseudo-blocks" and control never actually flows into them
// (codegen directly jumps to its successor after finally calls).
if (KindIs(BBJ_CALLFINALLYRET))
{
return BasicBlockVisit::Continue;
}

return ::VisitEHSuccs</* skipJumpDest */ false, TFunc>(comp, this, func);
}

Expand Down Expand Up @@ -608,7 +615,8 @@ BasicBlockVisit BasicBlock::VisitAllSuccs(Compiler* comp, TFunc func)
return ::VisitEHSuccs</* skipJumpDest */ true, TFunc>(comp, this, func);

case BBJ_CALLFINALLYRET:
// No exceptions can occur in this paired block; skip its normal EH successors.
// These are "pseudo-blocks" and control never actually flows into them
// (codegen directly jumps to its successor after finally calls).
return func(bbTarget);

case BBJ_EHCATCHRET:
Expand Down