Skip to content

Commit 109c946

Browse files
JIT: Invalidate LSRA's DFS tree if we aren't running new layout phase (#112364)
Fixes #112361.
1 parent b091d4d commit 109c946

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/coreclr/jit/compiler.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5262,6 +5262,13 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl
52625262

52635263
DoPhase(this, PHASE_OPTIMIZE_LAYOUT, lateLayoutPhase);
52645264
}
5265+
else
5266+
{
5267+
// If we didn't run 3-opt, we might still have a profile-aware DFS tree computed during LSRA available.
5268+
// This tree's presence can trigger asserts if pre/postorder numbers are recomputed,
5269+
// so invalidate the tree either way.
5270+
fgInvalidateDfsTree();
5271+
}
52655272

52665273
// Now that the flowgraph is finalized, run post-layout optimizations.
52675274
//

0 commit comments

Comments
 (0)