-
Notifications
You must be signed in to change notification settings - Fork 5k
JIT: escape analysis for object fields #115388
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: escape analysis for object fields #115388
Conversation
Add connection graph nodes and retyping for object fields. All GC fields of objects are tracked as one virtual field. Also add support for GT_LCL_FLD and GT_STORE_LCL_FLD for local structs. Contributes to dotnet#104936 and dotnet#108913
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Formatting errors seem like they may be from #115348 ? |
Created #115416 to try fix the issue. |
…tack, so we can properly escape its fields. In particular finalizable objects can never be considered as non-escaping, so any assignment to their fields escapes.
need to possibly retype the on-stack array layout. So we have to track the array allocation locals and their stack counterparts and make the appropriate layout update during rewriting.
Looked at one of the arm32 failures. In this case we have code like: var fullInput = new[]
{
new { utf8Bytes = new byte[] { 0x40 }, output = "@" },
new { utf8Bytes = new byte[] { 0xC3, 0x85 }, output = "[00C5]" },
}; and we can prove the arrays and objects don't escape. However we fail to notice the string assignment because we lack the equivalent of
does not create a connection graph edge Also I think we're being too pessimistic handling the
this second rule since there is no immediate way to evaluate But it seems like we should defer the second rule here, and after building the connection graph we should connect For example
Here we know what |
Going to defer this until after .NET 10. |
Add connection graph nodes and retyping for object fields. All GC fields of objects are tracked as one virtual field.
Also add support for GT_LCL_FLD and GT_STORE_LCL_FLD for local structs.
Contributes to #104936 and #108913