Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Keep precise argument sizes between import and morph. #43130
Keep precise argument sizes between import and morph. #43130
Changes from all commits
8c7ecdb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See note above; I don't believe you can set these to zero like this and pass jit stress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new condition allows us to always the argument as a temp with the correct type, we need it because for a correct direct substitution we need to know if the parent is a call or not but we don't have this information.
We create the node when we see an IL opcode like
ldlocal
and don't have parent information, later, when the node is used, we can't distinguish it from a regularLCL_VAR
.The change causes a small regression on all platforms:
, etc. all lower than 0.04%.
What happens there is:
LCL_VAR tempForOurArg
, save a pointer to it;fgInsertInlineeBlocks
we iterate over all such pointers and do in-place replacement if there was only one use of the lclVar, but we don't know the user, so we can't say if it is a call that need aPUTARG
or not.I have not found a simple way to avoid it or compensate for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have a comment in the code here explaining why
argHasPutArg
disqualifies this arg from direct substitution.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why you added this here - that is, I can see why we wouldn't expect to encounter these under a
COMMA
, but I'm not sure why this special assert is needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have several similar functions like
gtEffectiveVal
,gtRetExprVal
andgtSkipPutArgType
. When we call each of them we often don't expect nodes that can be skipped by two others to be on top.For example, when we call
gtEffectiveVal
we don't expect something likeGT_RET_EXPR(GT_COMMA)
orGT_PUTARG_TYPE(GT_COMMA)
, similar forgtRetExprVal
it should not seeGT_PUTARG_TYPE(GT_PUTARG_TYPE)
.If we do it means the caller did not check for these nodes and we don't skip what we hoped to skip, it doesn't cause correctness issues in my understanding but introduces asm regressions when we can't parse something like we did before the change.