JIT: Fix ordering of type initialization and stsfld #80485
JIT: Fix ordering of type initialization and stsfld #80485markples merged 3 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue Detailsnull
|
|
need to check the code size regressions |
|
So far all are spills of a value around a type initializer call ( |
|
The previous comment is incorrect. While the particular static should be fine, the computation and type initializer could be accessing a static from some other type and ordering could matter there. |
|
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
|
@dotnet/jit-contrib This is the fix from long ago that I held off on because I was looking at the small code size regressions. For x64, they were mostly minopts and were due to splitting a tree as is needed because the type initialization needs to go in the middle of it. arm64 numbers follow the same pattern. |
AndyAyersMS
left a comment
There was a problem hiding this comment.
Always hard to this kind of fix without some code size impact.
Insertion of the type initializer before the tree for a
stsfldcould reorder them inappropriately. This includes those computation in the spill check.Fixes #72354.