- Don't bother using a thread wrapper when the variable is known to have constant initialization.
- Emit the thread wrapper as discardable-if-unused in TUs that don't contain a definition of the thread_local variable.
- Don't emit the thread wrapper at all if the thread_local variable is unused and discardable; it will be emitted by all TUs that need it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This commit appears to be the root cause of a run-time crash related to the interaction of global initializers and the wrapper functions to access thread_local variables -- reported as PR48030.