Skip to content

For Debug, make sure we use right register selection heuristics to match with Release - #97657

Merged
kunalspathak merged 1 commit into
dotnet:mainfrom
kunalspathak:checked-release
Jan 30, 2024
Merged

For Debug, make sure we use right register selection heuristics to match with Release#97657
kunalspathak merged 1 commit into
dotnet:mainfrom
kunalspathak:checked-release

Conversation

@kunalspathak

Copy link
Copy Markdown
Contributor

If a method needs consecutive register, we do not use *minimal() register allocation strategy added in #96386. The reason being that in some cases, the *minimal might allocate registers that will sometime obstruct us from allocating consecutive registers. Also, to handle consecutive registers scenarios in *minimal() methods eats up the massive TP gain that we see in Arm64 for MinOpts because of the checks we need to add if refPosition needs consecutive register or not. I forgot to add a condition for consecutive register while deciding the selection heuristics.

Fixes: #97638

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 29, 2024
@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

If a method needs consecutive register, we do not use *minimal() register allocation strategy added in #96386. The reason being that in some cases, the *minimal might allocate registers that will sometime obstruct us from allocating consecutive registers. Also, to handle consecutive registers scenarios in *minimal() methods eats up the massive TP gain that we see in Arm64 for MinOpts because of the checks we need to add if refPosition needs consecutive register or not. I forgot to add a condition for consecutive register while deciding the selection heuristics.

Fixes: #97638

Author:kunalspathak
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@ryujit-bot

Copy link
Copy Markdown
Diff results for #97657

Assembly diffs

Assembly diffs for osx/arm64 ran on linux/x64

Diffs are based on 2,029,386 contexts (927,368 MinOpts, 1,102,018 FullOpts).

MISSED contexts: 109 (0.01%)

Overall (-41,352 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.osx.arm64.checked.mch34,533,064-372
benchmarks.run_tiered.osx.arm64.checked.mch15,508,464-220
coreclr_tests.run.osx.arm64.checked.mch483,586,020-40,760
MinOpts (-41,352 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.osx.arm64.checked.mch16,373,348-372
benchmarks.run_tiered.osx.arm64.checked.mch11,504,272-220
coreclr_tests.run.osx.arm64.checked.mch330,172,768-40,760

Assembly diffs for windows/arm64 ran on linux/x64

Diffs are based on 2,070,850 contexts (937,853 MinOpts, 1,132,997 FullOpts).

MISSED contexts: 139 (0.01%)

Overall (-41,352 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.windows.arm64.checked.mch46,609,220-372
benchmarks.run_tiered.windows.arm64.checked.mch15,506,140-220
coreclr_tests.run.windows.arm64.checked.mch496,298,628-40,760
MinOpts (-41,352 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.windows.arm64.checked.mch16,258,192-372
benchmarks.run_tiered.windows.arm64.checked.mch11,177,748-220
coreclr_tests.run.windows.arm64.checked.mch339,674,404-40,760

Details here


Throughput diffs

Throughput diffs for osx/arm64 ran on windows/x64

MinOpts (-0.01% to +0.00%)
CollectionPDIFF
libraries.pmi.osx.arm64.checked.mch-0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (-0.00% to +0.01%)
CollectionPDIFF
libraries.pmi.windows.arm64.checked.mch+0.01%

Details here


@ryujit-bot

Copy link
Copy Markdown
Diff results for #97657

Assembly diffs

Assembly diffs for linux/arm64 ran on windows/x64

Diffs are based on 2,259,470 contexts (1,008,044 MinOpts, 1,251,426 FullOpts).

MISSED contexts: 159 (0.01%)

Overall (-41,352 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm64.checked.mch79,903,244-372
benchmarks.run_tiered.linux.arm64.checked.mch22,276,872-220
coreclr_tests.run.linux.arm64.checked.mch509,740,232-40,760
MinOpts (-41,352 bytes)
CollectionBase size (bytes)Diff size (bytes)
benchmarks.run_pgo.linux.arm64.checked.mch25,548,372-372
benchmarks.run_tiered.linux.arm64.checked.mch17,338,964-220
coreclr_tests.run.linux.arm64.checked.mch348,907,856-40,760

Details here


@kunalspathak

Copy link
Copy Markdown
ContributorAuthor

@dotnet/jit-contrib

@kunalspathak
kunalspathak merged commit e6dbaba into dotnet:mainJan 30, 2024
@kunalspathak
kunalspathak deleted the checked-release branch January 30, 2024 19:52
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Mar 1, 2024
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.

JIT: checked/release diffs

3 participants

@kunalspathak@ryujit-bot@jakobbotsch