diff options
| author | Schrodinger ZHU Yifan <yifanzhu@rochester.edu> | 2024-08-02 13:11:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-02 13:11:17 -0700 |
| commit | 4ac24b388a5d812c57d50ed8ce336f1d516450cc (patch) | |
| tree | e9678444274021c814703018a31aa9e9f4b4f2f2 /libc/src/__support/threads/thread.cpp | |
| parent | 858bea86be709ec84757d98da16fbf3a05579b76 (diff) | |
[libc] inline thread self (#101739)
The codegen for non-inlined version is "quite ugly" as it emits some
checks to make sure the initialization routine is properly executed
because the compiler does not see how the TLS object is initialized.
This leads to some `callq 0x0` junk in the final outputs.
For codegen details, see https://godbolt.org/z/rb5qYj3vY.
Diffstat (limited to 'libc/src/__support/threads/thread.cpp')
| -rw-r--r-- | libc/src/__support/threads/thread.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/libc/src/__support/threads/thread.cpp b/libc/src/__support/threads/thread.cpp index 886281e0d50f..dad4f75f092e 100644 --- a/libc/src/__support/threads/thread.cpp +++ b/libc/src/__support/threads/thread.cpp @@ -17,9 +17,6 @@ #include "src/__support/macros/attributes.h" namespace LIBC_NAMESPACE_DECL { - -LIBC_THREAD_LOCAL Thread self; - namespace { using AtExitCallback = void(void *); |
