[all-commits] [llvm/llvm-project] 56b6b4: [mlir][LLVM] Use `undef` operand instead of removi...

Markus Böck via All-commits all-commits at lists.llvm.org
Thu Jul 6 06:42:06 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 56b6b45472cd2532d60b20c42fb41b7d27b1f956
  Author: Markus Böck <markus.bock+llvm at nextsilicon.com>
  Date:   2023-07-06 (Thu, 06 Jul 2023)

  Changed paths:
    M mlir/lib/Dialect/LLVMIR/IR/LLVMMemorySlot.cpp
    M mlir/test/Dialect/LLVMIR/mem2reg-dbginfo.mlir

  Log Message:
  [mlir][LLVM] Use `undef` operand instead of removing `llvm.intr.dbg.value`

Jeremy Morse noted in D154451 that LLVM doesn't drop a `dbg.value` when its value is being removed, but rather sets the operand to `undef`. This preserves the debug info and gives allows the debugger to instead inform the user that the variable has been optimized out, rather than not displaying the variable at all.

This patch fixes that mistake done in the previous revision by mirroring that behaviour in MLIR as well.

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

More information about the All-commits mailing list