[llvm] [ISelDAG] Salvage debug info at isel by referring to frame indices. (PR #109126)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 08:43:52 PDT 2024


https://github.com/OCHyams commented:

Thanks for the patch. Overall, LGTM with some minor nits.

At first I was confused about why the current behaviour doesn't cause any bugs, for future/others: without the patch the salvaged SDDbgValue refers to the the FrameIndex node (as an SDDbgOperand::SDNODE), and when that FrameIndex node gets removed later the operand gets replaced with undef. Note that when the FrameIndex node gets removed it goes through `salvageDebugInfo` too... which makes me wonder whether there's a more general solution we can add here? e.g., rather than calling `handle`, can we just handle salvaging of FrameIndex nodes independently. That is just speculation, no need to apply in this patch imo - not sure of all the consequences off the top of my head.




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


More information about the llvm-commits mailing list