[PATCH] D35334: ThinLTO Minimized Bitcode File Size Reduction

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 18:11:27 PDT 2017


pcc added a comment.

Please add a test that shows that the thinlink files can be read by llvm-lto2.



================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:4031
+
+  writeModuleInfo();
+
----------------
With this call you're emitting a lot of unnecessary information into the minimized bitcode file. As I was suggesting on the other thread I wonder whether you can just emit "short" module-level records that just contain the name and the linkage (maybe see if you can drop the linkage, as it should already be available in the summary).


================
Comment at: test/Transforms/ThinLTOBitcodeWriter/no-type-md.ll:40
 ; CHECK: !llvm.dbg.cu
 ; NODEBUG-NOT: !llvm.dbg.cu
+; NODEBUG-NOT: IDENTIFICATION_BLOCK_ID
----------------
This part of the test is no longer relevant.


================
Comment at: test/Transforms/ThinLTOBitcodeWriter/no-type-md.ll:41
 ; NODEBUG-NOT: !llvm.dbg.cu
+; NODEBUG-NOT: IDENTIFICATION_BLOCK_ID
+; NODEBUG-NOT: BLOCKINFO_BLOCK
----------------
I'd also check what we *are* emitting, not just what we're not emitting.


https://reviews.llvm.org/D35334





More information about the llvm-commits mailing list