Skip to content

JIT: fix scalability issue in redundant branch optimizer #66259

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

Merged
merged 1 commit into from
Mar 6, 2022

Conversation

AndyAyersMS
Copy link
Member

@AndyAyersMS AndyAyersMS commented Mar 6, 2022

In methods with long skinny dominator trees and lots of redundant branches
the jit can spend too much time trying to optimize the branches.

Place a limit on the number of redundant branches with matching VNs that
the jit will consider for a given branch.

Fixes #66076.

In methods with long skinny dominator trees and lots of redundant branches
the jit can spend too much time trying to optimize the branches.

Place a limit on the number of redundant branches with matching VNs that
the jit will consider for a given branch.

Fixes dotnet#66067.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 6, 2022
@ghost ghost assigned AndyAyersMS Mar 6, 2022
@ghost
Copy link

ghost commented Mar 6, 2022

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

Issue Details

In methods with long skinny dominator trees and lots of redundant branches
the jit can spend too much time trying to optimize the branches.

Place a limit on the number of redundant branches with matching VNs that
the jit will consider for a given branch.

Fixes #66067.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

Local SPMI run sees fairly minimal diffs (15 methods, maybe 4 different "non-test" methods).

@jakobbotsch PTAL
cc @dotnet/jit-contrib

We should consider porting this one to .NET 6.

@am11
Copy link
Member

am11 commented Mar 6, 2022

Fixes #66067.

nit: I think it is #66076 :)

@AndyAyersMS
Copy link
Member Author

Fixes #66067.

nit: I think it is #66076 :)

Yes. Thanks.

@AndyAyersMS
Copy link
Member Author

AndyAyersMS commented Mar 6, 2022

Runtimes for the example from the issue:

version time
net5.0 62 ms
net6.0 3672 ms
main + this PR (via corerun) 155 ms

@AndyAyersMS
Copy link
Member Author

/backport to release/6.0

@AndyAyersMS
Copy link
Member Author

Looks like the backport bot is locked out.

@dotnet dotnet unlocked this conversation May 6, 2022
@AndyAyersMS
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2022

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/2283305828

@ghost ghost locked as resolved and limited conversation to collaborators Jun 5, 2022
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.

Queryable.Where causing performance issue in .NET 6
3 participants