[PATCH] D33921: Write summaries for merged modules when splitting modules for ThinLTO.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 15:46:01 PDT 2017
pcc added inline comments.
================
Comment at: llvm/include/llvm/Bitcode/LLVMBitCodes.h:59
+
+ FULL_LTO_GLOBALVAL_SUMMARY_BLOCK_ID,
};
----------------
tejohnson wrote:
> Why use a different block ID? Since we are marking the module with a module flag, it doesn't seem necessary, and appears to be handled the same. I see your follow-on patch does something different based on the block id, but could/should that check the module flag instead?
Because of how module flags are represented, they are hard to read directly out of bitcode. In general it would require parsing the entire metadata block, which is something that we should try to avoid doing on the linker's critical path. The simplest approach is to somehow store a "summary" of this particular module flag elsewhere in the bitcode, as I am doing here.
https://reviews.llvm.org/D33921
More information about the llvm-commits
mailing list