Skip to content

Poor codegen for "big" (> 4 fields) structs init #71565

Closed

Description

@hypeartist

FWm4DESWIAACiUX

category:cq
theme:structs
skill-level:expert
cost:large
impact:large

Activity

  1. ghost added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    on Jul 1, 2022
  2. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jul 1, 2022
  3. jakobbotsch commented on Jul 1, 2022

    @jakobbotsch
    Member

    This is essentially a duplicate of #6534 -- the JIT does not currently do promotion for structs with more than 4 fields. It is an area that I hope we will be improving in .NET 8.

  4. hypeartist commented on Jul 1, 2022

    @hypeartist
    Author

    @jakobbotsch Is there any info about what are all those restrictions (#6494 (comment) especially the one about 4 fields limit) based on?

  5. SingleAccretion commented on Jul 1, 2022

    @SingleAccretion
    Contributor

    The 4 fields limit is just a CQ heuristic. Some of the other restrictions represent unimplemented functionality.

  6. hypeartist commented on Jul 1, 2022

    @hypeartist
    Author

    @jakobbotsch @SingleAccretion On the second thought my guess is that the issue some way related to ABI stuff - particularly the fact that the number of args that could be passed in regs is 4

  7. hypeartist commented on Jul 5, 2022

    @hypeartist
    Author

    Another strangeness.
    Method M1C vs M1A. Both operate with the same 'big' struct A:

    image

    PS: or even like this:

    image

  8. added
    questionAnswer questions and provide assistance, not an issue with source code or documentation.
    on Jul 5, 2022
  9. added this to the 7.0.0 milestone on Jul 11, 2022
  10. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 11, 2022
  11. modified the milestones: 7.0.0, 8.0.0 on Jul 12, 2022
  12. added
    Priority:2Work that is important, but not critical for the release
    on Jun 20, 2023
  13. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 27, 2023
  14. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 29, 2023
  15. ghost locked as resolved and limited conversation to collaborators on Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIquestionAnswer questions and provide assistance, not an issue with source code or documentation.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions