Skip to content

Conversation

@EgorBo
Copy link
Member

@EgorBo EgorBo commented Nov 21, 2022

Closes #64876

This PR slightly changes memory layout in AssertionDsc (diff) while keeping total size the same (48 bytes) in order to save a reference to FieldSeq*.

Example:

static byte Foo()
{
    ReadOnlySpan<byte> RVA = new byte[] { 1, 2, 3, 4, 5 };
    return RVA[3];
}

JITDump diff: https://www.diffchecker.com/HVVahKbd e.g.:

image

This also is required to be able to fold constant index + RVA in future.

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 21, 2022
@ghost ghost assigned EgorBo Nov 21, 2022
@ghost
Copy link

ghost commented Nov 21, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Closes #64876

This PR slightly changes memory layout in AssertionDsc (diff) while keeping total size the same (48 bytes) in order to save a reference to FieldSeq*.

Example:

static byte Foo()
{
    ReadOnlySpan<byte> RVA = new byte[] { 1, 2, 3, 4, 5 };
    return RVA[3];
}

JITDump diff: https://www.diffchecker.com/HVVahKbd e.g.:

image

This also is required to be able to fold constant index + RVA in future.

Author: EgorBo
Assignees: EgorBo
Labels:

area-CodeGen-coreclr

Milestone: -

@EgorBo EgorBo force-pushed the keep-fldseq-assertdesc branch from 3f2f953 to 9f57e78 Compare November 21, 2022 11:27
EgorBo and others added 2 commits November 21, 2022 22:27
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
@EgorBo EgorBo marked this pull request as ready for review November 22, 2022 10:14
@EgorBo
Copy link
Member Author

EgorBo commented Nov 22, 2022

@SingleAccretion @jakobbotsch please, take a look
I need this PR to land another one to fold RVA + constant index

Copy link
Contributor

@SingleAccretion SingleAccretion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo minor comments.

@EgorBo EgorBo merged commit e56518f into dotnet:main Nov 23, 2022
@EgorBo EgorBo deleted the keep-fldseq-assertdesc branch November 23, 2022 12:02
@ghost ghost locked as resolved and limited conversation to collaborators Dec 23, 2022
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Constant propagation should preserve field sequences

3 participants