Go to file
David Stenberg 9dbeca3d77 [DebugInfo] Stop changing labels for register-described parameter DBG_VALUEs
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
2019-02-13 09:34:07 +00:00
clang [test] Fix the test from SVN r353917 when running without lld available 2019-02-13 07:50:21 +00:00
clang-tools-extra [clangd] Handle a few more diag kinds in include fixer. 2019-02-13 08:58:54 +00:00
compiler-rt [profile] Provide lprofGetHostName for all windows environments 2019-02-13 07:27:05 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
libcxx [libc++] Avoid UB in the no-exceptions mode in a few places 2019-02-12 16:06:02 +00:00
libcxxabi [CMake] Avoid passing -rtlib=compiler-rt when using compiler-rt 2019-02-12 01:35:29 +00:00
libunwind [CMake] Don't cache LLVM_MAIN_SRC_DIR 2019-02-13 07:09:26 +00:00
lld [PPC64] Update tests to reflect change in printing of call operand. [NFC] 2019-02-12 17:49:04 +00:00
lldb [lldb] [cmake] Use install directories for LLVM_* variables 2019-02-13 08:34:46 +00:00
llgo Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
llvm [DebugInfo] Stop changing labels for register-described parameter DBG_VALUEs 2019-02-13 09:34:07 +00:00
openmp [OpenMP] Fix broken link to browse sources 2019-02-12 17:00:57 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [opaque pointer types] Update calls to CreateCall to pass the function 2019-02-08 19:30:46 +00:00
pstl [NFC] Fix typo in PSTL test 2019-02-11 17:45:15 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.