Skip to content
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

RyuJIT: Allow promotions of structs with fields of struct containing a single primitive field. #7441

Closed
sivarv opened this issue Feb 14, 2017 · 4 comments
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI enhancement Product code improvement that does NOT require public API changes/additions optimization tenet-performance Performance related issue
Milestone

Comments

@sivarv
Copy link
Member

sivarv commented Feb 14, 2017

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

@sivarv sivarv self-assigned this Feb 14, 2017
@AndreyAkinshin
Copy link
Member

@JosephTremoulet
Copy link
Contributor

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
Copy link
Member

@JosephTremoulet,

so we'd probably want to pick this up as part of a bigger push to remove artificial limitations in our struct promotion

LGTM.

@JosephTremoulet JosephTremoulet removed their assignment Sep 14, 2017
@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@jakobbotsch
Copy link
Member

I believe we are able to do this today, they don't need to be pointer sized anymore.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI enhancement Product code improvement that does NOT require public API changes/additions optimization tenet-performance Performance related issue
Projects
None yet
Development

No branches or pull requests

5 participants