[PATCH] D83468: [Debuginfo] Fix for PR46653

Jaydeep Chauhan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 11:54:29 PDT 2020


Jac1494 added a comment.

In D83468#2236798 <https://reviews.llvm.org/D83468#2236798>, @aemerson wrote:

> In D83468#2236637 <https://reviews.llvm.org/D83468#2236637>, @Jac1494 wrote:
>
>> void Instruction::updateLocationAfterHoist() {
>>
>>   const DebugLoc &DL = getDebugLoc();
>>   if (!DL)
>>     return;
>>
>> Code Snippet from link (https://reviews.llvm.org/D85670) is not setting the line number at all.
>> And as seen/observed ,we can also prevent jumpy behavior by skipping the line number(By not setting to line number zero).
>>
>> I'm sharing the code snippet to avoid unnecessary revision hindering the actual discussion.Is this Okey ? Or should I revise ?
>
> That snippet is just returning if there was no debug info at all, there's a `!` in the if condition.

Sorry for misunderstanding , I am also trying to address no debug location.
snippet shared above suggest the removal of  this snippet from IRTransaltor.cpp

  // 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());

> Have you ruled this out as a gdb bug/possible improvement?

Yes , Because Arm64 with selectionDAG works fine. and we can also prevent jumpy behavior by skipping the line number(By not setting to line number zero), this way we can correct Global-isel behavior too. 
+ I am also  writing about this behavior to gdb mailing list.


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

https://reviews.llvm.org/D83468



More information about the llvm-commits mailing list