[PATCH] D73168: Improvements to call site register worklist

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 03:04:31 PST 2020


dstenb created this revision.
dstenb added reviewers: djtodoro, NikolaPrica, aprantl, vsk.
dstenb added a project: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
dstenb added a parent revision: D73167: Don't separate imp/expl def handling for call site params.

This fixes PR44118. For cases where we have a chain like this:

  R8 = R1 (entry value)
  R0 = R8
  call @foo R0

the code that emits call site entries using entry values would not
follow that chain, instead emitting a call site entry with R8 <https://reviews.llvm.org/source/libcxx/> as
location rather than R0. Such a case was discovered when originally
adding dbgcall-site-orr-moves.mir. This patch fixes that issue. This is
done by changing the ForwardedRegWorklist set to a map in which the
worklist registers always map to the parameter registers that they
describe.

Another thing this patch fixes is that worklist registers now can
describe more than one parameter register at a time. Such a case
occurred in dbgcall-site-interpretation.mir, resulting in a call site
entry not being emitted for one of the parameters.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73168

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-orr-moves.mir
  llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir
  llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73168.239527.patch
Type: text/x-patch
Size: 11591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200122/e6ec31dd/attachment.bin>


More information about the llvm-commits mailing list