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: enable complementary jtrue assertions for cross-block local ap #94741

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

AndyAyersMS
Copy link
Member

Now that we can propagate assertions across block boundaries we can generate assertions for true/false branch conditions and propagate them along the corresponding edges.

Contributes to #93246.

Now that we can propagate assertions across block boundaries we can
generate assertions for true/false branch conditions and propagate
them along the corresponding edges.

Contributes to dotnet#93246.
@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 Nov 15, 2023
@ghost ghost assigned AndyAyersMS Nov 15, 2023
@ghost
Copy link

ghost commented Nov 15, 2023

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

Issue Details

Now that we can propagate assertions across block boundaries we can generate assertions for true/false branch conditions and propagate them along the corresponding edges.

Contributes to #93246.

Author: AndyAyersMS
Assignees: AndyAyersMS
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

@jakobbotsch PTAL
cc @dotnet/jit-contrib

This doesn't have any impact unless cross-block is enabled. When it is I see this sort of impact

It's possible that enabling "if true" copy prop based on if (x == y) and "if false" based on if (x != y) is not a great idea; I may play around with filtering these out of the GT_JTRUE gen se

image

and a small TP hit

image ts.

if (pred->KindIs(BBJ_COND) && (pred->NumSucc() == 2) && (block == pred->GetJumpDest()))
{
JITDUMP("Using `if true` assertions from pred " FMT_BB "\n", pred->bbNum);
assertionsOut = pred->bbAssertionGen;
Copy link
Member

Choose a reason for hiding this comment

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

Consider adding new members to the unions to give these sets more proper names.

Copy link
Member

@jakobbotsch jakobbotsch left a comment

Choose a reason for hiding this comment

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

LGTM, a minor note about naming.

@AndyAyersMS AndyAyersMS merged commit 4c96829 into dotnet:main Nov 15, 2023
129 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2023
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