forked from OSchip/llvm-project
9dbeca3d77
Summary: This is a follow-up to D57510. This patch stops DebugHandlerBase from changing the starting label for the first non-overlapping, register-described parameter DBG_VALUEs to the beginning of the function. That code did not consider what defined the registers, which could result in the ranges for the debug values starting before their defining instructions. We currently do not emit debug values for constant values directly at the start of the function, so this code is still useful for such values, but my intention is to remove the code from DebugHandlerBase completely when we get there. One reason for removing it is that the code violates the history map's ranges, which I think can make it quite confusing when troubleshooting. In D57510, PrologEpilogInserter was amended so that parameter DBG_VALUEs now are kept at the start of the entry block, even after emission of prologue code. That was done to reduce the degradation of debug completeness from this patch. PR40638 is another example, where the lexical-scope trimming that LDV does, in combination with scheduling, results in instructions after the prologue being left without locations. There might be other cases where the DBG_VALUEs are pushed further down, for which the DebugHandlerBase code may be helpful, but as it now quite often result in incorrect locations, even after the prologue, it seems better to remove that code, and try to work our way up with accurate locations. In the long run we should maybe not aim to provide accurate locations inside the prologue. Some single location descriptions, at least those referring to stack values, generate inaccurate values inside the epilogue, so we maybe should not aim to achieve accuracy for location lists. However, it seems that we now emit line number programs that can result in GDB and LLDB stopping inside the prologue when doing line number stepping into functions. See PR40188 for more information. A summary of some of the changed test cases is available in PR40188#c2. Reviewers: aprantl, dblaikie, rnk, jmorse Reviewed By: aprantl Subscribers: jdoerfert, jholewinski, jvesely, javed.absar, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D57511 llvm-svn: 353928 |
||
---|---|---|
.. | ||
asan-stack-vars.mir | ||
big-endian-dump.ll | ||
big-endian.ll | ||
bitfields.ll | ||
cfi-eof-prologue.ll | ||
coalescing.ll | ||
compiler-gen-bbs-livedebugvalues.mir | ||
constant-dbgloc.ll | ||
dagcombine-zext.ll | ||
dbg-value-i8.ll | ||
dbg-value-i16.ll | ||
dwarfdump.ll | ||
eh_frame.s | ||
eh_frame_personality.ll | ||
frameindices.ll | ||
inlined-argument.ll | ||
line-header.ll | ||
lit.local.cfg | ||
little-endian-dump.ll | ||
machine-outliner.ll | ||
processes-relocations.ll | ||
prologue_end.ll | ||
return-address-signing.ll | ||
struct_by_value.ll | ||
tls-at-location.ll |