mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-12 02:30:29 +09:00
[NativeAOT] Inline TLS access for windows/x64 (#89472)
* wip * working model * wip * wip * working * Add helper for tlsIndex * add methods in superpmi * revert some local changes * misc fixes * Stop emitting TLS access code for windows/x64 * fix linux build errors * Do not throw not implemented for windows/x64 * fix the problem where ThreadStaticBase helper was still getting invoked * Revert certain changes from JIT method * Introduce getThreadLocalStaticInfo_ReadyToRun() * Consume getThreadLocalStaticInfo_ReadyToRun() * Remove getTlsRootInfo() and other methods * Revert unneeded changes * missing gtInitCldHnd initialization * save target address * jit format * run thunkgenerator * resolve merge conflicts * fix issues so the TLS is inlined * Rename data structures from *_ReadyToRun to *_NativeAOT * jit format * fix some unit test * fix a bug * fix the weird jump problem * use enclosing type cls handle for VN of static gc/non-gc helper * fix a bug of resetting the flag * useEnclosingTypeOnly from runtime to determine if VN should optimize it * do not use vnf, but only use useEnclosingTypeAsArg0 * Use GT_COMMA to add GCStaticBase call next to TLS call * optimize the cctor call * Remove lazy ctor generation from tls * Update jitinterface to not fetch data for lazy ctor * fix errors after merge * fix test build errors * fix bug in CSE * Use CORINFO_FLG_FIELD_INITCLASS instead of separate flag * Use the INITCLASS flag * Remove useEnclosingTypeOnly * Add NoCtor * Use CORINFO_HELP_READYTORUN_THREADSTATIC_BASE_NOCTOR * Minor cleanup * Renegenrate thunk * Add the SetFalseTarget * fix merge conflict resolution * better handling of GTF_ICON_SECREL_OFFSET better handling of GTF_ICON_SECREL_OFFSET * review feedback * Disable optimization for minopts * Add comments around iiaSecRel * jit format * create emitNewInstrCns() * Expand TLS even if optimization is disabled * Track t_inlinedThreadStaticBase Better tracking `t_inlinedThreadStaticBase` as TYP_REF * jit format
This commit is contained in:
parent
5598dac557
commit
7989f18c48
37 changed files with 588 additions and 156 deletions
|
@ -12352,6 +12352,7 @@ void Compiler::fgValueNumberHelperCallFunc(GenTreeCall* call, VNFunc vnf, ValueN
|
|||
case VNF_ReadyToRunStaticBaseGC:
|
||||
case VNF_ReadyToRunStaticBaseNonGC:
|
||||
case VNF_ReadyToRunStaticBaseThread:
|
||||
case VNF_ReadyToRunStaticBaseThreadNoctor:
|
||||
case VNF_ReadyToRunStaticBaseThreadNonGC:
|
||||
case VNF_ReadyToRunGenericStaticBase:
|
||||
case VNF_ReadyToRunIsInstanceOf:
|
||||
|
@ -12739,6 +12740,9 @@ VNFunc Compiler::fgValueNumberJitHelperMethodVNFunc(CorInfoHelpFunc helpFunc)
|
|||
case CORINFO_HELP_READYTORUN_THREADSTATIC_BASE:
|
||||
vnf = VNF_ReadyToRunStaticBaseThread;
|
||||
break;
|
||||
case CORINFO_HELP_READYTORUN_THREADSTATIC_BASE_NOCTOR:
|
||||
vnf = VNF_ReadyToRunStaticBaseThreadNoctor;
|
||||
break;
|
||||
case CORINFO_HELP_READYTORUN_NONGCTHREADSTATIC_BASE:
|
||||
vnf = VNF_ReadyToRunStaticBaseThreadNonGC;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue