[PATCH] D86814: [DebugInstrRef][3/3] Follow DBG_PHI instructions through LiveDebugValues.

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 08:41:12 PDT 2021


jmorse updated this revision to Diff 354909.
jmorse added a comment.

Replaced the uint64_t for block incoming values with a BlockValueNum typedef -- sadly we can't use something more robust as SSAUpdater expects it to be an integer. It'll be useful to distinguish between the other competing value numbers in this file though, including the instruction number that comes in to resolveDbgPHIs.

IMO the assumption about resolved PHIs only occurring in the "original" register location of the PHI shouldn't be asserted. If LLVM does create code that violates this assumption, the safe thing to do is drop the variable location, rather than crash. It's possible we'll end up scanning for un-necessarily dropped locations in the future and decide to develop it further.

~

(Insert suspicious eyes here) On the landing front, given the review; that this is all hidden behind the -fexperimental-debug-variable-locations flag; and all the source in the file was originally written by me anyway;, I'll press ahead with landing shortly. This patch was fairly niche anyway, and none of it is going to be exposed to "real" users without some very thorough testing first.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86814/new/

https://reviews.llvm.org/D86814

Files:
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
  llvm/test/DebugInfo/MIR/InstrRef/dbg-phis-in-ldv.mir
  llvm/test/DebugInfo/MIR/InstrRef/dbg-phis-merging-in-ldv.mir
  llvm/test/DebugInfo/MIR/InstrRef/dbg-phis-with-loops.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86814.354909.patch
Type: text/x-patch
Size: 52999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210628/a6bf0795/attachment.bin>


More information about the llvm-commits mailing list