Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ImproveTryTransformStoreObjAsStoreInd optimization.#55727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sandreenko merged 2 commits intodotnet:mainfromsandreenko:improveStructs
Jul 15, 2021

Conversation

@sandreenko
Copy link
Contributor

@sandreenkosandreenko commentedJul 15, 2021
edited
Loading

With#55558 in the main we can now start using structs in regs potential, this is a change to convert moreSTORE_BLK(dst, LCL_VAR) asSTORE_IND(dst, LCL_VAR).
The second representation is better becauseSTORE_IND allowsLCL_VAR to be enregistered.

There was also a bug that the optimization was enabled for MinOpts and disabled for MaxOpts, fixed as well. It was not providing much value without enregistration so that was staying hidden for quite a while (since 5.0).

Some SPMI highlights:

libraries.crossgen2.Linux.arm64.checked.mchTotal bytes of delta: -620445947 total methods with Code Size differences (5861 improved, 86 regressed)libraries.crossgen2.windows.x64.checked.mchTotal bytes of delta: -12882945 total methods with Code Size differences (872 improved, 73 regressed), 804 unchanged.

asp and benchmarks are showing improvements as well.

Full diffs
coreclr_tests.pmi.windows.x64.checked.mchTotal bytes of delta: -10515791 total files with Code Size differences (693 improved, 98 regressed), 2666 unchanged.libraries.crossgen2.windows.x64.checked.mchTotal bytes of delta: -12882945 total files with Code Size differences (872 improved, 73 regressed), 804 unchanged.libraries.pmi.windows.x64.checked.mchTotal bytes of delta: -6776945 total files with Code Size differences (800 improved, 145 regressed), 645 unchanged.libraries_tests.pmi.windows.x64.checked.mchTotal bytes of delta: -208642300 total files with Code Size differences (2117 improved, 183 regressed), 986 unchanged.aspnet.run.windows.x64.checked.mchTotal bytes of delta: -748125 total files with Code Size differences (92 improved, 33 regressed), 206 unchanged.benchmarks.run.windows.x64.checked.mchTotal bytes of delta: -39034 total files with Code Size differences (26 improved, 8 regressed), 65 unchanged.coreclr_tests.pmi.Linux.arm64.checked.mchTotal bytes of delta: -20528413 total files with Code Size differences (325 improved, 88 regressed), 5906 unchanged.libraries.crossgen2.Linux.arm64.checked.mchTotal bytes of delta: -620445947 total files with Code Size differences (5861 improved, 86 regressed), 3080 unchanged.libraries.pmi.Linux.arm64.checked.mchTotal bytes of delta: -201841083 total files with Code Size differences (1024 improved, 59 regressed), 7333 unchanged.libraries_tests.pmi.Linux.arm64.checked.mchTotal bytes of delta: -186522409 total files with Code Size differences (2281 improved, 128 regressed), 3993 unchanged.benchmarks.run.Linux.x64.checked.mchTotal bytes of delta: -5826 total files with Code Size differences (18 improved, 8 regressed), 71 unchanged.coreclr_tests.pmi.Linux.x64.checked.mchTotal bytes of delta: -8914804 total files with Code Size differences (606 improved, 198 regressed), 2711 unchanged.libraries.crossgen2.Linux.x64.checked.mchTotal bytes of delta: -10620717 total files with Code Size differences (668 improved, 49 regressed), 2042 unchanged.libraries.pmi.Linux.x64.checked.mchTotal bytes of delta: -8268925 total files with Code Size differences (799 improved, 126 regressed), 622 unchanged.libraries_tests.pmi.Linux.x64.checked.mchTotal bytes of delta: -214411991 total files with Code Size differences (1898 improved, 93 regressed), 1088 unchanged.benchmarks.run.windows.arm64.checked.mchTotal bytes of delta: -11246 total files with Code Size differences (41 improved, 5 regressed), 207 unchanged.coreclr_tests.pmi.windows.arm64.checked.mchTotal bytes of delta: -19676430 total files with Code Size differences (342 improved, 88 regressed), 5914 unchanged.libraries.crossgen2.windows.arm64.checked.mchTotal bytes of delta: -635126167 total files with Code Size differences (6076 improved, 91 regressed), 3307 unchanged.libraries.pmi.windows.arm64.checked.mchTotal bytes of delta: -204601132 total files with Code Size differences (1069 improved, 63 regressed), 7564 unchanged.libraries_tests.pmi.windows.arm64.checked.mchTotal bytes of delta: -201802530 total files with Code Size differences (2386 improved, 144 regressed), 4099 unchanged.benchmarks.run.windows.x86.checked.mchTotal bytes of delta: -18928 total files with Code Size differences (17 improved, 11 regressed), 37 unchanged.coreclr_tests.pmi.windows.x86.checked.mchTotal bytes of delta: -5880716 total files with Code Size differences (497 improved, 219 regressed), 115 unchanged.libraries.crossgen2.windows.x86.checked.mchTotal bytes of delta: -2369301 total files with Code Size differences (257 improved, 44 regressed), 573 unchanged.libraries.pmi.windows.x86.checked.mchTotal bytes of delta: -770273 total files with Code Size differences (144 improved, 129 regressed), 153 unchanged.libraries_tests.pmi.windows.x86.checked.mchTotal bytes of delta: -55371236 total files with Code Size differences (1092 improved, 144 regressed), 296 unchanged.coreclr_tests.pmi.Linux.arm.checked.mchTotal bytes of delta: -162069 total files with Code Size differences (66 improved, 3 regressed), 109 unchanged.libraries.crossgen2.Linux.arm.checked.mchTotal bytes of delta: -950251 total files with Code Size differences (246 improved, 5 regressed), 47 unchanged.libraries.pmi.Linux.arm.checked.mchTotal bytes of delta: -7228 total files with Code Size differences (26 improved, 2 regressed), 18 unchanged.libraries_tests.pmi.Linux.arm.checked.mchTotal bytes of delta: -3812 total files with Code Size differences (12 improved, 0 regressed), 239 unchanged.

The regressions are small and expected, they are:

  1. noise from changing initFrameSize and saving/restoring non-vol regs;
  2. LSRA noise because now we have more candidates and sometimes do worse decisions;
  3. probably some minopts regressions because we don't do the optimization there, but I have not seen them in the diffs yet.

The ratio of improvements/regressions in benchmarks was concerning so I manually checked that all regressions are in one of the first 2 categories.

contributes to#43867

kunalspathak, SingleAccretion, and pentp reacted with rocket emoji
@sandreenkosandreenko added area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI optimization labelsJul 15, 2021
@sandreenko
Copy link
ContributorAuthor

/azp run runtime-coreclr jitstress, runtime-coreclr outerloop, runtime-coreclr jitstressregs

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@sandreenko
Copy link
ContributorAuthor

GitHub does not show the checks for me but they were started:

  1. runtime
  2. jitstressregs
  3. jitstress
  4. outerloop

@sandreenko
Copy link
ContributorAuthor

PTAL @dotnet/jit-contrib, I would like to sneak 1 more change into Prev7 if somebody has time to review this simple change.

It actually fixes a wrong usage ofOptimizationEnabled() so maybe we can merge it in the next one as a correctness fix, but still would be safer to merge it in Prev7.

Copy link
Contributor

@kunalspathakkunalspathak left a comment

Choose a reason for hiding this comment

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

Great catch!

@kunalspathak
Copy link
Contributor

outerloop failures are related to#55657.

It was failing on DevDiv_280120 arm32 linux, did not repro with an altjit.
@sandreenko
Copy link
ContributorAuthor

I looked at the failures and most were unrelated but one was hitting the new assert that I added here. I have disabled the assert and will open an issue to check why it was failing on that test. The assert was about catching missed optimization opportunities, not about correctness so it is safe not to add it.

@sandreenkosandreenko merged commit6d3bb36 intodotnet:mainJul 15, 2021
@sandreenkosandreenko mentioned this pull requestAug 2, 2021
10 tasks
@ghostghost locked asresolvedand limited conversation to collaboratorsAug 14, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@jakobbotschjakobbotschjakobbotsch approved these changes

+1 more reviewer

@kunalspathakkunalspathakkunalspathak approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@sandreenko@kunalspathak@jakobbotsch

[8]ページ先頭

©2009-2025 Movatter.jp