[all-commits] [llvm/llvm-project] 4ac24b: [libc] inline thread self (#101739)

Schrodinger ZHU Yifan via All-commits all-commits at lists.llvm.org
Fri Aug 2 13:11:40 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ac24b388a5d812c57d50ed8ce336f1d516450cc
      https://github.com/llvm/llvm-project/commit/4ac24b388a5d812c57d50ed8ce336f1d516450cc
  Author: Schrodinger ZHU Yifan <yifanzhu at rochester.edu>
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
    M libc/src/__support/threads/thread.cpp
    M libc/src/__support/threads/thread.h

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list