Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Comments

Refactor tailcall decisions out of fgMorphCall#26158

Merged
jashook merged 8 commits intodotnet:masterfrom
jakobbotsch:refactor-tailcall-morph
Sep 4, 2019
Merged

Refactor tailcall decisions out of fgMorphCall#26158
jashook merged 8 commits intodotnet:masterfrom
jakobbotsch:refactor-tailcall-morph

Conversation

@jakobbotsch
Copy link
Member

Introduce fgMorphPotentialTailCall to simplify the control flow of
tailcall morph.

@jashook jashook requested review from CarolEidt and briansull August 14, 2019 20:49
@jakobbotsch
Copy link
Member Author

jakobbotsch commented Aug 15, 2019

This is 0 diffs on {x86 windows, x64 windows, x64 linux} x {crossgen, pmi}.

@jakobbotsch jakobbotsch marked this pull request as ready for review August 15, 2019 17:07
@jakobbotsch jakobbotsch changed the title [WIP] Refactor tailcall decisions out of fgMorphCall Refactor tailcall decisions out of fgMorphCall Aug 15, 2019
Copy link

@CarolEidt CarolEidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also impILConsumesAddr which does essentially this for some other cases. I am not sure how easy it would be to expand however.

@BruceForstall
Copy link

@dotnet/jit-contrib

Copy link

@CarolEidt CarolEidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for the additional comments and clarifications.

}

#ifdef _TARGET_AMD64_
// Needed for Jit64 compat.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jit64 compat shouldn't be necessary anymore for CoreCLR.

Copy link
Member Author

@jakobbotsch jakobbotsch Aug 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

@briansull briansull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good

Copy link

@jashook jashook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jakobbotsch
Copy link
Member Author

The jitstress failures also appear to be in previous runs so this should be good to go.

@jashook jashook merged commit 23d2d3d into dotnet:master Sep 4, 2019
@jakobbotsch jakobbotsch deleted the refactor-tailcall-morph branch September 4, 2019 16:34
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants