[MachineVerifier] Verify that a DBG_VALUE has a debug location
authorVedant Kumar <vsk@apple.com>
Wed, 27 May 2020 22:44:10 +0000 (15:44 -0700)
committerVedant Kumar <vsk@apple.com>
Thu, 28 May 2020 20:53:40 +0000 (13:53 -0700)
commit4855534d10cea3dd93d33da13ceb3381b0c588e6
tree108ad55aff7e9039b309c92635de8e90c0fd3bfe
parent0aa201eaf97681f59b72baee6552aa1b9b5c9129
[MachineVerifier] Verify that a DBG_VALUE has a debug location

Summary:
Verify that each DBG_VALUE has a debug location. This is required by
LiveDebugValues, and perhaps by other late passes.

There's an exception for tests: lots of tests use a two-operand form of
DBG_VALUE for convenience. There's no reason to prevent that.

This is an extension of D80665, but there's no dependency.

Reviewers: aprantl, jmorse, davide, chrisjackson

Subscribers: hiraditya, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80670
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/test/CodeGen/Hexagon/early-if-debug.mir
llvm/test/CodeGen/MIR/Generic/dbg-value-missing-loc.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/X86/instructions-debug-location.mir
llvm/test/CodeGen/MIR/X86/metadata-operands.mir
llvm/test/CodeGen/RISCV/select-optimize-multiple.mir
llvm/test/CodeGen/X86/machine-cp-debug.mir
llvm/test/CodeGen/X86/pr38952.mir