OSDN Git Service

ThinLTO Minimized Bitcode File Size Reduction
authorHaojie Wang <haojie0429@gmail.com>
Fri, 21 Jul 2017 17:25:20 +0000 (17:25 +0000)
committerHaojie Wang <haojie0429@gmail.com>
Fri, 21 Jul 2017 17:25:20 +0000 (17:25 +0000)
commite7ac9f3115aa972dff61dfacac847c55d768dd6f
tree1872b4c437e11531245420dc8ddab09db3037ce3
parentabccd7d6bca2260f90ad5a9d8c1470377969d9ba
ThinLTO Minimized Bitcode File Size Reduction

Summary: Currently the ThinLTO minimized bitcode file only strip the debug info, but there is still a lot of information in the minimized bit code file that will be not used for thin linker. In this patch, most of the extra information is striped to reduce the minimized bitcode file. Now only ModuleVersion, ModuleInfo, ModuleGlobalValueSummary, ModuleHash, Symtab and Strtab are left. Now the minimized bitcode file size is reduced to 15%-30% of the debug info stripped bitcode file size.

Reviewers: danielcdh, tejohnson, pcc

Reviewed By: pcc

Subscribers: mehdi_amini, aprantl, inglorion, eraman, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308760 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Bitcode/BitcodeWriter.h
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
test/ThinLTO/X86/distributed_import.ll
test/Transforms/ThinLTOBitcodeWriter/no-type-md.ll
test/Transforms/ThinLTOBitcodeWriter/split.ll