Conversation
AndyAyersMS
commented
Mar 3, 2026
- ensure all method have header comments
- remove /* */ comments unless in expression context
Convert old-style block comments to line comments across JIT flowgraph source files. Comments within function argument lists, template argument lists, and parameter default annotations are intentionally preserved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add //-------- banners and standardized header comments to methods that were missing them, following the JIT coding conventions format (method name, description, arguments, return value). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add missing Arguments and Return Value sections to method headers that had banners but were incomplete. Also fix typos in section labels (Arguments; -> Arguments:, Returns Value: -> Returns:) and a mismatched method name in a comment (FindCyclicProbabilities -> ComputeCyclicProbabilities). Add proper banner header to the standalone OperIsControlFlow function. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@dotnet/jit-contrib PTAL I can see this sort of thing will quickly become tedious to review; on the other hand I would also like to see us fix up these sorts of things. Thoughts...? |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Pull request overview
This PR continues JIT flowgraph cleanup by standardizing function header comments and converting non-expression /* ... */ comments to // across several flowgraph-related source files.
Changes:
- Added/expanded header comment blocks (Arguments/Returns/Notes) for a number of flowgraph-related helpers and phases.
- Replaced many standalone
/* ... */comments with//comments to match the stated style direction.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/jit/fgwasm.cpp | Adds missing “Return Value” section for a phase method comment block. |
| src/coreclr/jit/fgstmt.cpp | Replaces block comments with structured headers and // comments for statement helpers. |
| src/coreclr/jit/fgprofilesynthesis.cpp | Normalizes comment formatting (e.g., // static, Arguments: punctuation) and updates a header label. |
| src/coreclr/jit/fgprofile.cpp | Adds missing Arguments/Returns sections to various profile-related methods. |
| src/coreclr/jit/fgopt.cpp | Converts many /* ... */ comments to // and normalizes header wording. |
| src/coreclr/jit/fginline.cpp | Adds missing Arguments sections and converts block comments to structured headers. |
| src/coreclr/jit/fgehopt.cpp | Adds a “Return Value” section to a constructor header comment. |
| src/coreclr/jit/fgdiagnostic.cpp | Adds structured headers and converts remaining block comments to line comments; minor comment refactors. |
| src/coreclr/jit/fgbasic.cpp | Converts block comments to structured headers and replaces many /* ... */ comments with //. |
| /*****************************************************************************/ | ||
|
|
||
| //------------------------------------------------------------------------ | ||
| // fgCheckForInlineDepthAndRecursion: compute depth of the candidate, and |
There was a problem hiding this comment.
The header comment name doesn't match the actual method name (fgCheckInlineDepthAndRecursion). This makes it harder to search/grep for documentation; update the comment to use the correct function name.
| // fgCheckForInlineDepthAndRecursion: compute depth of the candidate, and | |
| // fgCheckInlineDepthAndRecursion: compute depth of the candidate, and |
| // Return Value: | ||
| // None (constructor). Initializes Traits and Visited members. |
There was a problem hiding this comment.
This is a constructor, so labeling a section as "Return Value" is misleading (constructors don't return values). Consider removing the Return Value section and moving this info to Notes/Remarks, or just omit it.
| // Return Value: | |
| // None (constructor). Initializes Traits and Visited members. | |
| // Notes: | |
| // Initializes Traits and Visited members. |