-
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
Allow more obj(addr(lcl_var) foldings. #42343
Conversation
It is a continuation for #42320 in a preparation for arm64 apple changes. |
@@ -453,7 +451,10 @@ bool ClassLayout::AreCompatible(const ClassLayout* layout1, const ClassLayout* l | |||
return true; | |||
} | |||
|
|||
assert(clsHnd1 != NO_CLASS_HANDLE); |
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.
Why did the asserts move down? Seems strange to allow clsHnd2 == NO_CLASS_HANDLE for the above checks
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 could have a situation when we have GT_BLOCK <40>(GT_ADDR ref (LCL_VAR struct<40>))
. GenTreeBlock
nodes do not have a class handle, they represent a memory chunk. Such chunk is compatible with a struct if they have the same size and the struct does not have GC pointers.
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 - thanks! I'm liking these incremental improvements!
Regresses libraries testing: Issue #42517 Test failure: System.Buffers.Tests.ArrayBufferWriterTests_Char.Advance |
Diffs on libraries:
a different number of improved methods, no regression.
x64 win pmi of System.Net.Http benefits the most:
a typical improvement comes from copy propagation when we can delete an unnecessary block copy: