Go to file
Philip Reames 0f6650e8e8 [GC] Registry initialization and linkage interactions
The Registry class constructs a linked list of nodes whose storage is inside static variables and nodes are added via static initializers. The trick is that those static initializers are in both the LLVM code base, and some random plugin that might get loaded in at runtime. The existing code tries to use C++ templates and their ODR rules to get a single definition of the registry for each type, but, experimentally, this doesn't quite work as designed. (Well, the entire structure doesn't. It might not actually be an ODR problem.)

Previously, when I tried moving the GCStrategy class (along with it's registry) from CodeGen to IR, I ran into a problem where asking the GCStrategyRegistry a question would return inconsistent results depending on whether you asked from CodeGen (where the static initializers still were) or Transforms. My best guess is that this is a result of either a) an order of initialization error, or b) we ended up with two copies of the registry being created. I remember at the time having convinced myself it was probably (b), but I don't have any of my notes around from that investigation any more.

See http://reviews.llvm.org/rL226311 for the original patch in question.

This patch tries to remove the possibility of (b) above. (a) was already fixed in change 258109.

Differential Revision: http://reviews.llvm.org/D16170

llvm-svn: 258157
2016-01-19 18:34:27 +00:00
clang Module Debugging: Defer the emission of anonymous tag decls 2016-01-19 18:02:47 +00:00
clang-tools-extra [clang-tidy] Python scripts shebang fixes 2016-01-19 16:10:39 +00:00
compiler-rt tsan: add back __tls_get_addr interceptor 2016-01-19 12:28:00 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc AMDGPU: Add aliases for all VI targets 2015-12-15 18:37:04 +00:00
libcxx Fix PR#26175. Thanks to Josh Petrie for the report and the patch. Reviewed as http://reviews.llvm.org/D16262 2016-01-19 00:50:37 +00:00
libcxxabi Revert r256322 (and follow-up 256323), the test it added does not pass on OS X. 2016-01-15 15:44:14 +00:00
libunwind Replace cmake check for printf with a check for fopen. 2015-12-10 00:47:08 +00:00
lld [ELF] - R_386_GOT32 relocation calculation fix. 2016-01-19 11:00:48 +00:00
lldb Implementing the method Target::TargetEventData::Dump (Stream *s) so that its clients can easily dump it out for informational messages. 2016-01-19 17:54:47 +00:00
llgo [llgo] Force exporting __morestack from llgoi 2015-11-27 04:46:46 +00:00
llvm [GC] Registry initialization and linkage interactions 2016-01-19 18:34:27 +00:00
openmp Don't use __DATE__ or __TIME__; it breaks release builds (PR26145) 2016-01-14 23:18:20 +00:00
polly Make sure we preserve alignment information after hoisting invariant load 2016-01-19 00:17:21 +00:00