[all-commits] [llvm/llvm-project] 253f4b: [mlir][LLVM] drop `llvm.intr.dbg.value` when promo...

Markus Böck via All-commits all-commits at lists.llvm.org
Tue Jul 4 08:16:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 253f4bfa87f30c6c4def3801fc1bce7b130a8795
      https://github.com/llvm/llvm-project/commit/253f4bfa87f30c6c4def3801fc1bce7b130a8795
  Author: Markus Böck <markus.bock+llvm at nextsilicon.com>
  Date:   2023-07-04 (Tue, 04 Jul 2023)

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

  Log Message:
  -----------
  [mlir][LLVM] drop `llvm.intr.dbg.value` when promoting in `SROA` or `mem2reg`

This has previously been done for `llvm.intr.dbg.declare`, which is a common occurrence when the debug info points to the variable through the pointer, but may also occur when the `alloca` itself is a local variable in debug info.

Not doing so prevents `SROA` and `mem2reg` from promoting e.g. an `alloca`. We simply drop the value completetly, since there is no meaninful debug info that can be constructed instead as the pointer value is removed.

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




More information about the All-commits mailing list