Skip to content

JIT: Avoid unnecessary GTF_GLOB_REFs - #84349

Merged
jakobbotsch merged 3 commits into
dotnet:mainfrom
jakobbotsch:avoid-setting-glob-ref-on-field-refs
Apr 7, 2023
Merged

JIT: Avoid unnecessary GTF_GLOB_REFs#84349
jakobbotsch merged 3 commits into
dotnet:mainfrom
jakobbotsch:avoid-setting-glob-ref-on-field-refs

Conversation

@jakobbotsch

@jakobbotschjakobbotsch commented Apr 5, 2023

Copy link
Copy Markdown
Member
  • Avoid setting GTF_GLOB_REF on GT_FIELD_ADDR nodes
  • Avoid setting GTF_GLOB_REF on GT_FIELD nodes off of implicit byrefs. This is ok now since implicit byref morphing indiscriminately sets GTF_GLOB_REF.
  • Manually clone a "pointer to span" in span intrinsic expansion when it points to a local. Unfortunately this does not fall out from the above since gtClone does not handle FIELD_ADDR, and making it handle this needs some more work.

These changes are necessary to avoid address exposure in the two user benchmarks in #83388:

Fix#74563
Fix#856

* Avoid setting GTF_GLOB_REF on GT_FIELD_ADDR nodes
* Avoid setting GTF_GLOB_REF on GT_FIELD nodes off of implicit byrefs.
This is ok now since implicit byref morphing indiscriminately sets
GTF_GLOB_REF for these.
These changes are necessary to avoid address exposure in the two user
benchmarks in dotnet#83388.
Fixdotnet#74563
@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 5, 2023
@ghostghost assigned jakobbotschApr 5, 2023
@ghost

ghost commented Apr 5, 2023

Copy link
Copy Markdown

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

Issue Details
  • Avoid setting GTF_GLOB_REF on GT_FIELD_ADDR nodes
  • Avoid setting GTF_GLOB_REF on GT_FIELD nodes off of implicit byrefs. This is ok now since implicit byref morphing indiscriminately sets GTF_GLOB_REF.

These changes are necessary to avoid address exposure in the two user benchmarks in #83388:

Both of these cases are fixed with this PR.

Fix #74563

Author:jakobbotsch
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@jakobbotsch

Copy link
Copy Markdown
MemberAuthor

/azp run Fuzzlyn, runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@jakobbotsch
jakobbotsch marked this pull request as ready for review April 6, 2023 22:15
@jakobbotsch

jakobbotsch commented Apr 6, 2023

Copy link
Copy Markdown
MemberAuthor

The hardware intrinsics test failure should be fixed by #84352. The Fuzzlyn failure is preexisting.

Diffs.

cc @dotnet/jit-contrib PTAL @SingleAccretion@EgorBo

@SingleAccretion

SingleAccretion commented Apr 7, 2023

Copy link
Copy Markdown
Contributor

Almost forgot - this also fixes #856.

@jakobbotsch
jakobbotsch merged commit 15c7022 into dotnet:mainApr 7, 2023
@jakobbotsch
jakobbotsch deleted the avoid-setting-glob-ref-on-field-refs branch April 7, 2023 19:05
@ghostghost locked as resolved and limited conversation to collaborators May 8, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclrCLR 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.

JIT: Reconsider setting GTF_GLOB_REF in gtNewFieldRef JIT: GTF_GLOB_REF set unnecessarily on some local field accesses

3 participants

@jakobbotsch@SingleAccretion@EgorBo