Skip to content

JIT: skip live-across-call CSEs with big footprint and few uses#130931

Open
AndyAyersMS wants to merge 1 commit into
dotnet:mainfrom
AndyAyersMS:jit-cse-laco-veto
Open

JIT: skip live-across-call CSEs with big footprint and few uses#130931
AndyAyersMS wants to merge 1 commit into
dotnet:mainfrom
AndyAyersMS:jit-cse-laco-veto

Conversation

@AndyAyersMS

Copy link
Copy Markdown
Member

The default CSE heuristic is overly aggressive for live-across-call CSE candidates with high size cost and very cold uses.

This change is the outcome of back-propagating information from various RL-derived and oracular models for CSEs onto our existing heuristic, along with benchmark-derived validations for x64/arm64.

The majority of CSEs blocked (on xArch) are large immediates. Note we generally don't CSE these on xArch (see eg #129941) but some handle kinds are allowed. These are fairly "cheap" to rematerialize. Other cases are some indirs and CSE-able calls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI review requested due to automatic review settings July 16, 2026 22:23
@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 16, 2026

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

The default CSE heuristic is overly aggressive for live-across-call
CSE candidates with high size cost and very cold uses.

This change is the outcome of back-propagating information from various
RL-derived and oracular models for CSEs onto our existing heuristic,
along with benchmark-derived validations for x64/arm64.

The majority of CSEs blocked (on xArch) are large immediates. Note
we generally don't CSE these on xArch (see eg dotnet#129941) but some
handle kinds are allowed. These are fairly "cheap" to rematerialize.
Other cases are some indirs and CSE-able calls.

    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 16, 2026 22:59

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@AndyAyersMS

Copy link
Copy Markdown
Member Author

@EgorBot -intel -amd -arm -linux_arm64 --filter "Perf_Regex_Cache.IsMatch_Multithreading"

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.

2 participants