Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Add helpers for increasing/decreasing block weights #111135

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

amanasifkhalid
Copy link
Member

In light of the profile consistency work part of #107749, this seems like a useful abstraction.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 6, 2025
Copy link
Contributor

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

@amanasifkhalid
Copy link
Member Author

I was expecting this to be a no-diff change, though there is one diff on linux-arm in libraries_tests.run. The diff is from the 4-opt component of block layout choosing a different cut point:

Initial layout cost: 421.913383
Running greedy 3-opt pass.
Swapping partitions [BB179, BB161] and [BB162, BB298] (cost change = -32.000000)
- Swapping partitions [BB162, BB296] and [BB180, BB160] (cost change = -2.000000)
+ Swapping partitions [BB162, BB191] and [BB186, BB160] (cost change = -2.000000)
Final layout cost: 387.913383

The comparison of two seemingly-equal layout costs flips with this change; I'm guessing there's some subtle floating-point imprecision at play. Since the JIT still converged to the same layout cost, I think this is fine.

@amanasifkhalid
Copy link
Member Author

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. Thanks!

@amanasifkhalid amanasifkhalid merged commit 2d7f45b into dotnet:main Jan 7, 2025
108 checks passed
@amanasifkhalid amanasifkhalid deleted the block-weight-modifiers branch January 7, 2025 13:30
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