Page MenuHomePhabricator

Improve code generation for thread_local variables:
ClosedPublic

Authored by rsmith on Sep 10 2019, 7:02 PM.

Details

Summary
  • 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.

Diff Detail

Repository
rL LLVM

Event Timeline

rsmith created this revision.Sep 10 2019, 7:02 PM
Herald added a project: Restricted Project. · View Herald Transcript
This revision is now accepted and ready to land.Sep 11 2019, 12:03 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2019, 1:01 PM