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

JIT: Use faster unchecked write-barrier for boxed statics#98166

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
EgorBo merged 1 commit intodotnet:mainfromEgorBo:more-faster-wb
Feb 9, 2024

Conversation

EgorBo
Copy link
Member

@EgorBoEgorBo commentedFeb 8, 2024
edited
Loading

And a small clean up.

Example:

structMyStruct{publicobjectObj;}staticMyStructboxedStatic;[MethodImpl(MethodImplOptions.NoInlining)]staticvoidTest(stringstr1,stringstr2){// simple way to trigger CSE:boxedStatic.Obj=str1;boxedStatic.Obj=str2;}

Codegen diff forTest:

; Method Prog:Test(System.String,System.String) (FullOpts)G_M57713_IG01:         push     rdi       push     rsi       push     rbx       sub      rsp, 32       mov      rbx, rcx       mov      rsi, rdxG_M57713_IG02:         test     byte  ptr [(reloc 0x7ff8e243b942)], 1      ; global ptr       je       SHORT G_M57713_IG05G_M57713_IG03:         mov      rcx, 0x21A0D401E10      ; box for Prog:boxedStatic       mov      rdi, gword ptr [rcx]       add      rdi, 8       mov      rcx, rdi       mov      rdx, rbx-      call     CORINFO_HELP_CHECKED_ASSIGN_REF+      call     CORINFO_HELP_ASSIGN_REF       mov      rcx, rdi       mov      rdx, rsi-      call     CORINFO_HELP_CHECKED_ASSIGN_REF+      call     CORINFO_HELP_ASSIGN_REF       nop      G_M57713_IG04:         add      rsp, 32       pop      rbx       pop      rsi       pop      rdi       ret      G_M57713_IG05:         mov      rcx, 0x7FF8E243B910       mov      edx, 2       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE       jmp      SHORT G_M57713_IG03; Total bytes of code: 92

@ghostghost assignedEgorBoFeb 8, 2024
@ghostghost added the area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labelFeb 8, 2024
@ghost
Copy link

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

Issue Details
  • small clean up.

Example:

structMyStruct{publicobjectObj;}staticMyStructboxedStatic;[MethodImpl(MethodImplOptions.NoInlining)]staticvoidTest(stringstr1,stringstr2){boxedStatic.Obj=str1;boxedStatic.Obj=str2;}

Codegen diff forTest:

; Method Prog:Test(System.String,System.String) (FullOpts)G_M57713_IG01:         push     rdi       push     rsi       push     rbx       sub      rsp, 32       mov      rbx, rcx       mov      rsi, rdxG_M57713_IG02:         test     byte  ptr [(reloc 0x7ff8e243b942)], 1      ; global ptr       je       SHORT G_M57713_IG05G_M57713_IG03:         mov      rcx, 0x21A0D401E10      ; box for Prog:boxedStatic       mov      rdi, gword ptr [rcx]       add      rdi, 8       mov      rcx, rdi       mov      rdx, rbx-      call     CORINFO_HELP_CHECKED_ASSIGN_REF+      call     CORINFO_HELP_ASSIGN_REF       mov      rcx, rdi       mov      rdx, rsi-      call     CORINFO_HELP_CHECKED_ASSIGN_REF+      call     CORINFO_HELP_ASSIGN_REF       nop      G_M57713_IG04:         add      rsp, 32       pop      rbx       pop      rsi       pop      rdi       ret      G_M57713_IG05:         mov      rcx, 0x7FF8E243B910       mov      edx, 2       call     CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE       jmp      SHORT G_M57713_IG03; Total bytes of code: 92
Author:EgorBo
Assignees:EgorBo
Labels:

area-CodeGen-coreclr

Milestone:-

@EgorBo
Copy link
MemberAuthor

@MihuBot

@EgorBo
Copy link
MemberAuthor

EgorBo commentedFeb 9, 2024
edited
Loading

@AndyAyersMS@kunalspathak (cc @dotnet/jit-contrib) a quick follow up to my previous PR There are only a fewtext diffs after marking boxed static address as unchecked barrier + a small clean up.

Copy link
Member

@AndyAyersMSAndyAyersMS left a comment

Choose a reason for hiding this comment

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

LGTM

EgorBo reacted with thumbs up emoji
@EgorBoEgorBo merged commit0a5e97f intodotnet:mainFeb 9, 2024
@EgorBoEgorBo deleted the more-faster-wb branchFebruary 9, 2024 11:12
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 12, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@AndyAyersMSAndyAyersMSAndyAyersMS approved these changes

@kunalspathakkunalspathakAwaiting requested review from kunalspathak

Assignees

@EgorBoEgorBo

Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@EgorBo@AndyAyersMS

[8]ページ先頭

©2009-2025 Movatter.jp