[PATCH] D35334: ThinLTO Minimized Bitcode File Size Reduction

Haojie Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 16:12:24 PDT 2017


haojiewang added inline comments.


================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:114
   /// True if a module hash record should be written.
   bool GenerateHash;
 
----------------
pcc wrote:
> I think we can move this into the derived class now, together with Hasher and addToStrtab.
Oh, sure. But I think this change will require a new addToStrtab for ThinLinkBitcodeWriter, which only add the str to StrtabBuilder without update GenerateHash.


================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:124
   /// be used in the backend.
   ModuleHash *ModHash;
 
----------------
pcc wrote:
> I think this change removes the need to support writing a module with a precomputed hash from ModuleBitcodeWriter. Can you please remove that functionality?
Writing a module with a precomputed hash is still needed while split writing a module(splitAndWriteThinLTOBitcode), because I didn't touch the split writing in this patch. Maybe I should also change the writer in split writing? 


https://reviews.llvm.org/D35334





More information about the llvm-commits mailing list