[PATCH] D59942: [DebugInfo] Track multiple registers in DbgEntityHistoryCalculator

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 08:59:37 PDT 2019


dstenb created this revision.
dstenb added reviewers: aprantl, probinson, dblaikie, rnk, bjope.
dstenb added a project: debug-info.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When calculating the debug value history, DbgEntityHistoryCalculator
would only keep track of register clobbering for the latest debug value
per inlined entity. This meant that preceding register-described debug
value fragments would live on until the next overlapping debug value,
ignoring any potential clobbering. This patch amends
DbgEntityHistoryCalculator so that it keeps track of all registers that
a inlined entity's currently live debug values are described by.

The DebugInfo/COFF/pieces.ll test case has had to be changed since
previously a register-described fragment would incorrectly outlive its
basic block.

The parent patch is expected to increase the coverage slightly, as it
makes sure that location list entries are inserted after clobbered
fragments, and this patch is expected to decrease it, as it stops
preceding register-described from living longer than they should. All
in all, this patch and the preceding patch has a negligible effect
on the output from `llvm-dwarfdump -statistics' for a clang-3.4 binary
built using the RelWithDebInfo build profile. "Scope bytes covered"
increases by 0.5%, and "variables with location" increases from 2212083
to 2212088, but it should improve the accuracy quite a bit.

This fixes PR40283.


Repository:
  rL LLVM

https://reviews.llvm.org/D59942

Files:
  include/llvm/CodeGen/DbgEntityHistoryCalculator.h
  lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
  test/DebugInfo/COFF/pieces.ll
  test/DebugInfo/MIR/X86/clobbered-fragments.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59942.192648.patch
Type: text/x-patch
Size: 12412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190328/bd07c5d5/attachment-0001.bin>


More information about the llvm-commits mailing list