-
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
JIT: revise how we track if nodes have been morphed #110787
Conversation
Allow remorphing. Require that all nodes be morphed. Ensure that no node is morphed more than a handful of times. Fixes dotnet#6218, dotnet#56962, dotnet#107542
Based on #110658 (comment) There are two main concerns with morph:
With this change we enforce that all nodes must be "morphed" though this is weaker than ensuring that all nodes have done the proper amount of morphing. Also we attempt to count how many times each node goes though the fully general morphing process and assert if this happens too often (we may be missing cases where an "enlightened" re-morph bypasses the upper levels of morphs' general dispatch). There is a possible opportunity for assertion gen/kill for return value canonicalization; I have left that for a follow-up PR. I do not think adding assertion gen/kill for the other post-order assignments will yield any interesting diffs but we might want to insist on it anyways. The unbox transformation introduces new temp assignments in a remote tree, which morph's assertion prop is unable to model. This is fairly stylized and "works" since the box creation must dominate the box use, and there are no other uses of the introduced temps. No diffs, no impact in release. With this change the main burden going forward is on new/modified postorder expansions (and the utility methods involved), generally marking things as morphed where needed, or (rarely) allowing a full remorph. @jakobbotsch PTAL |
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.
Seems like an improvement on the current state of things, but I think it would be ideal in the long term if we could ensure all nodes are morphed exactly once, and go back to an even stricter version of the checking we had before. Clearly that requires some non-trivial refactoring of morph, though, although seems like it is long overdue at this point.
Likely will need some ABI or ISA specific fixes here and there. |
/azp run runtime-coreclr jitstress |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-coreclr jitstress |
Azure Pipelines successfully started running 1 pipeline(s). |
This reverts commit 4822cc0.
Allow remorphing. Require that all nodes be morphed. Ensure that no node is morphed more than a handful of times.
Fixes #6218, #56962, #107542