[PATCH] D151419: [DebugInfo][RemoveDIs] Eliminate some debug-intrinsics-affect-codegen errors

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 13:41:23 PDT 2023


jmorse added a comment.

In D151419#4406678 <https://reviews.llvm.org/D151419#4406678>, @probinson wrote:

> IIUC you're wanting to not add new tests that check for correct intrinsic-call placement, on the grounds that intrinsics are going away and those tests would ultimately be deleted.

Slight difference -- all the changes in this specific patch are for DebugLocs, to avoid "real" instructions setting their locations from debug-instructions. That legitimately will be designed away,

> If the tests are deleted, then how do we verify that the debug info (in its new form) is correct? The transforms will still transform the IR, and it would be very helpful when trying to track down future debug-info bugs if we still have a way to follow what the brave new world has in it. -dump-after-all is pretty handy in some of these cases, but if it stops showing debug info then future bug analysis may become much more difficult.

I agree with the overall point that we need to preserve and improve testing of the placement of variable location debug-info, no matter the format. As it stands, in all the patches produced so far, there's a 1 <=> 1 correspondence between dbg.value intrinsics and the new forms we've been experimenting on, so that the two formats can be trivially switched between, and the existing tests can all work. We've also instrumented the printing-passes and asm writers to always write out dbg.values. IMO: that should continue to be the case through all this development, until we get to a discussion on how to textually represent this information, as that lets us talk purely about how to implement (and test) optimisations rather than everything else.


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

https://reviews.llvm.org/D151419



More information about the llvm-commits mailing list