You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RyuJIT: Allow promotions of structs with fields of struct containing a single primitive field. #7441
Right now the existing implementation allows only structs with pointer sized fields. This would mean int/uint/ref/byref on 32-bit and long/ulong/ref/byref on 64-bit. We should be able to permit promotion of a following struct on 64-bit, for example
struct Foo { struct Bar { int a }, int b}
Similarly the following struct both on 32-bit and 64-bit targets
struct Foo { struct Bar { short a }, short b, int c }
category:cq
theme:structs
skill-level:expert
cost:medium
n.b. I think this was filed because it would be a smallish step implementation-wise, not to target a particular code sequence, so we'd probably want to pick this up as part of a bigger push to remove artificial limitations in our struct promotion (which we generally want to do because using structs to avoid heap allocation shouldn't cause code quality degradation), not for its own sake.
Activity
AndreyAkinshin commentedon Feb 15, 2017
@sivarv, probably related to https://github.com/dotnet/coreclr/issues/6839
JosephTremoulet commentedon Aug 18, 2017
n.b. I think this was filed because it would be a smallish step implementation-wise, not to target a particular code sequence, so we'd probably want to pick this up as part of a bigger push to remove artificial limitations in our struct promotion (which we generally want to do because using structs to avoid heap allocation shouldn't cause code quality degradation), not for its own sake.
AndreyAkinshin commentedon Aug 18, 2017
@JosephTremoulet,
LGTM.
jakobbotsch commentedon Dec 15, 2022
I believe we are able to do this today, they don't need to be pointer sized anymore.