[all-commits] [llvm/llvm-project] e2196d: [DebugInfo] Process DBG_VALUE_LIST in LiveDebugValues

Stephen Tozer via All-commits all-commits at lists.llvm.org
Tue Mar 9 10:59:22 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e2196ddcdbf13aa1051e0150036e103d23a03f13
      https://github.com/llvm/llvm-project/commit/e2196ddcdbf13aa1051e0150036e103d23a03f13
  Author: gbtozers <stephen.tozer at sony.com>
  Date:   2021-03-09 (Tue, 09 Mar 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
    A llvm/test/DebugInfo/MIR/X86/dvl-livedebugvalues-clobber.mir
    A llvm/test/DebugInfo/MIR/X86/dvl-livedebugvalues-join.mir
    A llvm/test/DebugInfo/MIR/X86/dvl-livedebugvalues-movements.mir
    A llvm/test/DebugInfo/MIR/X86/dvl-livedebugvalues-spillrestore.mir

  Log Message:
  -----------
  [DebugInfo] Process DBG_VALUE_LIST in LiveDebugValues

This patch implements DBG_VALUE_LIST handling to the LiveDebugValues pass. This
is a substantial change, and makes a few fundamental changes to the existing
logic.

We still use the basic model of a VarLocMap that is indexed by a LocIndex, with
a VarLocSet (a CoalescingBitVector underneath) giving us efficient lookups of
existing variable locations for a given location type. The main change is that
the VarLocMap may contain a given VarLoc multiple times (once for each unique
location operand), so that a VarLoc can be looked up from any of the registers
that it uses. This means that each VarLoc has multiple corresponding LocIndexes;
to allow us to iterate through the set of VarLocs (previously we would iterate
through the VarLocSet), we now also maintain a single entry in the VarLocMap
that contains every VarLoc exactly once.

The VarLoc class itself is also changed; this change is much simpler,
refactoring out location-specific members into a MachineLocation class and
adding a vector of these locations.

Differential Revision: https://reviews.llvm.org/D83890




More information about the All-commits mailing list