[PATCH] D133310: [Assignment Tracking][15/*] Account for assignment tracking in simplifycfg

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 08:20:40 PDT 2022


Orlando created this revision.
Orlando added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Orlando requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

A few of the changes in this patch update the behaviour from "delete debug intrinsics" to "move dbg.assigns to a new block and set them to undef". There's an argument that we could just keep the existing behaviour in these cases and accept that occasionally we will lose some debug info accuracy, for the sake of fewer special cases in llvm. Furthermore, we can't / don't always perform the "move + undef", such as in the case of `DeleteDeadBlocks`. There we do indeed just delete them for the sake of practicality. I don't particularly like this inconsistency, but it might just be the kind of thing we need to decide on a case by case basis.

---

I'd be keen to hear what others think about this one as I don't have a strong gut feeling for what is best, overall.


https://reviews.llvm.org/D133310

Files:
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/empty-block.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/phi-fold.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/sink-erase.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/sink-gep.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133310.457970.patch
Type: text/x-patch
Size: 39276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220905/347c9cb3/attachment-0001.bin>


More information about the llvm-commits mailing list