[dsymutil] Implement ODR uniquing for C++ code.
authorFrederic Riss <friss@apple.com>
Tue, 21 Jul 2015 22:41:43 +0000 (22:41 +0000)
committerFrederic Riss <friss@apple.com>
Tue, 21 Jul 2015 22:41:43 +0000 (22:41 +0000)
commit309fcf84b80c6db51c063c9d5c5ac30f69958b78
tree7a62b21b2507e76cbbe000b77149cbb31097f18a
parent1b75dd2bc23ec559555a2f9decef82dddfe720f1
[dsymutil] Implement ODR uniquing for C++ code.

This optimization allows the DWARF linker to reuse definition of
types it has emitted in previous CUs rather than reemitting them
in each CU that references them. The size and link time gains are
huge. For example when linking the DWARF for a debug build of
clang, this generates a ~150M dwarf file instead of a ~700M one
(the numbers date back a bit and must not be totally accurate
these days).

As with all the other parts of the llvm-dsymutil codebase, the
goal is to keep bit-for-bit compatibility with dsymutil-classic.
The code is littered with a lot of FIXMEs that should be
addressed once we can get rid of the compatibilty goal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242847 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
test/tools/dsymutil/Inputs/odr-types.h [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr1.cpp [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr1.ll [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr2.cpp [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr2.ll [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr3.cpp [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr3.ll [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr4.cpp [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr4.ll [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr5.cpp [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr5.ll [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr6.cpp [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr6.ll [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr7.cpp [new file with mode: 0644]
test/tools/dsymutil/Inputs/odr7.ll [new file with mode: 0644]
test/tools/dsymutil/X86/odr-1.test [new file with mode: 0644]
tools/dsymutil/DwarfLinker.cpp
tools/dsymutil/dsymutil.cpp
tools/dsymutil/dsymutil.h