[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
Tue Jul 12 15:29:47 PDT 2022


dzhidzhoev added a comment.

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.


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