[WebAssembly] Use MachineInstr::setDebugValueUndef
authorHeejin Ahn <aheejin@gmail.com>
Mon, 13 Mar 2023 09:44:47 +0000 (02:44 -0700)
committerHeejin Ahn <aheejin@gmail.com>
Sat, 18 Mar 2023 03:15:01 +0000 (20:15 -0700)
commit4f2401f4f9074548b6de3952a6858aeac2f6950f
tree6048426c4745c79034d818eae69f4b7cd25f2288
parent14f292d00e26cb99909e4d192bc78d7e715ecc8c
[WebAssembly] Use MachineInstr::setDebugValueUndef

When making `DBG_VALUE`/`DBG_VALUE_LIST` instructions undefined, there
is a method that takes care of it so we don't need to do it manually.
This changes the test because previously we are converting
`DBG_VALUE_LIST`s into `DBG_VALUE $noreg` but now we leave
`DBG_VALUE_LIST` but set it to undef by turning all its register
operands `$noreg`. The effect is the same.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D145998
llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
llvm/lib/Target/WebAssembly/WebAssemblyNullifyDebugValueLists.cpp
llvm/test/DebugInfo/WebAssembly/dbg-value-list.ll