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: Use likelihoods in block reordering decision #101132

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

amanasifkhalid
Copy link
Member

Follow-up to #99736. This should be a no-diff change.

@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 Apr 16, 2024
Copy link
Contributor

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

// the branch
if (takenCount < (0.51 * totalCount))
// If we take the true branch more than half the time, we will reverse the branch.
if (edgeToDest->getLikelihood() < 0.51)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename these edge vars? Something like trueEdge / falseEdge? There are some mentions up in the comment and vestiges of the old min/max there too.

Also down below this a bit, subtracting 1 is not semantically meaningful. However perhaps we should leave this for now as this logic will ultimately not be needed when we do the new block layout.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing.

@amanasifkhalid amanasifkhalid merged commit 7f2e028 into dotnet:main Apr 17, 2024
106 of 110 checks passed
@amanasifkhalid amanasifkhalid deleted the use-likelihoods branch April 17, 2024 18:31
@amanasifkhalid
Copy link
Member Author

Forgot to mention this, but no diffs.

matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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