[PATCH] D127488: [GlobalISel][DebugInfo] Remove debug info with zero line from constants inserted at entry block
Vladislav Dzhidzhoev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 02:46:44 PDT 2022
dzhidzhoev added a comment.
In D127488#3653616 <https://reviews.llvm.org/D127488#3653616>, @dblaikie wrote:
> In D127488#3646698 <https://reviews.llvm.org/D127488#3646698>, @dzhidzhoev wrote:
>
>> In D127488#3639858 <https://reviews.llvm.org/D127488#3639858>, @dblaikie wrote:
>>
>>> Why are the other changes needed here - the previous change set the location to 0, the new change sets it to nothing, so why are the other changes (the scope devices, etc) needed? Are they representative of bugs/issues in the previous (line 0) solution?
>>
>> DILocationVerifier basically doesn't allow to build instruction without debug location, if the instruction being translated has the location. We change DILocationVerifier, allowing to translate instructions with debug location into instructions without it, if instructions being emitted are inserted into "constant block". In IRTranslator::translate(Constant*, ...), DILocationVerifier is notified that instructions being translated into entry block belong to "constant block". Since IRTranslator::translate can be called recursively, DILocationVerifier has to track nested constant blocks by using a counter. Scope device is used to make it implicitly.
>
> Hmm, not sure I'm following why the solution to this is more involved than the solution to allowing line 0? (could the check for line 0 be changed to allow no-line & be done at that point?)
Initially it was like that. Addressing this comment https://reviews.llvm.org/D127488#3573315, I have added more sophisticated check. Should I revert it to previous version https://reviews.llvm.org/D127488?id=435872 ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127488/new/
https://reviews.llvm.org/D127488
More information about the llvm-commits
mailing list