Skip to content

Clean up GenTreeCall's inline info #86540

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

Merged
merged 1 commit into from
May 20, 2023
Merged

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented May 20, 2023

This PR slightly cleans up inline info for calls as a preparation for "multiple GDV candidates" (to reduce noise in future PRs for this):

  1. Replaces field access with getters/setters (easy to debug what's set where)
  2. Removes GuardedDevirtualizationCandidateInfo struct - it used to be a base "class" for InlineCandidateInfo and is smaller in size, so were always allocated as InlineCandidateInfo anyway.
  3. Adds uint8_t gtInlineInfoCount; field to GenTreeCall - I've checked, it doesn't increase the struct size, I inserted the field where we had a 3 bytes padding.

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 20, 2023
@ghost ghost assigned EgorBo May 20, 2023
@ghost
Copy link

ghost commented May 20, 2023

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

Issue Details

This PR slightly cleans up inline info for calls as a preparation for "multiple GDV candidates":

  1. Replaces field access with getters/setters (easy to debug what's set where)
  2. Remove GuardedDevirtualizationCandidateInfo struct - it used to be a base "class" for InlineCandidateInfo and is smaller in size, so were always allocated as InlineCandidateInfo anyway.
  3. uint8_t gtInlineInfoCount; field to GenTreeCall - I've checked, it doesn't increase the struct size, I inserted the field where we had a 3 bytes padding.
Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@EgorBo
Copy link
Member Author

EgorBo commented May 20, 2023

@AndyAyersMS PTAL, no-diffs change.

Next step will be NativeAOT case where we can use the 2nd GDV candidate as a fallback (if we know that we only have 2 classes)

@EgorBo EgorBo requested a review from AndyAyersMS May 20, 2023 16:09
@EgorBo EgorBo merged commit d7aa91c into dotnet:main May 20, 2023
@EgorBo EgorBo deleted the inlineinfo-cleanup branch May 20, 2023 19:49
@ghost ghost locked as resolved and limited conversation to collaborators Jun 20, 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