1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib
Philip Reames 5419400ae8 [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
..
Analysis [opaque pointer types] [NFC] GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType. 2016-01-19 17:28:00 +00:00
AsmParser Implemented Support of IA interrupt and exception handlers: 2015-12-21 14:07:14 +00:00
Bitcode NFC Test Commit whitespace change in a comment 2016-01-19 18:01:20 +00:00
CodeGen [GC] Registry initialization and linkage interactions 2016-01-19 18:34:27 +00:00
DebugInfo Fix instance of -Wcovered-switch-default 2016-01-13 20:39:22 +00:00
ExecutionEngine GlobalValue: use getValueType() instead of getType()->getPointerElementType(). 2016-01-16 20:30:46 +00:00
Fuzzer [libFuzzer] replace vector with a simpler data structure in the Dictionaries to avoid memory allocations on hot path 2016-01-16 03:53:32 +00:00
IR [opaque pointer types] [NFC] GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType. 2016-01-19 17:28:00 +00:00
IRReader [ThinLTO] Metadata linking for imported functions 2015-12-17 17:14:09 +00:00
LibDriver [Option] Use an ArrayRef to store the Option Infos in OptTable. NFC 2015-10-21 16:30:42 +00:00
LineEditor
Linker GlobalValue: use getValueType() instead of getType()->getPointerElementType(). 2016-01-16 20:30:46 +00:00
LTO [LTO] Restore original linkage of externals prior to splitting 2016-01-18 23:24:54 +00:00
MC Use larger write sizes for MCFillFragment. 2016-01-19 17:47:48 +00:00
Object COFF: Teach llvm-objdump how to dump DLL forwarder symbols. 2016-01-12 23:28:42 +00:00
Option Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs(). 2015-12-18 18:55:26 +00:00
Passes [attrs] Extract the pure inference of function attributes into 2015-12-27 08:41:34 +00:00
ProfileData [Coverage] move a local var to be BinaryCoverageReader's member 2016-01-18 06:48:01 +00:00
Support parseArch() supports more variations of arch names for PowerPC builds 2016-01-19 00:04:41 +00:00
TableGen [TableGen] Use FoldingSets instead of DenseMaps to unique UnOpInit, BinOpInit and TernOpInit. This remove the memory needed to store the key for the DenseMap. NFC 2016-01-18 20:36:06 +00:00
Target [opaque pointer types] [NFC] GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType. 2016-01-19 17:28:00 +00:00
Transforms [PGO] Create the profile data variable before the lowering 2016-01-19 18:29:54 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile