Uh oh!
There was an error while loading. Please reload this page.
NativeAOT: Optimize static fields of gc types - #80969
Conversation
ghost
commented
Jan 21, 2023
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsFollow up to #79709 but for gc fields now, e.g.: staticstringfield;staticstringGetField()=>field;Was: ; Method ConsoleApp1.Program:GetField():System.String 4883EC28 subrsp,40 E800000000 call CORINFO_HELP_READYTORUN_GCSTATIC_BASE 488B4008 movrax, gword ptr [rax+08H] 4883C428 addrsp,40 C3 ret; Total bytes of code: 18Now: ; Method ConsoleApp1.Program:GetField():System.String 488B0500000000 movrax, bword ptr [(reloc 0x40000000004225c0)] 488B4008 movrax, gword ptr [rax+08H] C3 ret; Total bytes of code: 12based on #63620 and @SingleAccretion's suggestions
|
EgorBo
commented
Jan 21, 2023
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
EgorBo
commented
Jan 21, 2023
@SingleAccretion PTAL when you have time 🙂 CI looks good so far |
Failures are all Mono-related in |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
@MichalStrehovsky PTAL NAOT side. |
| assert(pFieldInfo->fieldLookup.accessType == IAT_PVALUE); | ||
| op1 = gtNewIndOfIconHandleNode(TYP_BYREF, fldAddr, GTF_ICON_STATIC_ADDR_PTR, true); |
There was a problem hiding this comment.
Just to double check - typing this a TYP_BYREF and retyping it as TYP_I_IMPL when creating the GT_ADD below won't cause any issues?
Could we just type it as TYP_I_IMPL here? If I'm reading it right we're assuming it's pinned anyway.
There was a problem hiding this comment.
Ah, right, TYP_I_IMPL works here to for the static base address (and as we discussed inhttps://github.com//pull/79709 it doesn't lead to constant folding) and won't generate unnecessary gc info. The root GT_IND node has TYP_REF for gc refs so everything should be fine.
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Follow up to #79709 but for gc fields now, e.g.:
Was:
Now:
based on #63620 and @SingleAccretion's suggestions