-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Check more patterns for retBuffer. #40340
Conversation
We force return buffers containing GC pointers to be on the stack and before we make a copy we check if the return buffer is already on the stack. Fix the check by adding `LCL_VAR_ADDR`, `ADD(LCL_VAR_ADDR, CNST)` patterns.
PTAL @CarolEidt @BruceForstall @dotnet/jit-contrib |
What PR are you referring to? Regarding how to deal with |
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.
LGTM
This one, typo, sorry for the confusion.
Agree, I think it is safe and easy. Maybe we will lose some methods during SPMI cleaning phase but the result |
It is set during collection for easier test of struct promotion enhancements but it could let to chk/rel diffs if used during replay.
While forcing I wonder if it would be possible to move the "extra" calls to the very end of JITing such that any potential side effects couldn't affect the already-generated code? That is, assuming these calls could even legally be made at that time. |
Yeah, as I said with this approach we could have some new failures during a cleaning stage and we will have fewer methods in the final mch. |
* Check more patterns for retBuffer. We force return buffers containing GC pointers to be on the stack and before we make a copy we check if the return buffer is already on the stack. Fix the check by adding `LCL_VAR_ADDR`, `ADD(LCL_VAR_ADDR, CNST)` patterns. * Clear `EnableExtraSuperPmiQueries` during SPMI replay. It is set during collection for easier test of struct promotion enhancements but it could let to chk/rel diffs if used during replay.
We force return buffers containing GC pointers to be on the stack and before we make a copy we check if the return buffer is already on the stack. Fix the check by adding
LCL_VAR_ADDR
,ADD(LCL_VAR_ADDR, CNST)
patterns.Fixes #39947, however, the issue happens because of the several factors:
EnableExtraSuperPmiQueries
is a debug only variable that is set during collection;makeExtraStructQueries
is called in checked and it could find a SIMD type when SIMD intrinsics are not used, it would callsetUsesSIMDTypes(true) {_usesSIMDTypes = true; }
in compiler;_usesSIMDTypes
struct promotion could make different decisions, for example, promotestruct A {simd16 a; }
;ADDR(LCL_VAR)
asLCL_VAR_ADDR
if the lclVar is promoted;LCL_VAR_ADDR
was not recognized by the function changed in this PR and it led to additional VM questions that were failing during release replay.This PR fixes only the 5th. We could fix the first by:
EnableExtraSuperPmiQueries
until we need it again;EnableExtraSuperPmiQueries
value during collection (hackvoid MethodContext::recGetIntConfigValue(const WCHAR* name, int defaultValue, int result)
);-jitoption force EnableExtraSuperPmiQueries=0 -jit2option force EnableExtraSuperPmiQueries=0
during SPMI replay;makeExtraStructQueries
.The rest SPMI chk/rel diffs are covered by #39908