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

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 07:25:35 PST 2023


================
@@ -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())) &&
----------------
SLTozer wrote:

Minor point, but is this a good guarantee to drop? I assume that this condition isn't true when we translate DPValues, because MI is a debug instruction corresponding to the DPV, and CurrInst is unrelated, but this also drops all checks that DebugLocs for debug instructions are translated correctly. Maybe that translation is trivial enough that we don't care about verifier coverage though - it looks it!

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


More information about the llvm-commits mailing list