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: Remove GTF_IND_INVARIANT and GTF_IND_NONFAULTING flags checking #104976

Merged
merged 5 commits into from
Jul 18, 2024

Conversation

jakobbotsch
Copy link
Member

These flags are strictly optimizations. Having them required to be set for certain indirs based on context of the operand introduces IR invariants that are annoying to work with since it suddenly becomes necessary for all transformations to consider "did we just introduce this IR shape?". Instead, handle these patterns during morph as the optimization it is and remove the strict flags checking from fgDebugCheckFlags.

Also fix HandleKindDataIsInvariant which returned true in some questionable cases, and remove some questionable indir flags that morph was setting for GTF_ICON_OBJ_HDL.

These flags are strictly optimizations. Having them required to be set
for certain indirs based on context of the operand introduces IR
invariants that are annoying to work with since it suddenly becomes
necessary for all transformations to consider "did we just introduce
this IR shape?". Instead, handle these patterns during morph as the
optimization it is and remove the strict flags checking from
`fgDebugCheckFlags`.
@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 Jul 16, 2024
Copy link
Contributor

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

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib

No diffs.

Any objections?

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

I personally fully support per discussion in discord

@hez2010
Copy link
Contributor

hez2010 commented Jul 17, 2024

Can this be merged? I'm hitting the issue in another PR and would like to get it unblocked.

@jakobbotsch
Copy link
Member Author

jakobbotsch commented Jul 17, 2024

@hez2010 I want to give the rest of the JIT team a chance to comment on this before merging it. For now you can simply merge this PR into your own to unblock it.

@jakobbotsch jakobbotsch merged commit 49a2a55 into dotnet:main Jul 18, 2024
107 checks passed
@jakobbotsch jakobbotsch deleted the indir-flags branch July 18, 2024 09:43
@github-actions github-actions bot locked and limited conversation to collaborators Aug 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.

4 participants