[PATCH] D47969: [Verifier] Check that ValueAsMetadata belongs to the module

Vlad Tsyrklevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 14:05:08 PDT 2018


vlad.tsyrklevich added a comment.

In https://reviews.llvm.org/D47969#1129699, @dexonsmith wrote:

> IIRC, sharing uniqued metadata across modules should only happen as a temporary state.  It's a trick for when loading modules that will be merged together, to avoid unnecessarily creating multiple copies of the graphs.
>
> I feel like the verifier should reject this state, unless it's specifically being called in a context where modules-to-be-merged are still being loaded.


The crash noted in the test occurs during cross-module importing, does that count as merging? Both of the modules are independently codegened, not merged together, but there is importing. To me it seems like cross-module references are a temporary state while merging for monolithic LTO, but not a temporary state under ThinLTO.


Repository:
  rL LLVM

https://reviews.llvm.org/D47969





More information about the llvm-commits mailing list