[all-commits] [llvm/llvm-project] a19629: Reapply 215b8f1e252, reverted in c3f7fb1421e

Jeremy Morse via All-commits all-commits at lists.llvm.org
Thu Jan 25 10:38:02 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a19629dae70c9f7e7936eba7aa1e0a3a99742288
      https://github.com/llvm/llvm-project/commit/a19629dae70c9f7e7936eba7aa1e0a3a99742288
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2024-01-25 (Thu, 25 Jan 2024)

  Changed paths:
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/IR/LegacyPassManager.cpp
    M llvm/lib/Linker/IRMover.cpp
    M llvm/lib/Transforms/Utils/ValueMapper.cpp
    M llvm/test/LTO/X86/pr38046.ll
    M llvm/test/Linker/debug-info-use-before-def.ll
    M llvm/test/Linker/thinlto_funcimport_debug.ll
    M llvm/test/ThinLTO/X86/debuginfo-cu-import.ll
    M llvm/test/ThinLTO/X86/pr35472.ll
    M llvm/tools/llvm-link/llvm-link.cpp
    M llvm/tools/llvm-lto/llvm-lto.cpp
    M llvm/tools/llvm-lto2/llvm-lto2.cpp

  Log Message:
  -----------
  Reapply 215b8f1e252, reverted in c3f7fb1421e

Turns out I was using DbgMarker::getDbgValueRange rather than the helper
utility in Instruction::getDbgValueRange, which checks for null-ness.
Original commit message follows.

[DebugInfo][RemoveDIs] Convert debug-info modes when loading bitcode (#78967)

As part of eliminating debug-intrinsics in LLVM, we'll shortly be
pushing the conversion from "old" dbg.value mode to "new" DPValue mode
out from when the pass manager runs, to when modules are loaded. This
patch adds that conversion process and some (temporary) options to
llvm-lto{,2} to help test it.

Specifically: now whenever we load a bitcode module, consider a flag of
whether to "upgrade" it into the new debug-info mode, and if we're
lazily materializing functions then do that lazily too. Doing this
exposes an error in the IRLinker/materializer handling of DPValues,
where we need to transfer the debug-info format flag correctly, and in
ValueMapper we need to remap the Values that DPValues point at.

I've added some test coverage in the modified tests; these will be
exercised by our llvm-new-debug-iterators buildbot.

This upgrading of debug-info won't be happening for the llvm18 release,
instead we'll turn it on after the branch date, thenbe push the boundary
of where "new" debug-info starts and ends down into the existing
debug-info upgrade path over the course of the next release.




More information about the All-commits mailing list