Skip to content

JIT: refactor fields of GenTreeCall#63402

Merged
AndyAyersMS merged 2 commits intodotnet:mainfrom
AndyAyersMS:DeunionStubCallStubAddress
Jan 5, 2022
Merged

JIT: refactor fields of GenTreeCall#63402
AndyAyersMS merged 2 commits intodotnet:mainfrom
AndyAyersMS:DeunionStubCallStubAddress

Conversation

@AndyAyersMS
Copy link
Member

Move gtStubCallStubAddr out of the union it shares with class probe,
inline, and guarded devirt information, so that we no longer need to
save and restore the stub address when we want to probe, guardedly
devirtualize, or inline calls.

Delete all the code that did saving and restoring, and the field in the
inline info struct that held the saved copy.

Reorder the fields of the call node so that a bit we're less likely to
have internal padding.

Move `gtStubCallStubAddr` out of the union it shares with class probe,
inline, and guarded devirt information, so that we no longer need to
save and restore the stub address when we want to probe, guardedly
devirtualize, or inline calls.

Delete all the code that did saving and restoring, and the field in the
inline info struct that held the saved copy.

Reorder the fields of the call node so that a bit we're less likely to
have internal padding.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 5, 2022
@ghost ghost assigned AndyAyersMS Jan 5, 2022
@ghost
Copy link

ghost commented Jan 5, 2022

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

Issue Details

Move gtStubCallStubAddr out of the union it shares with class probe,
inline, and guarded devirt information, so that we no longer need to
save and restore the stub address when we want to probe, guardedly
devirtualize, or inline calls.

Delete all the code that did saving and restoring, and the field in the
inline info struct that held the saved copy.

Reorder the fields of the call node so that a bit we're less likely to
have internal padding.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

cc @dotnet/jit-contrib

This is in anticipation of adding yet another kind of info to the mix....

No spmi diffs seen locally.

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.

LGTM, SuppressProbesFunctor really felt a bit weird 🙂

@SingleAccretion
Copy link
Contributor

SingleAccretion commented Jan 5, 2022

This adds 16 more bytes to GenTreeCall on Windows 64 bit: https://www.diffchecker.com/GN2WH582.

Notably it will have to add at least 8 bytes on 64 bit in any case (on 32 bit there's padding we can steal some space from and indeed, this change does not affect the node's size on x86 <- actually that's not true, we'll have to give up a pointer there too), I am assuming we're willing to give those 8/4 bytes up.

Edit: for reference, adding one pointer field to GenTreeCall leads to a 0.13%/0.16% increase in memory consumption when CG-ing the x86/x64 CoreLib with the native compilers (notably, this is an upper estimate as R2R code, I believe, has higher density of calls as compared to Jit code).

@AndyAyersMS
Copy link
Member Author

This adds 16 more bytes to GenTreeCall

Thanks. Reverted that bit.

@AndyAyersMS AndyAyersMS merged commit b28c38d into dotnet:main Jan 5, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 5, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants