[PATCH] D128192: [GlobalISel][DebugInfo] Propagate debug location for localized constants
Vladislav Dzhidzhoev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 05:55:19 PDT 2022
dzhidzhoev created this revision.
dzhidzhoev added reviewers: aemerson, arsenm, aprantl, paquette.
Herald added subscribers: hiraditya, rovka.
Herald added a project: All.
dzhidzhoev requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
After IRTranslator pass, constants are deduplicated and translated into instructions at entry block, having debug locations lost.
Localization of constants may cause emission of extra zero lines in debug_line section, like here https://godbolt.org/z/ecvsxxfKn. In this example, constant gets placed as
a first instruction in entry block, and despite it has no debug location, AsmPrinter emits zero line for it.
If a localized constant has the only user, we can assume that it has the same debug location as its user, since they are placed consequently.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128192
Files:
llvm/lib/CodeGen/GlobalISel/Localizer.cpp
llvm/test/CodeGen/AArch64/GlobalISel/localizer-propagate-debug-loc.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128192.438360.patch
Type: text/x-patch
Size: 8907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220620/8b4aaedf/attachment.bin>
More information about the llvm-commits
mailing list