Open huoyaoyuan opened 1 month ago
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
Also: if the method pointer is not stored in a local variable (C# compiler uses local variable), but directly loaded after the arguments, there will be more stack spills.
It may be hard to solve since the original this
register is considered overwritten by JIT.
It's a bit of a hard problem -- we don't know at the point where we create the IR to write the outgoing arguments that we are going to be loading it from the same stack location right before that.
https://github.com/dotnet/runtime/pull/104731#discussion_r1681120332
Good case:
Not good case:
The codegen is fine when all arguments are passed in register. Struct args can make things worse.