Skip to content

JIT: Ignore source indir when checking interference for block store source address - #78763

Merged
jakobbotsch merged 2 commits into
dotnet:mainfrom
jakobbotsch:block-store-contain-source-address-interference
Nov 23, 2022
Merged

JIT: Ignore source indir when checking interference for block store source address#78763
jakobbotsch merged 2 commits into
dotnet:mainfrom
jakobbotsch:block-store-contain-source-address-interference

Conversation

@jakobbotsch

@jakobbotschjakobbotsch commented Nov 23, 2022

Copy link
Copy Markdown
Member

For block stores we can contain both the source and destination address. Since the source is a value we will have an indirection on top of the address, such as

N015 ( 3, 12) [000014] I---------- t14 = CNS_INT(h) long 0xd1ffab1e static box ptr REG x1 $200
┌──▌ t14 long N017 ( 6, 14) [000001] #---G------ t1 = ▌ IND ref REG x1 $240
┌──▌ t1 ref N019 ( 8, 17) [000003] -c--G------ t3 = ▌ LEA(b+8) byref REG NA
┌──▌ t3 byref N021 ( 32, 39) [000004] nc-XG--N--- t4 = ▌ IND struct REG NA
N023 (???,???) [000025] Dc--------- t25 = LCL_FLD_ADDR byref V03 tmp1 [+0] NA REG NA
┌──▌ t25 byref ├──▌ t4 struct N025 ( 42, 46) [000017] sA--------- ▌ STORE_BLK struct<Xunit.StackFrameInfo, 16> (copy) (Unroll) REG NA

where [000004] is the source indirection and [000003] is the source address. The existing containment check was checking interference of [000003] with [000004], which is conservative given that the indirection itself is always contained.

This should fix some of the regressions seen in #78698.

…ource address
For block stores we can contain both the source and destination address.
Since the source is a value we will have an indirection on top of the
address, such as
N017 ( 6, 14) [000001] #---G------ t1 = ▌ IND ref REG x1 $240
┌──▌ t1 ref
N019 ( 8, 17) [000003] -c--G------ t3 = ▌ LEA(b+8) byref REG NA
┌──▌ t3 byref
N021 ( 32, 39) [000004] nc-XG--N--- t4 = ▌ IND struct REG NA
N023 (???,???) [000025] Dc--------- t25 = LCL_FLD_ADDR byref V03 tmp1 [+0] NA REG NA
┌──▌ t25 byref
├──▌ t4 struct
N025 ( 42, 46) [000017] sA--------- ▌ STORE_BLK struct<Xunit.StackFrameInfo, 16> (copy) (Unroll) REG NA
where [000004] is the source indirection and [000003] is the source
address. The existing containment check was checking interference of
[000003] with [000004], which is conservative given that the indirection
itself is always contained.
@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 23, 2022
@ghost

Copy link
Copy Markdown

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

Issue Details

For block stores we can contain both the source and destination address. Since the source is a value we will have an indirection on top of the address, such as

N017 ( 6, 14) [000001] #---G------ t1 = ▌ IND ref REG x1 $240
┌──▌ t1 ref
N019 ( 8, 17) [000003] -c--G------ t3 = ▌ LEA(b+8) byref REG NA
┌──▌ t3 byref
N021 ( 32, 39) [000004] nc-XG--N--- t4 = ▌ IND struct REG NA
N023 (???,???) [000025] Dc--------- t25 = LCL_FLD_ADDR byref V03 tmp1 [+0] NA REG NA
┌──▌ t25 byref
├──▌ t4 struct
N025 ( 42, 46) [000017] sA--------- ▌ STORE_BLK struct<Xunit.StackFrameInfo, 16> (copy) (Unroll) REG NA

where [000004] is the source indirection and [000003] is the source address. The existing containment check was checking interference of [000003] with [000004], which is conservative given that the indirection itself is always contained.

This should fix some of the regressions seen in #78698.

Author:jakobbotsch
Assignees:jakobbotsch
Labels:

area-CodeGen-coreclr

Milestone:-

@jakobbotsch

Copy link
Copy Markdown
MemberAuthor

cc @dotnet/jit-contrib PTAL @SingleAccretion@EgorBo

Comment threadsrc/coreclr/jit/lowerarmarch.cpp Outdated
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
@jakobbotsch
jakobbotsch merged commit eb9eab0 into dotnet:mainNov 23, 2022
@jakobbotsch
jakobbotsch deleted the block-store-contain-source-address-interference branch November 23, 2022 16:04
@ghostghost locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclrCLR 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.

3 participants

@jakobbotsch@EgorBo@SingleAccretion