[PATCH] D83468: [Debuginfo] Fix for PR46653

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 17:11:25 PDT 2020


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2183
   CurBuilder->setDebugLoc(Inst.getDebugLoc());
-  // We only emit constants into the entry block from here. To prevent jumpy
-  // debug behaviour set the line to 0.
-  if (const DebugLoc &DL = Inst.getDebugLoc())
-    EntryBuilder->setDebugLoc(
-        DebugLoc::get(0, 0, DL.getScope(), DL.getInlinedAt()));
-  else
-    EntryBuilder->setDebugLoc(DebugLoc());
+  EntryBuilder->setDebugLoc(DebugLoc());
 
----------------
aemerson wrote:
> So...you deleted the previous code here to prevent jumpy debug behavior. How does the new code address that problem?
On further thought, I think we can probably do better here in general to preserve more debug info. SelectionDAG doesn't drop or zero the loc for the global value reference, so we should be able to keep it too.


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

https://reviews.llvm.org/D83468





More information about the llvm-commits mailing list