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

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 08:19:49 PST 2020


evgeny777 updated this revision to Diff 239908.
evgeny777 added a comment.

Added check for regular LTO module in combined summary

> 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

After some experiments this seems useless to me. Given combined summary I can try identifying local virtual functions using this approach:

1. Call ModuleSummaryIndex::collectDefinedFunctionsForModule("[Regular LTO]", ...)
2. Given GUID of virtual function locate all summaries across all modules
3. Check that neither of those summaries has local linkage

But what's the point? Even if I find such summary this most likely means that either ThinLTOBitcodeWriter is broken or index is intentionally modified.


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

https://reviews.llvm.org/D73094

Files:
  llvm/include/llvm/IR/ModuleSummaryIndex.h
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
  llvm/test/Transforms/WholeProgramDevirt/Inputs/devirt-bad-index.ll
  llvm/test/Transforms/WholeProgramDevirt/Inputs/devirt-single-impl2-index.ll
  llvm/test/Transforms/WholeProgramDevirt/devirt-single-impl2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73094.239908.patch
Type: text/x-patch
Size: 11032 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200123/d5f6e1c0/attachment.bin>


More information about the llvm-commits mailing list