diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-10-31 20:39:26 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-10-31 20:39:26 +0000 |
commit | 3ad0636e0a0c39dfa08b67f1a568ee08ebbd1fdc (patch) | |
tree | a5846567d8079018a821eacfb5ec564778b85e13 /llvm/lib/DebugInfo/DWARF | |
parent | f7e3d8915e54b44c6ce5a00a2fc666051f2e800e (diff) | |
download | bcm5719-llvm-3ad0636e0a0c39dfa08b67f1a568ee08ebbd1fdc.tar.gz bcm5719-llvm-3ad0636e0a0c39dfa08b67f1a568ee08ebbd1fdc.zip |
Part of PR39508: Emit an @llvm.invariant.start after storing to
__tls_guard.
__tls_guard can only ever transition from 0 to 1, and only once. This
permits LLVM to remove repeated checks for TLS initialization and
repeated initialization code in cases like:
int g();
thread_local int n = g();
int a = n + n;
where we could not prove that __tls_guard was still 'true' when checking
it for the second reference to 'n' in the initializer of 'a'.
llvm-svn: 345774
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF')
0 files changed, 0 insertions, 0 deletions