[all-commits] [llvm/llvm-project] 6cb66e: [RemoveDIs][DebugInfo] Handle RAUW from dead const...

Stephen Tozer via All-commits all-commits at lists.llvm.org
Wed Feb 7 05:07:08 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6cb66ee5f8827040c5178fc2a479c138f4838eca
      https://github.com/llvm/llvm-project/commit/6cb66ee5f8827040c5178fc2a479c138f4838eca
  Author: Stephen Tozer <stephen.tozer at sony.com>
  Date:   2024-02-07 (Wed, 07 Feb 2024)

  Changed paths:
    M llvm/lib/IR/DebugProgramInstruction.cpp
    M llvm/lib/IR/Metadata.cpp

  Log Message:
  -----------
  [RemoveDIs][DebugInfo] Handle RAUW from dead constants (#80837)

Ensure that when a constant value dies, all ValueAsMetadata uses of that
constant in a DebugValueUser will be replaced with a PoisonValue instead
of a nullptr. This has little visible effect currently, as any nullptr metadata
uses in a DebugValueUser would be converted to an empty MDNode in
the end anyway, but this patch adds an assert that would be triggered by
two existing tests without the functional component of this patch:

  llvm/test/Transforms/Inline/delete-function-with-metadata-use.ll
  llvm/test/DebugInfo/X86/array2.ll




More information about the All-commits mailing list