[PATCH] D151125: [WebAssembly] Undef invalid DBG_VALUEs after RegColoring

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 16:29:55 PDT 2023


dschuff added inline comments.


================
Comment at: llvm/test/DebugInfo/WebAssembly/dbg-value-reg-coloring.mir:55
+    ; This should be set to undef, because this is within %0's live range
+    DBG_VALUE %1, $noreg, !5, !DIExpression(), debug-location !10
+    CALL @use, %0, implicit-def $arguments
----------------
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...


================
Comment at: llvm/test/DebugInfo/WebAssembly/dbg-value-reg-coloring.mir:57
+    CALL @use, %0, implicit-def $arguments
+    NOP implicit-def $arguments
+    %1:i32 = CONST_I32 1, implicit-def $arguments
----------------
why are the NOPs here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151125/new/

https://reviews.llvm.org/D151125



More information about the llvm-commits mailing list