[PATCH] D83895: [DebugInfo] Process DBG_VALUE_LIST in LiveDebugVariables

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 11:25:48 PDT 2020


StephenTozer created this revision.
StephenTozer added reviewers: aprantl, probinson, vsk, djtodoro, dblaikie.
StephenTozer added a project: debug-info.
Herald added subscribers: llvm-commits, ormris, hiraditya.
Herald added a project: LLVM.

Continuing the work discussed in the RFC[0], this patch implements DBG_VALUE_LIST handling in the LiveDebugVariables pass.

This is one of the larger pass changes involved with handling DBG_VALUE_LIST, second only to LiveDebugValues, as this pass is involved quite in-depth with debug values. The majority of the changes made here are relatively simple, however, largely falling into two categories:

The largest logical changes take place in `computeIntervals`, `extendDef`, and `addDefsFromCopies`; when extending the def of a DBG_VALUE_LIST the live ranges of every used register must be considered, and when such a def is killed by more than one of its used registers being killed at the same time it is necessary to find valid copies of all of those registers to create a new def with.

Many of the remaining changes concern the interface of DebugVariableValue, which has been modified to support DBG_VALUE_LIST. Besides using a list of location numbers instead of just one, some of the functions have also changed; changeLocNo now requires the old location number that is being replaced, remapLocNos is used when more than one location needs to be changed at once, and decrementLocNosAfterPivot is used to decrement location numbers when a location is deleted and the array indices shift. Also, the constructor of DebugVariableValue is used to remove any duplicate locations in the location list; these are manageable in the instructions themselves, but cause problems with the kind of in-depth analysis that LiveDebugVariables does.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83895

Files:
  llvm/lib/CodeGen/LiveDebugVariables.cpp
  llvm/test/DebugInfo/MIR/X86/dvl-livedebugvars-movements.mir
  llvm/test/DebugInfo/MIR/X86/dvl-livedebugvars-stackptr.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83895.278247.patch
Type: text/x-patch
Size: 47091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200715/fc386be2/attachment.bin>


More information about the llvm-commits mailing list