Skip to content

Inherit block weight in compare chain formation - #137029

Merged
AndyAyersMS merged 1 commit into
dotnet:mainfrom
NinoFloris:jit/compare-chain-block-weight
Nov 7, 2026
Merged

AndyAyersMS merged 1 commit into
dotnet:mainfrom
NinoFloris:jit/compare-chain-block-weight

Conversation

@NinoFloris

@NinoFloris NinoFloris commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Forming a chain moves the first block's condition into the second and compacts the two, and compaction gives the combined block the second block's weight. The second block's only predecessor is the first and the edge between them becomes unconditional, so the combined block runs as often as the first block and inherits its weight.

This showed up as some false positive perf score regressions in #136994 because a fold keeps the first block's weight while the chain logic on main only kept the second.

@AndyAyersMS

Forming a chain moves the first block's condition into the second and compacts the two, and compaction gives the combined block the second block's weight. The second block's only predecessor is the first and the edge between them becomes unconditional, so the combined block runs as often as the first block and inherits its weight.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Nov 5, 2026
@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 Nov 5, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 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.

@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.

@NinoFloris
NinoFloris marked this pull request as ready for review November 5, 2026 15:59
@AndyAyersMS
AndyAyersMS merged commit 2141b4e into dotnet:main Nov 7, 2026
141 checks passed
@AndyAyersMS

Copy link
Copy Markdown
Member

Thanks for fixing this.

@NinoFloris

Copy link
Copy Markdown
Contributor Author

Thank you for the quick review!

@NinoFloris
NinoFloris deleted the jit/compare-chain-block-weight branch November 7, 2026 00:19
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 7, 2026
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 community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants