Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bac3227
introduced TlsRootNode
VSadov Jun 2, 2023
1ff41b9
remove RhGetInlinedThreadStaticStorage
VSadov Jun 4, 2023
e1d070d
get rid of c++ tls_InlinedThreadStatics
VSadov Jun 4, 2023
f5812e7
remove GetSingleTypeManager
VSadov Jun 4, 2023
aeee609
use .tdata on unix
VSadov Jun 5, 2023
447969c
do not switch OSX just yet
VSadov Jun 5, 2023
860ab1a
bring back tls_InlinedThreadStatics on Windows temporarily
VSadov Jun 8, 2023
4e3a8e5
emit inline access on windows
VSadov Jun 8, 2023
d96709c
unify tls sections
VSadov Jun 8, 2023
790dc9b
inline TLS access on linux-x64
VSadov Jun 8, 2023
7a4d903
no need for RhpGetInlinedThreadStaticBase when inlining the access
VSadov Jun 9, 2023
a585ff6
some comments and TODOs
VSadov Jun 9, 2023
62b60de
enable ILC generation of tls_InlinedThreadStatics on win-x64
VSadov Jun 9, 2023
2921dc4
allow storage inlining in multimodule case when TLS access is inlined
VSadov Jun 12, 2023
97cf520
disable "Initial Exec" optimizations
VSadov Jun 12, 2023
8dfa7e9
some comments and formatting
VSadov Jun 14, 2023
cdfd0a3
follow up change that was suggested in the previous PR
VSadov Jun 14, 2023
b650cbb
Remove use of RhpGetInlinedThreadstaticBase on x64
VSadov Jun 15, 2023
f9c5f01
Remove use of RhpGetInlinedThreadStaticBase on arm64
VSadov Jun 15, 2023
bca1c3b
removed tls_InlinedThreadStatics
VSadov Jun 15, 2023
ff29a93
a few cleanups/typos
VSadov Jun 15, 2023
6065863
fix after rebase
VSadov Jun 19, 2023
e48b82b
inlined TLS support for linux-arm64
VSadov Jun 19, 2023
dab05cf
PR feedback
VSadov Jun 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enable ILC generation of tls_InlinedThreadStatics on win-x64
  • Loading branch information
VSadov committed Jun 22, 2023
commit 62b60de71f7e066b75878877faa96ae831b28143
5 changes: 2 additions & 3 deletions src/coreclr/nativeaot/Runtime/threadstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,8 @@ __thread ThreadBuffer tls_CurrentThread;
__thread InlinedThreadStaticRoot tls_InlinedThreadStatics;
#endif

#else
// the root of inlined threadstatics storage
// there is only one now,
#elif defined(TARGET_ARM64)
// the root of inlined threadstatics storage for ARM64
// eventually this will be emitted by ILC and we may have more than one such variable
EXTERN_C __declspec(thread) InlinedThreadStaticRoot tls_InlinedThreadStatics;
__declspec(thread) InlinedThreadStaticRoot tls_InlinedThreadStatics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1303,8 +1303,8 @@ public virtual void AttachToDependencyGraph(DependencyAnalyzerBase<NodeFactory>
graph.AddRoot(EagerCctorTable, "EagerCctorTable is always generated");
graph.AddRoot(TypeManagerIndirection, "TypeManagerIndirection is always generated");

if (_target.OperatingSystem == TargetOS.Linux &&
_target.Architecture == TargetArchitecture.X64)
if (_target.Architecture == TargetArchitecture.X64 &&
(_target.OperatingSystem == TargetOS.Linux || _target.OperatingSystem == TargetOS.Windows))
{
graph.AddRoot(TlsRoot, "TlsRoot is always generated");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@ private static void EmitInlineTLSAccess(NodeFactory factory, ref X64Emitter enco

if (factory.Target.IsWindows)
{
// TODO: VS this is a temporary HACK.
// until we emit proper TLS template on Windows, we will emit one in c++ and bind to that.
tlsRoot = factory.ExternSymbol("tls_InlinedThreadStatics");
if (singleFileExe)
{
// mov rax,qword ptr gs:[58h]
Expand Down