[PATCH] D73094: [WPD] Allow load/save bitcoded index when running opt -wholeprogramdevirt

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 09:36:48 PST 2020


tejohnson added a comment.

In D73094#1834139 <https://reviews.llvm.org/D73094#1834139>, @evgeny777 wrote:

> > Would it be worthwhile to add some checking in somewhere that there are no locals in the index read by opt?
>
> Probably we can assert on `!isLocalLinkage(FS->linkage())` when analyzing ExportSummary in DevirtModule::run.


You can't just always assert that during WPD though, only those locals used by the importing ThinLTO module are promoted when splitting. See promoteInternals() in ThinLTOBitcodeWriter.cpp. So it might be better to do any checking in opt itself, after reading the index, essentially to enforce that we cannot guarantee that any locals are handled as expected in this testing mode.

> Another option is to check presence of regular LTO module in combined index when reading summary.

This sounds like a good idea too.


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

https://reviews.llvm.org/D73094





More information about the llvm-commits mailing list