[PATCH] D71283: [WIP][DebugInfo][MachineSink] Preserve DBG_VALUE subregisters when sinking

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 09:13:55 PST 2019


jmorse created this revision.
jmorse added a reviewer: uabelho.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
jmorse added a parent revision: D71279: [DebugInfo][MachineSink] Don't stop copy-propagating DBG_VALUEs that will have a sunk copy created.

When sinking DBG_VALUEs, we were creating the new sunk DBG_VALUE by copying the old one. Unfortunately, it turns out that in the meantime copy propagation can significantly alter the old one, for example by changing the subregister it refers to.

Avoid any risk of sunk DBG_VALUEs picking up later subregister information, by storing the original (TM) subregister in the sink record.

This is WIP because the added test case _used_ to be failing, but now isn't for some reason. I'd like to share it with @uabelho who's reporting this problem happening downstream, to see whether I'm barking up the right tree before analysing further.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71283

Files:
  llvm/lib/CodeGen/MachineSink.cpp
  llvm/test/DebugInfo/MIR/X86/machinesink.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71283.233119.patch
Type: text/x-patch
Size: 5510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191210/87ab7edf/attachment.bin>


More information about the llvm-commits mailing list