[all-commits] [llvm/llvm-project] 1de516: [StackColoring] Pre-commit of test case showing a ...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Tue Sep 14 10:25:16 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1de516d7ae7e568a0ae28b79d2a91521bff79689
      https://github.com/llvm/llvm-project/commit/1de516d7ae7e568a0ae28b79d2a91521bff79689
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2021-09-14 (Tue, 14 Sep 2021)

  Changed paths:
    A llvm/test/CodeGen/X86/StackColoring-dbg-invariance.mir

  Log Message:
  -----------
  [StackColoring] Pre-commit of test case showing a debug invariance bug

Having DBG_VALUE instructions referencing a stack slot while being outside
of the LIFETIME_START/LIFETIME_END markers for that stack slot is perhaps
not always ideal (from a debugging perspective), but it might happen during
codegen that we end up with such situations (e.g. positioning of the
DBG_VALUE instruction for a SDDbgOperand::FRAMEIX at ISel is a bit sloppy
in that context).

This patch adds a test case showing that StackColoring currently isn't
debug invariant, and that the position of DBG_VALUE instructions referencing
the stack slots might impact the decision making regarding stack slot reuse.

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


  Commit: cd2bff1ef10563bc710ca7a97aeb20297fc99597
      https://github.com/llvm/llvm-project/commit/cd2bff1ef10563bc710ca7a97aeb20297fc99597
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2021-09-14 (Tue, 14 Sep 2021)

  Changed paths:
    M llvm/lib/CodeGen/StackColoring.cpp
    M llvm/test/CodeGen/X86/StackColoring-dbg-invariance.mir

  Log Message:
  -----------
  [StackColoring] Fix a debug invariance problem

Ignore dbg instructions when collecting stack slot markers. This is
to make sure the coloring is invariant regarding presence of dbg
instructions (even in cases when the dbg instructions might be
badly placed in the input).

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


Compare: https://github.com/llvm/llvm-project/compare/d79bb30dbb08...cd2bff1ef105


More information about the All-commits mailing list