[all-commits] [llvm/llvm-project] cf3715: [llvm] Change DSOLocalEquivalent type if the under...

Leonard Chan via All-commits all-commits at lists.llvm.org
Tue Mar 9 15:10:28 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf371573b0b841db96df729e5b61c6a6f36c17d2
      https://github.com/llvm/llvm-project/commit/cf371573b0b841db96df729e5b61c6a6f36c17d2
  Author: Leonard Chan <leonardchan at google.com>
  Date:   2021-03-09 (Tue, 09 Mar 2021)

  Changed paths:
    M llvm/lib/IR/Constants.cpp
    M llvm/lib/Transforms/Utils/ValueMapper.cpp
    A llvm/test/Linker/DSOLocalEquivalent.ll
    A llvm/test/Linker/Inputs/DSOLocalEquivalent.ll
    A llvm/test/ThinLTO/X86/DSOLocalEquivalent.ll

  Log Message:
  -----------
  [llvm] Change DSOLocalEquivalent type if the underlying global value type changes

We encountered an issue where LTO running on IR that used the DSOLocalEquivalent
constant would result in bad codegen. The underlying issue was ValueMapper wasn't
properly handling DSOLocalEquivalent, so this just adds the machinery for handling
it. This code path is triggered by a fix to DSOLocalEquivalent::handleOperandChangeImpl
where DSOLocalEquivalent could potentially not have the same type as its underlying GV.

This updates DSOLocalEquivalent::handleOperandChangeImpl to change the type if
the GV type changes and handles this constant in ValueMapper.

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




More information about the All-commits mailing list