[all-commits] [llvm/llvm-project] d98fc6: [SimplifyCFG] Keep !dgb metadata of moved instruct...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Jan 9 11:15:57 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d98fc62ae68cd7e96bf6e85b7fbbee969cec9aa7
      https://github.com/llvm/llvm-project/commit/d98fc62ae68cd7e96bf6e85b7fbbee969cec9aa7
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-01-09 (Sat, 09 Jan 2021)

  Changed paths:
    M llvm/docs/HowToUpdateDebugInfo.rst
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/fold-debug-location.ll

  Log Message:
  -----------
  [SimplifyCFG] Keep !dgb metadata of moved instruction, if they match.

Currently SimplifyCFG drops the debug locations of 'bonus' instructions.
Such instructions are moved before the first branch. The reason for the
current behavior is that this could lead to surprising debug stepping,
if the block that's folded is dead.

In case the first branch and the instructions to be folded have the same
debug location, this shouldn't be an issue and we can keep the debug
location.

Reviewed By: vsk

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




More information about the All-commits mailing list