JIT: Clean up comments and remove redundancy in flowgraph.cpp#125292
Merged
AndyAyersMS merged 2 commits intodotnet:mainfrom Mar 9, 2026
Merged
JIT: Clean up comments and remove redundancy in flowgraph.cpp#125292AndyAyersMS merged 2 commits intodotnet:mainfrom
AndyAyersMS merged 2 commits intodotnet:mainfrom
Conversation
Member
AndyAyersMS
commented
Mar 7, 2026
- Add missing header comments to fgIsBlockCold, fgGetSharedCCtor, fgCastNeeded, and fgGetCritSectOfStaticMethod
- Standardize informal comments on fgCreateMonitorTree and fgConvertSyncReturnToLeave to use the modern header format
- Convert old-style /*** comments to modern //-------- format for fgIsThrow, fgInDifferentRegions, fgIsCommaThrow, fgAddSyncMethodEnterExit, fgMoreThanOneReturnBlock, and fgInsertFuncletPrologBlock
- Fix incorrect header on fgGetStaticsCCtorHelper (said BasicBlock, returns GenTreeCall) and IsDecreasingLoop (header said IsIncreasingLoop)
- Fix typos: helepr, depents, openrand, querstion, desinator, enclsoing, domnates
- Use block->KindIs(BBJ_SWITCH) instead of Yoda comparison for consistency
- Remove redundant second VisitDefs walk in AnalyzeIteration that duplicates the check already performed in the exit edge loop
- Add missing header comments to fgIsBlockCold, fgGetSharedCCtor, fgCastNeeded, and fgGetCritSectOfStaticMethod - Standardize informal comments on fgCreateMonitorTree and fgConvertSyncReturnToLeave to use the modern header format - Convert old-style /*** comments to modern //-------- format for fgIsThrow, fgInDifferentRegions, fgIsCommaThrow, fgAddSyncMethodEnterExit, fgMoreThanOneReturnBlock, and fgInsertFuncletPrologBlock - Fix incorrect header on fgGetStaticsCCtorHelper (said BasicBlock, returns GenTreeCall) and IsDecreasingLoop (header said IsIncreasingLoop) - Fix typos: helepr, depents, openrand, querstion, desinator, enclsoing, domnates - Use block->KindIs(BBJ_SWITCH) instead of Yoda comparison for consistency - Remove redundant second VisitDefs walk in AnalyzeIteration that duplicates the check already performed in the exit edge loop Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Member
Author
|
Realized before I only did clean up on @jakobbotsch PTAL. In particular look at the change in AnalyzeIteration, copilot claims the removed computation was fully redundant. No diffs. @dotnet/jit-contrib FYI |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves readability and maintainability of the CoreCLR JIT flowgraph implementation by modernizing function header comments, fixing typos, standardizing minor style inconsistencies, and removing redundant analysis work in natural loop iteration analysis.
Changes:
- Convert/standardize a number of function headers and inline comments to the modern comment format and fix several typos.
- Make a small consistency tweak in
fgInsertGCPolls()by usingblock->KindIs(BBJ_SWITCH)instead of a Yoda comparison. - Remove a redundant
VisitDefswalk inFlowGraphNaturalLoop::AnalyzeIteration()that duplicated an equivalent check already performed earlier in the method.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jakobbotsch
approved these changes
Mar 8, 2026
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 free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.