Skip to content

Commit 78cd82e

Browse files
authored
JIT: Compute EH liveness on all blocks instead of RPO blocks (#104321)
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
1 parent f5c9a5e commit 78cd82e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/coreclr/jit/liveness.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,9 +1783,8 @@ void Compiler::fgInterBlockLocalVarLiveness()
17831783
VARSET_TP exceptVars(VarSetOps::MakeEmpty(this)); // vars live on entry to a handler
17841784
VARSET_TP finallyVars(VarSetOps::MakeEmpty(this)); // vars live on exit of a 'finally' block
17851785

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

0 commit comments

Comments
 (0)