[PATCH] D49565: [ThinLTO] Only emit referenced type id records in index files

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 19 13:51:14 PDT 2018


tejohnson created this revision.
tejohnson added a reviewer: pcc.
Herald added subscribers: dexonsmith, steven_wu, eraman, inglorion, mehdi_amini.

Currently all type ids are emitted into the index file when it is
written. For distributed ThinLTO, that meant that all type ids were
being duplicated into every single distributed index file, regardless of
whether they were referenced, leading to huge amounts of unnecessary
duplication and size bloat.

Keep track of the type id GUIDs actually referenced by the GV summary
records being emitted, and only emit those type IDs.

Add a new test, and fix test/Assembler/thinlto-summary.ll so that all
type ids are referenced to prevent deletion in that test.


Repository:
  rL LLVM

https://reviews.llvm.org/D49565

Files:
  lib/Bitcode/Writer/BitcodeWriter.cpp
  test/Assembler/thinlto-summary.ll
  test/ThinLTO/X86/Inputs/cfi-distributed.ll
  test/ThinLTO/X86/cfi-distributed.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49565.156352.patch
Type: text/x-patch
Size: 9208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180719/50111671/attachment.bin>


More information about the llvm-commits mailing list