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: move optOptimizeBools later in the phase list #75842

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

AndyAyersMS
Copy link
Member

This transformation blocks assertion prop and RBO and does not enable any global optimizations. So defer it until later, after all the optimization phases have run.

This transformation blocks assertion prop and RBO and does not enable any
global optimizations. So defer it until later, after all the optimization
phases have run.
@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 Sep 19, 2022
@ghost ghost assigned AndyAyersMS Sep 19, 2022
@ghost
Copy link

ghost commented Sep 19, 2022

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

Issue Details

This transformation blocks assertion prop and RBO and does not enable any global optimizations. So defer it until later, after all the optimization phases have run.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

This should also address some of the regressions seen in #62689.

@jakobbotsch PTAL
cc @dotnet/jit-contrib

It also causes a few regressions. Last I looked it was from losing assertions; I will double-check if that's still the case.

@AndyAyersMS
Copy link
Member Author

It also causes a few regressions. Last I looked it was from losing assertions; I will double-check if that's still the case.

Some of these come from us now skipping fgComputeEdgeWeights -- going to try adding a call to this to OOB if it makes any changes and see what that does.

@AndyAyersMS
Copy link
Member Author

It also causes a few regressions. Last I looked it was from losing assertions; I will double-check if that's still the case.

Some of these come from us now skipping fgComputeEdgeWeights -- going to try adding a call to this to OOB if it makes any changes and see what that does.

That seems pretty disruptive. Let me look at more diffs from the current PR.

@AndyAyersMS
Copy link
Member Author

Looked through a handful of the worst regressions and there is one common theme.

RBO now fires on one tree in a branch pair that would have been merged by OOB, because one of the branches is redundant higher up. This has a variety of knock-on effects, either not rerunning edge weights (hence changing how block opts runs), modifying the CSE candidates, making CSEs more widely available and hence likely to be seen as call-crossing, etc.

I don't think there is any simple mitigation and I like OOB a lot better running later than earlier, so I think we should just live with these.

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