You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand Virtual Call targets earlier in Morph and allow CSE of the indirections (#47808)
* Added GTF_CALL_M_EXPANDED_EARLY to flag virtual calls that should be expanded early during fgMorph
Added COMPlus_JitExpandCallsEarly variable to enable virtual calls to be expanded early on a per method basis
Set opts.compExpandCallsEarly to true when we are optimizing and have COMPlus_JitExpandCallsEarly enabled
Update gtSetEvalOrder to also include the call->gtControlExpr
Update morph to call fgExpandVirtualVtableCallTarget when we are expanding early
Update lower to not call LowerVirtualVtableCall when we have already expanded it early
Modify CheckTreeId to print the duplicated gtTreeID before it asserts.
All tests are passing when using COMPLUS_JitExpandCallsEarly=*
Expand the Virtual Call target after we morph the args
Fix an inadvertent change in the GT_CALL weights
* Changed the default for Virtual calls to be expanded early in Morph
Use COMPlus_JitExpandCallsEarly=0 to disable and use old behavior
* Code Review feedback
Added comment stating the the isRelative code path is never executed
* Fixes for propagating gtControlExpr->gtFlags
* Fix a few code size regressions when we perform a tail call
* Tailcall lower fix
* Code Review changes
* Fixes for the TAILCALL_HELPER path for x86
* Address the Arm/Linux failure
Copy file name to clipboardExpand all lines: src/coreclr/jit/gentree.h
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4224,6 +4224,7 @@ struct GenTreeCall final : public GenTree
4224
4224
#defineGTF_CALL_M_SUPPRESS_GC_TRANSITION0x00800000// GT_CALL -- suppress the GC transition (i.e. during a pinvoke) but a separate GC safe point is required.
4225
4225
#defineGTF_CALL_M_EXP_RUNTIME_LOOKUP0x01000000// GT_CALL -- this call needs to be tranformed into CFG for the dynamic dictionary expansion feature.
4226
4226
#defineGTF_CALL_M_STRESS_TAILCALL0x02000000// GT_CALL -- the call is NOT "tail" prefixed but GTF_CALL_M_EXPLICIT_TAILCALL was added because of tail call stress mode
4227
+
#defineGTF_CALL_M_EXPANDED_EARLY0x04000000// GT_CALL -- the Virtual Call target address is expanded and placed in gtControlExpr in Morph rather than in Lower
4227
4228
4228
4229
// clang-format on
4229
4230
@@ -4530,6 +4531,21 @@ struct GenTreeCall final : public GenTree
0 commit comments