[PATCH] D56015: Allow new comdat symbols to be added as a result of LTO.

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 21 11:52:54 PST 2018


xur added a comment.

In D56015#1339411 <https://reviews.llvm.org/D56015#1339411>, @pcc wrote:

> LTO optimization passes shouldn't be adding new comdats. Any comdats contained in a bitcode file should be explicit in its symbol table so that they get resolved during symbol resolution. So we should probably fix the bug in whichever pass is adding the comdats instead.


Why  LTO optimization passes should not add new comdat variables? 
I don't see a reason for this.

For my use case, I create a comdat variable to encoce PGO instrumentation information (format, version etc) in each module.
I rely linker to pick one definition. This pass is now in lto backend.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56015/new/

https://reviews.llvm.org/D56015





More information about the llvm-commits mailing list