Skip to content

Commit

Permalink
JIT: clear loop iter info after rebuilding loops for opt repeat (#95879)
Browse files Browse the repository at this point in the history
This info gets computed when finding loops but is not used by the
general optimizer (it only cares about loop structure, not iteration
details). If we leave it built it can go stale.

Fixes #95843.
  • Loading branch information
AndyAyersMS committed Dec 12, 2023
1 parent 791109e commit d6437e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5898,7 +5898,9 @@ void Compiler::RecomputeLoopInfo()
fgComputeReachability();
optSetBlockWeights();
// Rebuild the loop tree annotations themselves
// But don't leave the iter info lying around.
optFindLoops();
optClearLoopIterInfo();

m_dfsTree = fgComputeDfs();
optFindNewLoops();
Expand Down

0 comments on commit d6437e9

Please sign in to comment.