Remove unused args from specifier-less JITDUMP calls - #131166
Merged
JulieLeeMSFT merged 1 commit intoJul 21, 2026
Merged
Conversation
Follow-up to dotnet#130837. Several JITDUMP calls pass a trailing argument to a format string that has no corresponding specifier, so the argument is silently ignored. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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 removes unused trailing arguments from JITDUMP calls whose format strings have no corresponding conversion specifiers, eliminating dead argument evaluation in DEBUG-only diagnostic paths across the JIT.
Changes:
- Remove unconsumed arguments from several
JITDUMP("...\n", unusedArg)call sites in CoreCLR JIT sources. - Keep diagnostic output text unchanged while avoiding redundant argument computation/passing in DEBUG builds.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/jit/lower.cpp | Drops unused args from a verbose-only “Argument is a local” JITDUMP. |
| src/coreclr/jit/importercalls.cpp | Removes unused arrayElemSize argument from a SET-intrinsic rejection JITDUMP. |
| src/coreclr/jit/importervectorization.cpp | Removes unused trailing str argument from two debug unrolling JITDUMP sites. |
| src/coreclr/jit/inductionvariableopts.cpp | Removes unused dspTreeID(...)/lclNum args from debug dumps where the format string doesn’t consume them. |
| src/coreclr/jit/optimizer.cpp | Removes unused lclNum arg from a dead-store-removal debug JITDUMP. |
| src/coreclr/jit/rangecheck.cpp | Removes unused expr arg from debug-only range worker bracket JITDUMPs. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 0
JulieLeeMSFT
approved these changes
Jul 21, 2026
Member
|
/ba-g comment only change. |
This was referenced Jul 22, 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 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.
Follow-up to #130837.
Several
JITDUMPcalls pass a trailing argument to a format string that has no corresponding%specifier, so the argument is silently ignored. This removes those leftover args. All areDEBUG-only and behavior is unchanged.lower.cpp--JITDUMP("Argument is a local\n", numRegs, stackSeg.Size)(the one called out in JIT: Cleanup and harden lowering #130837)importercalls.cpp--arrayElemSizeimportervectorization.cpp--strinductionvariableopts.cpp--dspTreeID(...)(redundant; the followingDISPTREEalready dumps the tree) andlclNumoptimizer.cpp--lclNumrangecheck.cpp--expr(two sites)Found by scanning every
.cppundersrc/coreclr/jitfor literal format strings with no conversion but a trailing argument; these were the only hits.Note
This PR description and the changes were drafted with GitHub Copilot.