[all-commits] [llvm/llvm-project] e9641c: [DebugInfo][InstrRef][2/4] Use subreg substitution...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Thu Jul 1 05:07:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9641c911ef4127da1d98c4e4d37039989e6052b
      https://github.com/llvm/llvm-project/commit/e9641c911ef4127da1d98c4e4d37039989e6052b
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-07-01 (Thu, 01 Jul 2021)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
    A llvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_subreg_substitutions.mir

  Log Message:
  -----------
  [DebugInfo][InstrRef][2/4] Use subreg substitutions in LiveDebugValues

Added in 47c3fe2a22cf, we sometimes need to describe a variable value
substitution with a subregister qualifier, to say that "the value is the
lower 32 bits of this 64 bit register def" for example. That then needs
support during LiveDebugValues to interpret the subregister qualifiers,
which is what this patch adds.

Whenever we encounter a DBG_INSTR_REF and find its value by using a
substitution, collect any subregister qualifiers seen. Then, accumulate the
effects of the qualifiers to work out what offset and what size should be
extracted from the defined register. Finally, for the target ValueIDNum,
extract whatever subregister is in the correct position

Currently, describing a subregister field of a larger value that has been
spilt to the stack, is unimplemented.

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




More information about the All-commits mailing list