1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/unittests
Pavel Labath d33177a252 [DebugInfo] Reduce debug_str_offsets section size
Summary:
The accelerator tables use the debug_str section to store their strings.
However, they do not support the indirect method of access that is
available for the debug_info section (DW_FORM_strx et al.).

Currently our code is assuming that all strings can/will be referenced
indirectly, and puts all of them into the debug_str_offsets section.
This is generally true for regular (unsplit) dwarf, but in the DWO case,
most of the strings in the debug_str section will only be used from the
accelerator tables. Therefore the contents of the debug_str_offsets
section will be largely unused and bloating the main executable.

This patch rectifies this by teaching the DwarfStringPool to
differentiate between strings accessed directly and indirectly. When a
user inserts a string into the pool it has to declare whether that
string will be referenced directly or not. If at least one user requsts
indirect access, that string will be assigned an index ID and put into
debug_str_offsets table. Otherwise, the offset table is skipped.

This approach reduces the overall binary size (when compiled with
-gdwarf-5 -gsplit-dwarf) in my tests by about 2% (debug_str_offsets is
shrunk by 99%).

Reviewers: probinson, dblaikie, JDevlieghere

Subscribers: aprantl, mgrang, llvm-commits

Differential Revision: https://reviews.llvm.org/D49493

llvm-svn: 339122
2018-08-07 09:54:52 +00:00
..
ADT [ADT] Add an early-increment iterator-like type and range adaptor. 2018-08-04 08:17:26 +00:00
Analysis llvm: Add support for "-fno-delete-null-pointer-checks" 2018-07-09 22:27:23 +00:00
AsmParser
BinaryFormat Re-land: [MachO] Fixing ub in MachO BinaryFormat 2018-06-03 20:33:42 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00
DebugInfo [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00
Demangle [demangler] Add ItaniumPartialDemangler::isCtorOrDtor 2018-05-24 06:57:57 +00:00
ExecutionEngine [ORC] Add a re-exports fallback definition generator. 2018-08-02 20:13:58 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [Dominators] Refine the logic of recalculate() in the DomTreeUpdater 2018-08-03 06:51:35 +00:00
LineEditor
Linker Inline a few CMake variables into their only uses. 2018-05-14 19:23:31 +00:00
MC Revert "[WebAssembly] Added default stack-only instruction mode for MC." 2018-07-27 23:19:51 +00:00
MI [LiveIntervals] Handle moving up dead partial write 2018-02-26 14:42:13 +00:00
Object
ObjectYAML
Option Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
Passes Fix build warning compiling TestPlugin on Windows and disable Passes plugin stuff on Windows since it fundamentally can't work 2018-05-19 03:05:30 +00:00
ProfileData [NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary. 2018-06-12 05:53:49 +00:00
Support Use the same constants as zlib to represent compression level. 2018-08-04 00:13:13 +00:00
Target [WebAssembly] Add WebAssemblyException information analysis 2018-06-25 01:20:21 +00:00
tools [llvm-exegesis] Renaming classes and functions. 2018-08-03 09:29:38 +00:00
Transforms [DebugInfo] Refactor DbgInfoIntrinsic class hierarchy. 2018-08-06 03:59:47 +00:00
XRay Reverted r338825 and all the following tries to fix issues introduced by that commit (r338826, r338827, r338829, r338880). 2018-08-04 01:59:12 +00:00
CMakeLists.txt alphabetize list 2018-05-14 18:23:05 +00:00