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: Don't run fgComputeBlockWeights in MinOpts #110451

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

amanasifkhalid
Copy link
Member

Block weights don't seem particularly useful in MinOpts. Skipping fgComputeBlockWeights when we aren't optimizing had few diffs locally, so this looks like an opportunity to save some TP.

(As an aside, I suspect we can soon replace fgComputeBlockWeights and optSetBlockWeights with profile synthesis. After the existing flow opt and unreachable block removal passes, I think we ought to compute the loop data structures, run profile synthesis, and then run loop opts. Since earlier phases don't seem too dependent on profile fidelity, but loop inversion/cloning/etc. stand to benefit from it, this is a natural checkpoint for running synthesis.)

@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 Dec 5, 2024
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

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. Small MinOpts diffs from what looks like different block placement: This seems to stem from some blocks (not) being marked as rarely-run now, leading fgNewBBinRegion to make different placement decisions. Thanks!

@amanasifkhalid amanasifkhalid merged commit e2e4642 into dotnet:main Dec 6, 2024
102 of 108 checks passed
@amanasifkhalid amanasifkhalid deleted the fgComputeBlockWeights branch December 6, 2024 16:55
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