[all-commits] [llvm/llvm-project] e8209b: [MachineSink] Drop debug info for instructions del...
Momchil Velikov via All-commits
all-commits at lists.llvm.org
Sat Nov 11 11:43:27 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e8209b2486d8fa1a5314af0fe896b9628effa471
https://github.com/llvm/llvm-project/commit/e8209b2486d8fa1a5314af0fe896b9628effa471
Author: Momchil Velikov <momchil.velikov at arm.com>
Date: 2023-11-11 (Sat, 11 Nov 2023)
Changed paths:
M llvm/lib/CodeGen/MachineSink.cpp
R llvm/test/CodeGen/AArch64/sink-and-fold-dbg-value-crash.mir
A llvm/test/CodeGen/AArch64/sink-and-fold-drop-dbg.mir
M llvm/test/DebugInfo/Generic/no-empty-child-vars.ll
Log Message:
-----------
[MachineSink] Drop debug info for instructions deleted by sink-and-fold (#71443)
After performing sink-and-fold over a COPY, the original instruction is
replaced with one that produces its output in the destination of the
copy. Its value is still available (in a hard register), so if there are
debug instructions which refer to the (now deleted) virtual register
they could be updated to refer to the hard register, in principle.
However, it's not clear how to do that, moreover in some cases the debug
instructions may need to be replicated proportionally to the number of
the COPY instructions replaced and in some extreme cases we can end up
with quadratic increase in the number of debug instructions, e.g:
int f(int);
void g(int x) {
int y = x + 1;
int t0 = y;
f(t0);
int t1 = y;
f(t1);
}
More information about the All-commits
mailing list