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

Do not set GLOB_REF for invariant indirections #65709

Merged

Conversation

SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Feb 22, 2022

The GTF_GLOB_REF flag in the compiler has the meaning that the node marked with it produces a value that could be modified by a call or an indirect store. It is used for optimizations that need to know whether it is safe to reorder two trees.

Invariant indirections, by definition, always produce the same value, and as such do not need to be marked with GLOB_REF.

Some nice diffs from args sorting: string literals can now be put in the "late args" list directly (without a temp).

@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 Feb 22, 2022
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Feb 22, 2022
The GTF_GLOB_REF flag in the compiler has the meaning that
the node marked with it produces a value that could be modified
by a call or an indirect store. It is used for optimizations
that need to know whether it is safe to reorder two trees.

Invariant indirections, by definition, always produce the
same value, and as such do not need to be marked with GLOB_REF.

Some nice diffs from args sorting: string literals can now
be put in the "late args" list directly (without a temp).
@ghost
Copy link

ghost commented Feb 22, 2022

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

Issue Details

The GTF_GLOB_REF flag in the compiler has the meaning that the node marked with it produces a value that could be modified by a call or an indirect store. It is used for optimizations that need to know whether it is safe to reorder two trees.

Invariant indirections, by definition, always produce the same value, and as such do not need to be marked with GLOB_REF.

Some nice diffs from args sorting: string literals can now be put in the "late args" list directly (without a temp).

Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr, community-contribution

Milestone: -

@SingleAccretion SingleAccretion force-pushed the No-Glob-Ref-For-Invariant-Indirs branch from ba49991 to 564c640 Compare February 22, 2022 13:17
@SingleAccretion SingleAccretion marked this pull request as ready for review February 22, 2022 15:29
@SingleAccretion
Copy link
Contributor Author

@dotnet/jit-contrib

Another preparatory change for LCL_VAR struct args on x86.

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, thanks!

@jakobbotsch jakobbotsch merged commit 4ff711f into dotnet:main Feb 22, 2022
@EgorBo
Copy link
Member

EgorBo commented Feb 22, 2022

That was fast 😄

@SingleAccretion SingleAccretion deleted the No-Glob-Ref-For-Invariant-Indirs branch February 22, 2022 16:07
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 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 community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants