[all-commits] [llvm/llvm-project] 48f18e: [ThinLTO] Loosen up variable importing correctness...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Tue May 2 07:49:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 48f18ecd8293e7828bf7ae2eeac975785892a0c4
      https://github.com/llvm/llvm-project/commit/48f18ecd8293e7828bf7ae2eeac975785892a0c4
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2023-05-02 (Tue, 02 May 2023)

  Changed paths:
    M llvm/lib/Transforms/IPO/FunctionImport.cpp
    A llvm/test/ThinLTO/X86/check_var_import_odr.ll

  Log Message:
  -----------
  [ThinLTO] Loosen up variable importing correctness checks

After importing variables, we do some checking to ensure that variables
marked read or write only, which have been marked exported (e.g.
because a referencing function has been exported), are on at least one
module's imports list. This is because the read or write only variables
will be internalized, so we need a copy any any module that references
it.

This checking is overly conservative in the case of linkonce_odr or
other linkage types where there can already be a duplicate copy in
existence in the importing module, which therefore wouldn't need to
import it. Loosen up the checking for these linkage types.

Fixes https://github.com/llvm/llvm-project/issues/62468.

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




More information about the All-commits mailing list