[all-commits] [llvm/llvm-project] cc1e87: [DebugInfo][InstrRef] Avoid stack-slot-coloring ch...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Aug 25 04:32:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc1e87bf55e73e769e96e6cc3fcfc69f88d94097
      https://github.com/llvm/llvm-project/commit/cc1e87bf55e73e769e96e6cc3fcfc69f88d94097
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2021-08-25 (Wed, 25 Aug 2021)

  Changed paths:
    M llvm/lib/CodeGen/StackSlotColoring.cpp
    A llvm/test/DebugInfo/MIR/InstrRef/stack-coloring-dbg-phi.mir

  Log Message:
  -----------
  [DebugInfo][InstrRef] Avoid stack-slot-coloring changing codegen due to DI

Stack slot colouring adds "weight" to slots if a non-dbg-value instruction
refers to it. This, unfortunately, means that DBG_PHI instructions can have
an effect on codegen. The fix is very simple, replace isDebugValue with
isDebugInstr.

The regression test contains a scenario that reproduces this problem; I've
represented both normal-debug mode and instr-ref debug mode instructions
in comment lines prefixed with AAAAAA and BBBBBB, and un-comment them with
sed to test that the two different modes produce the same behaviour.

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




More information about the All-commits mailing list