[all-commits] [llvm/llvm-project] e420c0: [ThinLTO] Fix importing of writeonly variables in ...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Wed Dec 4 14:59:45 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e420c0c78eb0700989c8ba80e845b6306d66bb5f
      https://github.com/llvm/llvm-project/commit/e420c0c78eb0700989c8ba80e845b6306d66bb5f
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
    M llvm/test/ThinLTO/X86/index-const-prop2.ll
    M llvm/test/ThinLTO/X86/writeonly-with-refs.ll
    M llvm/test/ThinLTO/X86/writeonly.ll
    M llvm/test/ThinLTO/X86/writeonly2.ll

  Log Message:
  -----------
  [ThinLTO] Fix importing of writeonly variables in distributed ThinLTO

Summary:
D69561/dde5893 enabled importing of readonly variables with references,
however, it introduced a bug relating to importing/internalization of
writeonly variables with references.

A fix for this was added in D70006/7f92d66. But this didn't work in
distributed ThinLTO mode. The reason is that the fix (importing the
writeonly var with a zeroinitializer) was only applied when there were
references on the writeonly var summary. In distributed ThinLTO mode,
where we only have a small slice of the index, we will not have the
references on the importing side if we are not importing those
referenced values. Rather than changing this handshaking (which will
require a lot of other changes, since that's how we know what to import
in the distributed backend clang invocation), we can simply always give
the writeonly variable a zero initializer.

Reviewers: evgeny777, steven_wu

Subscribers: mehdi_amini, inglorion, hiraditya, dexonsmith, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70977




More information about the All-commits mailing list