-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Guarded Devirt: multiple type checks #59604
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
Changes from all commits
c1c9626
f58f930
ad6daec
7d7bbac
c629fa1
c2cbe9d
7495913
781c2e7
07e20cc
bcf7b4f
81c94af
c048c64
6a3bdff
37ca01f
756dfdb
a76b01b
80c3399
b9a1a05
db50163
8e70304
158b7d4
e6c989a
616c97f
720be25
710c149
3805cb3
5f68a56
1043290
910c5c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4710,6 +4710,7 @@ struct GenTreeCall final : public GenTree | |
| void ClearGuardedDevirtualizationCandidate() | ||
| { | ||
| gtCallMoreFlags &= ~GTF_CALL_M_GUARDED_DEVIRT; | ||
| SetGDVCandidatesCount(0); | ||
| } | ||
|
|
||
| void SetGuardedDevirtualizationCandidate() | ||
|
|
@@ -4765,14 +4766,25 @@ struct GenTreeCall final : public GenTree | |
| // only used for CALLI unmanaged calls (CT_INDIRECT) | ||
| GenTree* gtCallCookie; | ||
| // gtInlineCandidateInfo is only used when inlining methods | ||
| InlineCandidateInfo* gtInlineCandidateInfo; | ||
| GuardedDevirtualizationCandidateInfo* gtGuardedDevirtualizationCandidateInfo; | ||
| ClassProfileCandidateInfo* gtClassProfileCandidateInfo; | ||
| void* gtStubCallStubAddr; // GTF_CALL_VIRT_STUB - these are never inlined | ||
| InlineCandidateInfo* gtInlineCandidateInfo; | ||
| ClassProfileCandidateInfo* gtClassProfileCandidateInfo; | ||
| void* gtStubCallStubAddr; // GTF_CALL_VIRT_STUB - these are never inlined | ||
| CORINFO_GENERIC_HANDLE compileTimeHelperArgumentHandle; // Used to track type handle argument of dynamic helpers | ||
| void* gtDirectCallAddress; // Used to pass direct call address between lower and codegen | ||
| }; | ||
|
|
||
| void ClearInlineInfo() | ||
| { | ||
| SetGDVCandidatesCount(0); | ||
| gtInlineCandidateInfo = nullptr; | ||
| } | ||
|
|
||
| InlineCandidateInfo* SetSingleInlineCandidate(Compiler* comp, const InlineCandidateInfo* info); | ||
|
|
||
| InlineCandidateInfo* AddGDVInlineCandidate(Compiler* comp, const InlineCandidateInfo* info); | ||
|
|
||
| InlineCandidateInfo* GetInlineCandidateInfo(UINT8 index = 0) const; | ||
|
|
||
| // expression evaluated after args are placed which determines the control target | ||
| GenTree* gtControlExpr; | ||
|
|
||
|
|
@@ -4795,6 +4807,18 @@ struct GenTreeCall final : public GenTree | |
| IL_OFFSET gtRawILOffset; | ||
| #endif // defined(DEBUG) || defined(INLINE_DATA) | ||
|
|
||
| UINT8 gtGDVCandidatesCount; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this make a call node bigger? If we have room for this, do we have enough room to make the union above a tagged union?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AndyAyersMS Not sure I follow, here is the current win-x64 layout (before my changes) in Release in theory we can fit the count into those spare 3 bits? (means maxvalue is 7) if the size matters that much - not sure about impact on other archs/os |
||
|
|
||
| UINT8 GetGDVCandidatesCount() const | ||
| { | ||
| return gtGDVCandidatesCount; | ||
| } | ||
|
|
||
| void SetGDVCandidatesCount(UINT8 count) | ||
| { | ||
| gtGDVCandidatesCount = count; | ||
| } | ||
|
|
||
| bool IsHelperCall() const | ||
| { | ||
| return gtCallType == CT_HELPER; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.