-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Liveness fix for struct enreg. #51851
Conversation
cb3d571
to
ba46901
Compare
/azp run runtime-coreclr gcstress0x3-gcstress0xc |
// Make sure that we use uncontained address nodes only for variables | ||
// that will be marked as mustInit and will be alive throught the whole block even when tracked. | ||
assert(lclVarAddr->isContained() || !varDsc->lvTracked || varTypeIsStruct(varDsc)); | ||
// TODO: support this assert for uses, see https://github.com/dotnet/runtime/issues/51900. |
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.
There are many failures but they all look unrelated, the same gcstress failures happened in https://dev.azure.com/dnceng/public/_build/results?buildId=1095005&view=ms.vss-test-web.build-test-results-tab, the jitstress failure presented in the previous run as well. |
PTAL @BruceForstall @dotnet/jit-contrib , cc @erozenfeld |
|
||
if ((!varDsc->lvTracked || (varDsc->lvType == TYP_STRUCT)) && varDsc->lvOnFrame) |
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.
The new logic doesn't take into account varDsc->lvOnFrame
. Is that intentional?
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.
Good question, if I add an assert like if (mustInitThisVar) assert(varDsc->lvOnFrame);
it won't fail (x64 spmi) but it is a current implicit contract so we probably should not rely on it.
if (hasGCPtr && !isTracked) -> not tracked means not in register -> lvOnFrame == true
else if (hasGCPtr && isStruct) -> do not enregister structs, with https://github.com/dotnet/runtime/pull/51850/checks?check_run_id=2447290001 won't enregister structs with GC pointers -> lvOnFrame == true
if (!isTracked) -> not tracked means not in register -> lvOnFrame == true
I will return the condition, thank you.
Delete some unnecessary
mustInit
. The change is required for a small struct enreg change.spmi changes: