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: Remove fgMoveHotJumps #112016

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amanasifkhalid
Copy link
Member

Part of #107749. Based on the plans outlined in #111989 (comment), we should rely on 3-opt to improve upon the baseline RPO layout; fgMoveHotJumps is a meek approximation of the former. Removing fgMoveHotJumps churns the initial layout into 3-opt, which seems to redirect it to a different local optimum with some frequency. The cases where the new local optimum is worse aren't a justification for fgMoveHotJumps's existence, but motivation for improving 3-opt's ability to find globally-optimal layouts.

@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 30, 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

amanasifkhalid commented Jan 31, 2025

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. Diffs are particularly large on x86/x64, where we have variable-length jumps. A common theme I'm seeing in the diffs is where we have some straight-line code that can be entered via more than one predecessor, but the layout improvement for preferring one predecessor over the other is insignificant, so 3-opt now moves a large chunk of code up/down the method, potentially changing the sizes of the jumps inside the range. Such examples usually have large size diffs, but little/no PerfScore diff.

TP diffs are a wash; in spending less time on the initial layout, 3-opt has to do more work in some cases. I think I can get the cost of a 3-opt run down a bit in the next few PRs, so hopefully I'll make up for this... Thanks!

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.

1 participant