diff options
author | Hans Wennborg <hans@hanshq.net> | 2012-11-15 11:40:00 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2012-11-15 11:40:00 +0000 |
commit | 709e015cf170dd056806001b22f7da2c3e9154a7 (patch) | |
tree | 0e2a6342ec7c3af530dfcd78a14997b5ac4ca5e5 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | a4d31a33b5e2e443176c789ad4bc4583134e148b (diff) | |
download | llvm-709e015cf170dd056806001b22f7da2c3e9154a7.zip llvm-709e015cf170dd056806001b22f7da2c3e9154a7.tar.gz llvm-709e015cf170dd056806001b22f7da2c3e9154a7.tar.bz2 |
Make GlobalOpt be conservative with TLS variables (PR14309)
For global variables that get the same value stored into them
everywhere, GlobalOpt will replace them with a constant. The problem is
that a thread-local GlobalVariable looks like one value (the address of
the TLS var), but is different between threads.
This patch introduces Constant::isThreadDependent() which returns true
for thread-local variables and constants which depend on them (e.g. a GEP
into a thread-local array), and teaches GlobalOpt not to track such
values.
llvm-svn: 168037
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions