Uh oh!
There was an error while loading. Please reload this page.
JIT: speed up fgDebugCheckNodesUniqueness and drop dead morphTrees arg - #132569
Merged
Conversation
Visit nodes linearly via the statement's threaded list when fgNodeThreading is AllTrees, instead of walking each tree. Use a single BitVecOps::TryAddElemD in CheckTreeId instead of IsMember followed by AddElemD. Also drop the morphTrees argument of fgDebugCheckLinks/fgDebugCheckStmtsList. Every caller left it at its default of false, making the fgMorphBlockStmt call and the recursive fgDebugCheckStmtsList call dead. Throughput on benchmarks.run for the checked JIT: -4.89% instructions retired, -1.65% wall clock. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 064035bf-fb1f-450e-afd2-08a7700aa736
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes JIT debug-check infrastructure by leveraging existing node threading for linear scans and by removing an unused “morph during check” plumbing parameter that had no active callers. It aims to reduce overhead of debug validation while keeping the same validation coverage.
Changes:
- Updates
fgDebugCheckNodesUniquenessto iterate nodes viaStatement::TreeList()whenfgNodeThreading == NodeThreading::AllTrees. - Simplifies uniqueness tracking by using
BitVecOps::TryAddElemDinstead ofIsMember+AddElemD. - Removes the dead
morphTreesparameter and associated unreachable code fromfgDebugCheckLinks/fgDebugCheckStmtsList.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/coreclr/jit/fgdiagnostic.cpp | Switches uniqueness checking to linear threaded traversal when possible; drops dead morphing debug-check path; simplifies bitset insertion logic. |
| src/coreclr/jit/compiler.h | Updates debug-check method declarations to match the removed morphTrees parameter. |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 064035bf-fb1f-450e-afd2-08a7700aa736
Open
3 tasks
jakobbotsch
commented
Aug 21, 2026
MemberAuthor
cc @dotnet/jit-contrib PTAL @EgorBo |
EgorBo
approved these changes
Aug 21, 2026
jakobbotsch
commented
Aug 21, 2026
MemberAuthor
/ba-g Timeouts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Visit nodes linearly via the statement's threaded list when fgNodeThreading is AllTrees, instead of walking each tree. Use a single BitVecOps::TryAddElemD in CheckTreeId instead of IsMember followed by AddElemD.
Also drop the morphTrees argument of fgDebugCheckLinks/fgDebugCheckStmtsList. Every caller left it at its default of false, making the fgMorphBlockStmt call and the recursive fgDebugCheckStmtsList call dead.
Throughput on benchmarks.run for the checked JIT: -4.89% instructions retired, -1.65% wall clock.