[all-commits] [llvm/llvm-project] 1e4079: [DebugInfo] Teach LDV how to handle identical vari...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Tue Feb 11 02:26:07 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e4079932436474d6a358637e47b8da5b73f1947
      https://github.com/llvm/llvm-project/commit/1e4079932436474d6a358637e47b8da5b73f1947
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2020-02-11 (Tue, 11 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugVariables.cpp
    A llvm/test/DebugInfo/X86/live-debug-vars-intervals.mir
    M llvm/test/tools/llvm-locstats/locstats.ll

  Log Message:
  -----------
  [DebugInfo] Teach LDV how to handle identical variable fragments

LiveDebugVariables uses interval maps to explicitly represent DBG_VALUE
intervals. DBG_VALUEs are filtered into an interval map based on their {
Variable, DIExpression }. The interval map will coalesce adjacent entries that
use the same { Location }.  Under this model, DBG_VALUEs which refer to the same
bits of the same variable will be filtered into different interval maps if they
have different DIExpressions which means the original intervals will not be
properly preserved.

This patch fixes the problem by using { Variable, Fragment } to filter the
DBG_VALUEs into maps, and coalesces adjacent entries iff they have the same
{ Location, DIExpression } pair.

The solution is not perfect because we see the similar issues appear when
partially overlapping fragments are encountered, but is far simpler than a
complete solution (i.e. D70121).

Fixes: pr41992, pr43957
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D74053


  Commit: 3aa33fde03d139a19b4e6182e9d4c865b240218c
      https://github.com/llvm/llvm-project/commit/3aa33fde03d139a19b4e6182e9d4c865b240218c
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2020-02-11 (Tue, 11 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugVariables.cpp

  Log Message:
  -----------
  [DebugInfo][NFC] Rename the class DbgValueLocation to DbgVariableValue

Rename the class DbgValueLocation to DbgVariableValue and instances from Loc to
DbgValue. These names better express the new semantics introduced in D74053.

The class previously represented a { Location } only. It now represents a
{ Location, DIExpression } pair which together describe a value.

Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D74055


  Commit: 35e0ab647bfcb904057ce97f3c449e7e4845f672
      https://github.com/llvm/llvm-project/commit/35e0ab647bfcb904057ce97f3c449e7e4845f672
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2020-02-11 (Tue, 11 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugVariables.cpp

  Log Message:
  -----------
  [DebugInfo][NFC] Fixup the UserValue methods to use FragmentInfo

Fixup the UserValue methods to use FragmentInfo instead of DIExpression because
the DIExpression is only ever used to get the to get the FragmentInfo. The
DIExpression is meaningless in the UserValue class because each definition point
added to a UserValue may have a unique DIExpression.

Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D74057


Compare: https://github.com/llvm/llvm-project/compare/edbaa7fc0467...35e0ab647bfc


More information about the All-commits mailing list