[llvm] [DebugInfo][RemoveDIs] Handle non-instr debug-info in GlobalISel (PR #75228)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 06:40:46 PST 2024


================
@@ -162,7 +162,8 @@ class DILocationVerifier : public GISelChangeObserver {
     // they could have originated from constants, and we don't want a jumpy
     // debug experience.
     assert((CurrInst->getDebugLoc() == MI.getDebugLoc() ||
-            (MI.getParent()->isEntryBlock() && !MI.getDebugLoc())) &&
+            (MI.getParent()->isEntryBlock() && !MI.getDebugLoc()) ||
+            (MI.isDebugInstr())) &&
----------------
jmorse wrote:

I came back to this (after a while) and prototyped something, however I'm feeling that this is too tricky. Specifically, as long as we have debug intrinsics (like dbg.label, for at least the next two weeks...) they can have DPValues attached to the front of them, which will translate into multiple debug instructions, only one of which we would want to check. IMO, while this might have been an easy and useful assertion in the past, now that we're making debug-info "something else" it's too difficult to keep checking that.

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


More information about the llvm-commits mailing list