[all-commits] [llvm/llvm-project] 186695: [DebugInfo][RemoveDIs] Cope with instructions movi...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Tue Dec 5 06:05:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 186695929db632b057334757923d1cab1aa395ca
      https://github.com/llvm/llvm-project/commit/186695929db632b057334757923d1cab1aa395ca
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2023-12-05 (Tue, 05 Dec 2023)

  Changed paths:
    M llvm/lib/IR/Instruction.cpp
    M llvm/unittests/IR/BasicBlockDbgInfoTest.cpp

  Log Message:
  -----------
  [DebugInfo][RemoveDIs] Cope with instructions moving after themselves (#74113)

We occasionally move instructions to their own positions, which is not
an error, and has no effect on the program. However, if dbg.value
intrinsics are present then they can effectively be moved without any
other effect on the program.

This is a problem if we're using non-instruction debug-info: a moveAfter
that appears to be a no-op in RemoveDIs mode can jump in front of
intrinsics in dbg.value mode. Thus: if an instruction is moved to itself
and the head bit is set, force attached debug-info to shift down one
instruction, which replicates the dbg.value behaviour.




More information about the All-commits mailing list