[PATCH] D49362: [ThinLTO] Internalize read only globals

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 07:58:30 PST 2018


tejohnson added a comment.

In https://reviews.llvm.org/D49362#1292907, @evgeny777 wrote:

> Oh, my bad. `opt -function-import` gets index from `llvm-lto2`, not from `opt -thinlto-bc`. Sorry about that
>
> However, there is still a small problem:
>
> In `FunctionImport/funcimport.ll` we use index from `llvm-lto -thinlto`, for which propagateConstants hasn't been run. This results in internalizing `P.llvm.0`, which shouldn't happen, because it's writeable (from setfunc)


Ok that makes sense.

> Can such thing occur in real life (i.e we use index from `llvm-lto -thinlto` in distrivuted build)?

Nope, that's just a testing config. So your follow on fix seems fine to fix that.


https://reviews.llvm.org/D49362





More information about the llvm-commits mailing list