[llvm-bugs] [Bug 42378] New: ThinLTO index only generates very large index files

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 24 15:19:16 PDT 2019


            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: unassignedbugs at nondot.org
          Reporter: llvm at inglorion.net
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190624/a6780553/attachment.html>

More information about the llvm-bugs mailing list