Skip to content

Remove unused args from specifier-less JITDUMP calls - #131166

Merged
JulieLeeMSFT merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-fuzzy-happiness
Jul 21, 2026
Merged

Remove unused args from specifier-less JITDUMP calls#131166
JulieLeeMSFT merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-fuzzy-happiness

Conversation

@tannergooding

Copy link
Copy Markdown
Member

Follow-up to #130837.

Several JITDUMP calls 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 are DEBUG-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 -- arrayElemSize
  • importervectorization.cpp -- str
  • inductionvariableopts.cpp -- dspTreeID(...) (redundant; the following DISPTREE already dumps the tree) and lclNum
  • optimizer.cpp -- lclNum
  • rangecheck.cpp -- expr (two sites)

Found by scanning every .cpp under src/coreclr/jit for 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.

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>
Copilot AI review requested due to automatic review settings July 21, 2026 19:22
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 21, 2026
@azure-pipelines

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

/ba-g comment only change.

@JulieLeeMSFT
JulieLeeMSFT merged commit 64813a7 into dotnet:main Jul 21, 2026
128 of 137 checks passed
@tannergooding
tannergooding deleted the tannergooding-fuzzy-happiness branch July 21, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants