https://bugs.llvm.org/show_bug.cgi?id=42378
Bug ID: 42378
Summary: ThinLTO index only generates very large index files
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Interprocedural Optimizations
Assignee: unassignedb...@nondot.org
Reporter: l...@inglorion.net
CC: llvm-bugs@lists.llvm.org
While trying to make distributed ThinLTO work for Chrome, I noticed that the
index (.thinlto.bc) files generated by -plugin-opt=thinlto-index-only can get
very large. When linking chrome on Linux, every .o file in the link gets a
.thinlto.bc file about 10MB in size, which with the number of object files
taking part in that link adds up to a lot of disk space.
A smaller but hopefully still interesting case is to apply
https://crrev.com/c/1654198 to Chromium, configuring with args.gn:
is_debug = false
is_official_build = true
strip_absolute_paths_from_debug_symbols = true
and building with ninja base_unittests printing_unittests
This gives the following sizes:
137K lto.base_unittests/obj/base/i18n/number_formatting.o
0 lto.base_unittests/obj/base/i18n/number_formatting.o.imports
660K lto.base_unittests/obj/base/i18n/number_formatting.o.thinlto.bc
560 lto.printing_unittests/obj/base/i18n/number_formatting.o
0 lto.printing_unittests/obj/base/i18n/number_formatting.o.imports
124 lto.printing_unittests/obj/base/i18n/number_formatting.o.thinlto.bc
(If needed, larger files can be obtained by building different targets.)
A quick look with llvm-bcanalyzer --dump shows about 95% of the larger files to
be taken up by the strtab.
These numbers were obtained with LLVM r363966 and Chromium
https://crrev.com/c/1663415. Similar results can be obtained with older
versions, so this doesn't appear to be a recent introduction.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs