Skip to content

Commit

Permalink
JIT: Compute EH liveness on all blocks instead of RPO blocks (#104321)
Browse files Browse the repository at this point in the history
Since we can have blocks whose control flow we do not model (like throw
helpers) we need to consider all blocks when computing the `exceptVars`
and `finallyVars` sets.

Fix #104315
  • Loading branch information
jakobbotsch authored Jul 3, 2024
1 parent f5c9a5e commit 78cd82e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/coreclr/jit/liveness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1783,9 +1783,8 @@ void Compiler::fgInterBlockLocalVarLiveness()
VARSET_TP exceptVars(VarSetOps::MakeEmpty(this)); // vars live on entry to a handler
VARSET_TP finallyVars(VarSetOps::MakeEmpty(this)); // vars live on exit of a 'finally' block

for (unsigned i = m_dfsTree->GetPostOrderCount(); i != 0; i--)
for (BasicBlock* block : Blocks())
{
BasicBlock* block = m_dfsTree->GetPostOrder(i - 1);
if (block->hasEHBoundaryIn())
{
// Note the set of variables live on entry to exception handler.
Expand Down

0 comments on commit 78cd82e

Please sign in to comment.