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: Allow BBJ_COND false target to diverge from bbNext in layout optimization phase #96609

Merged
merged 21 commits into from
Jan 17, 2024

Conversation

amanasifkhalid
Copy link
Member

Next step for #93020. Working backwards through the JIT flowgraph phases, this change allows bbFalseTarget to diverge from bbNext in Compiler::optOptimizeLayout and onwards. This requires some awkward quirking (most of which should be short-lived, while some quirks may stay until we change our block reordering approach), as fgReorderBlocks and fgUpdateFlowGraphPhase are also called in a few earlier phases.

@ghost ghost assigned amanasifkhalid Jan 8, 2024
@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 8, 2024
@ghost
Copy link

ghost commented Jan 8, 2024

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

Issue Details

Next step for #93020. Working backwards through the JIT flowgraph phases, this change allows bbFalseTarget to diverge from bbNext in Compiler::optOptimizeLayout and onwards. This requires some awkward quirking (most of which should be short-lived, while some quirks may stay until we change our block reordering approach), as fgReorderBlocks and fgUpdateFlowGraphPhase are also called in a few earlier phases.

Author: amanasifkhalid
Assignees: amanasifkhalid
Labels:

area-CodeGen-coreclr

Milestone: -

@amanasifkhalid
Copy link
Member Author

/azp run runtime-coreclr jitstress

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@amanasifkhalid
Copy link
Member Author

/azp run runtime-coreclr jitstress

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@amanasifkhalid
Copy link
Member Author

/azp run runtime-coreclr jitstress

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@amanasifkhalid
Copy link
Member Author

/azp run runtime-coreclr jitstress

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

Looks like TP is now a non-issue... glad it worked out that way.

@amanasifkhalid amanasifkhalid merged commit 5598dac into dotnet:main Jan 17, 2024
127 of 129 checks passed
@amanasifkhalid amanasifkhalid deleted the connect-fallthrough branch January 17, 2024 20:02
tmds pushed a commit to tmds/runtime that referenced this pull request Jan 23, 2024
…imization phase (dotnet#96609)

Next step for dotnet#93020. Working backwards through the JIT flowgraph phases, this change allows bbFalseTarget to diverge from bbNext in Compiler::optOptimizeLayout and onwards.
amanasifkhalid added a commit to amanasifkhalid/runtime that referenced this pull request Jan 23, 2024
amanasifkhalid added a commit that referenced this pull request Jan 23, 2024
amanasifkhalid added a commit that referenced this pull request Jan 29, 2024
Part of #93020. This change adds back in most of #97191 and #96609, except for any significant changes to the flowgraph optimization passes to reduce churn. With this change, the false target of a BBJ_COND can diverge from the next block until Compiler::optOptimizeLayout, in which we reestablish implicit fall-through with fgConnectFallThrough to preserve the existing block reordering behavior. Note that the deferral of these fall-through fixups causes diffs in the edge weights, which can alter the behavior of fgReorderBlocks, hence some of the size regressions
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 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.

3 participants