mirror of
https://github.com/intel/llvm.git
synced 2026-01-28 10:38:23 +08:00
b3341ea453ca6f6cf41402eec9e4348bf1bd5f42
Summary: This add support for the C++11 feature, thread_local global variables. The ABI Clang implements is an improvement of the MSVC ABI. Sadly, further improvements could be made but not without sacrificing ABI compatibility. The feature is implemented as follows: - All thread_local initialization routines are pointed to from the .CRT$XDU section. - All non-weak thread_local variables have their initialization routines call from a single function instead of getting their own .CRT$XDU section entry. This is done to open up optimization opportunities to the compiler. - All weak thread_local variables have their own .CRT$XDU section entry. This entry is in a COMDAT with the global variable it is initializing; this ensures that we will initialize the global exactly once. - Destructors are registered in the initialization function using __tlregdtor. Differential Revision: http://reviews.llvm.org/D5597 llvm-svn: 219074
…
Languages
LLVM
41.5%
C++
31.7%
C
13%
Assembly
9.1%
MLIR
1.5%
Other
2.8%