[PATCH] D83468: [Debuginfo] Fix for PR46653
Jaydeep Chauhan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 10:25:14 PDT 2020
Jac1494 added a comment.
In D83468#2226884 <https://reviews.llvm.org/D83468#2226884>, @dblaikie wrote:
> But it's possible that the right solution is to drop the location, rather than use line zero here. Perhaps this code in GlobalISel should be using updateLocationAfterHoist ( https://reviews.llvm.org/D85670 ) @vsk @aprantl
>
>> llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2183
>>
>> // 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());
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 ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83468/new/
https://reviews.llvm.org/D83468
More information about the llvm-commits
mailing list