[llvm] [MachineSink] Drop debug info for instructions deleted by sink-and-fold (PR #71443)

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 03:04:23 PST 2023


momchil-velikov wrote:

Thanks for looking at it!

> In the meantime, disabling this update to fix a compile-time regression seems fine. Presumably the instruction defining the vreg is deleted, so all the DBG_VALUEs will refer to a not-defined vreg, and will be undef'd at regalloc time in LiveDebugVariables? It might be clearer (and easier to test) to explicitly set the seen DBG_VALUEs to be $noreg as part of this patch.

That was added in the initial patch, because some instructions get folded into the addressing mode in which case we in fact do not have a named location that hold the value.

https://github.com/llvm/llvm-project/blob/18bb9725619569687bec2c013768511105266a5e/llvm/lib/CodeGen/MachineSink.cpp#L565



https://github.com/llvm/llvm-project/pull/71443


More information about the llvm-commits mailing list