Refactor tailcall decisions out of fgMorphCall#26158
Conversation
Introduce fgMorphPotentialTailCall to simplify the control flow of tailcall morph.
Missed change during the refactoring
|
This is 0 diffs on {x86 windows, x64 windows, x64 linux} x {crossgen, pmi}. |
CarolEidt
left a comment
There was a problem hiding this comment.
This is a nice refactoring!
My comments are mostly requests for additional comments, if possible.
| // call. | ||
|
|
||
| // Verify that none of vars has lvHasLdAddrOp or lvAddrExposed bit set. Note | ||
| // that lvHasLdAddrOp is much more conservative. We cannot just base it on |
There was a problem hiding this comment.
Unrelated, but I was thinking about lvHasLdAddrOp, and wondering if we could avoid adding that in the cases where the ADDR(LCL) is in a block op, by peeking forward in the IL stream. I think that the importer already does that in some cases (e.g. see the CEE_BOX case in impImportBlockCode)
There was a problem hiding this comment.
There is also impILConsumesAddr which does essentially this for some other cases. I am not sure how easy it would be to expand however.
|
@dotnet/jit-contrib |
CarolEidt
left a comment
There was a problem hiding this comment.
LGTM - thanks for the additional comments and clarifications.
| } | ||
|
|
||
| #ifdef _TARGET_AMD64_ | ||
| // Needed for Jit64 compat. |
There was a problem hiding this comment.
Jit64 compat shouldn't be necessary anymore for CoreCLR.
There was a problem hiding this comment.
I can look at removing this but right now this is just keeping 0 diffs, so I would prefer to do that in a separate PR.
|
The jitstress failures also appear to be in previous runs so this should be good to go. |
* Refactor tailcall decisions out of fgMorphCall Introduce fgMorphPotentialTailCall to simplify the control flow of tailcall morph. * Fix formatting * Some minor fixes including build break fix * Set tailcalls to void return type again Missed change during the refactoring * Fix formatting again * Fix formatting again again * Add some helpful comments * Return new node for finished morph instead Commit migrated from dotnet/coreclr@23d2d3d
Introduce fgMorphPotentialTailCall to simplify the control flow of
tailcall morph.