[all-commits] [llvm/llvm-project] f32caf: [GlobalISel][DebugInfo] Propagate debug location f...
Vladislav Dzhidzhoev via All-commits
all-commits at lists.llvm.org
Mon Dec 5 05:39:11 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f32cafedf053be812ba5258f8abb85413a271985
https://github.com/llvm/llvm-project/commit/f32cafedf053be812ba5258f8abb85413a271985
Author: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
Date: 2022-12-05 (Mon, 05 Dec 2022)
Changed paths:
M llvm/lib/CodeGen/GlobalISel/Localizer.cpp
A llvm/test/CodeGen/AArch64/GlobalISel/localizer-propagate-debug-loc.mir
Log Message:
-----------
[GlobalISel][DebugInfo] Propagate debug location for localized constants
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.
Differential Revision: https://reviews.llvm.org/D128192
More information about the All-commits
mailing list