Skip to content

JIT: See if we can/should replace heap class layouts by custom layouts #114205

@jakobbotsch

Description

@jakobbotsch

Class layouts today can be created from either ref classes or value classes. I believe the former capability is only used by object stack allocation, yet everyone pays for additional JIT-EE calls when creating class layouts. We should see if we can/want to replace this by custom layouts created inside object stack allocation instead.

A few things to consider:

  1. I am not sure if getHeapClassSize can be removed or not in favor of getClassSize. But we can certainly switch the use to happen inside objectalloc instead.
  2. getTypeLayout today bails for non value classes. It means we are not making use of padding information during promotion of stack-allocated heap classes.
  3. We should be able to remove ClassLayout::IsValueClass as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions