[PATCH] D67500: [DebugInfo] LiveDebugValues: don't create transfer records for potentially invalid locations

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 07:43:15 PDT 2019


jmorse created this revision.
jmorse added reviewers: aprantl, vsk, wolfgangp.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch is the counter-part to D67393 <https://reviews.llvm.org/D67393>, and aims to solve the second problem mentioned there, that transfers which are found to be invalid after location propagation occurs should not be inserted. The solution is simple: just don't record transfers until the in-locations are all known to be correct, and then reprocess all instructions a final time creating transfers.

This involves touching every instruction in the program again, which is unfortunate, but an alternate implementation I wrote adds ~150 lines of code to try and unwind chains of transfers, involving a lot of additional complexity. IMO, this is a reasonable trade-off. As a bonus though, because we don't generate a transfer every time we look at a block, we don't generate redundant identical DBG_VALUEs if we re-visit a block.

There's a fractional reduction in scope-bytes-covered with this patch (<0.1%), all which must have been invalid.

(I'll have some asan-build-time measurements of this in a couple of hours).


Repository:
  rL LLVM

https://reviews.llvm.org/D67500

Files:
  lib/CodeGen/LiveDebugValues.cpp
  test/DebugInfo/MIR/X86/live-debug-values-bad-transfer.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67500.219915.patch
Type: text/x-patch
Size: 10304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190912/551793d6/attachment.bin>


More information about the llvm-commits mailing list