[PATCH] D53139: [ThinLTO] Don't import GV which contains blockaddress

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 07:52:09 PDT 2018


evgeny777 created this revision.
evgeny777 added a reviewer: tejohnson.
Herald added subscribers: dexonsmith, steven_wu, eraman, inglorion, mehdi_amini.

PR39241 uncovered an interesting problem with importing global variables containing `blockaddress`. Such variables can be imported only with function(s) referenced by `blockaddress` statements. As this is hard to check, I suggest simpler fix which does the following:

- Marks all GVs which contain `blockaddrss` statement as "not eligible to import".
- Instead of checking for dummy module in `computeImportForReferencedGlobals` check "not eligible to import" flag. This shouldn't break things as everything in non-thinlto module is marked as not eligible to import.


https://reviews.llvm.org/D53139

Files:
  lib/Analysis/ModuleSummaryAnalysis.cpp
  lib/Transforms/IPO/FunctionImport.cpp
  test/ThinLTO/X86/Inputs/globals-import-blockaddr.ll
  test/ThinLTO/X86/globals-import-blockaddr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53139.169208.patch
Type: text/x-patch
Size: 4431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181011/83e199f0/attachment.bin>


More information about the llvm-commits mailing list