After register coalescing, some DBG_VALUEs can have incorrect info.
For example, if a DBG_VALUE has a register operand %0, but it
resides in a live range of %1, it has incorrect info after %0 and
%1 are coalesced. See the comments for more details.
This does not have meaningful changes on our variable debug info
coverage or compilation time, which is good news.
here's is a question to make sure I understand what's going on:
Because the live ranges of %0 and %1 don't overlap, they get coalesced (let's call the resulting wasm local local0). So if we left the DBG_VALUE in, the DWARF would say that local0 contains the value of %1 here even though it still contains %0. Hence we just undef it out.
Would it also be correct to move the DBG_VALUE down to below (or above?) the CONST instruction that materializes it? would that help in practice or is there usually just another DBG_VALUE for the same value?
I guess if you said this CL doesn't meaningfully move the coverage metric, then the answer is that it it doesn't matter much in practice...