- Notifications
You must be signed in to change notification settings - Fork5.1k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedFeb 8, 2024
Tagging subscribers to this area:@JulieLeeMSFT,@jakobbotsch Issue Details
Example: structMyStruct{publicobjectObj;}staticMyStructboxedStatic;[MethodImpl(MethodImplOptions.NoInlining)]staticvoidTest(stringstr1,stringstr2){boxedStatic.Obj=str1;boxedStatic.Obj=str2;} Codegen diff for ; 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
|
EgorBo commentedFeb 9, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
Uh oh!
There was an error while loading.Please reload this page.
And a small clean up.
Example:
Codegen diff for
Test
: