[PATCH] D27775: [ThinLTO] Import composite types as declarations
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 14:02:57 PST 2016
tejohnson created this revision.
tejohnson added reviewers: mehdi_amini, dblaikie, aprantl.
tejohnson added a subscriber: llvm-commits.
When reading the metadata bitcode, create a type declaration when
possible for composite types when we are importing. Doing this in
the bitcode reader saves memory. Also it works naturally in the case
when the type ODR map contains a definition for the same composite type
because it was used in the importing module (buildODRType will
automatically use the existing definition and not create a type
declaration).
For Chromium built with -g2, this reduces the aggregate size of the
generated native object files by 66% (from 31G to 10G). It reduced
the time through the ThinLTO link and backend phases by about 20% on
my machine.
https://reviews.llvm.org/D27775
Files:
include/llvm/Bitcode/BitcodeReader.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Reader/MetadataLoader.cpp
lib/Bitcode/Reader/MetadataLoader.h
lib/LTO/LTOBackend.cpp
lib/LTO/ThinLTOCodeGenerator.cpp
test/ThinLTO/X86/Inputs/debuginfo-compositetype-import.ll
test/ThinLTO/X86/debuginfo-compositetype-import.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27775.81463.patch
Type: text/x-patch
Size: 19211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161214/77bbaefd/attachment.bin>
More information about the llvm-commits
mailing list