[all-commits] [llvm/llvm-project] 2bf496: [LiveDebugValues] Do not insert DBG_VALUEs after a...

Vedant Kumar via All-commits all-commits at lists.llvm.org
Tue Mar 3 13:01:00 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bf496620cbb52f918b24bfa4283f5712fb3b937
      https://github.com/llvm/llvm-project/commit/2bf496620cbb52f918b24bfa4283f5712fb3b937
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2020-03-03 (Tue, 03 Mar 2020)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues.cpp
    M llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir

  Log Message:
  -----------
  [LiveDebugValues] Do not insert DBG_VALUEs after a MBB terminator

This fixes a miscompile that happened because a DBG_VALUE interfered
with the MachineOutliner's liveness analysis.

Inserting a DBG_VALUE after a terminator breaks predicates on MBB such
as isReturnBlock(). And the resulting DBG_VALUE cannot be "live".

I plan to introduce a MachineVerifier check for this situation in a
follow up.

rdar://59859175

Testing: check-llvm, LNT build with a stage2 compiler & entry values
enabled

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




More information about the All-commits mailing list