llvm-project/llvm
Andrea Di Biagio 32d5aedd5b [InlineFunction] Do not propagate the callsite debug location to instructions inlined from functions with debug info.
When a function F is inlined, InlineFunction extends the debug location of every
instruction inlined from F by adding an InlinedAt.

However, if an instruction has a 'null' debug location, InlineFunction would
propagate the callsite debug location to it. This behavior existed since
revision 210459.

Revision 210459 was originally committed specifically to workaround the lack of
debug information for instructions inlined from intrinsic functions (which are
usually declared with attributes `__always_inline__, __nodebug__`).

The problem with revision 210459 is that it doesn't make any sort of distinction
between instructions inlined from a 'nodebug' function and instructions which
are inlined from a function built with debug info. This issue may lead to
incorrect stepping in the debugger.

This patch works under the assumption that a nodebug function does not have a
DISubprogram. When a function F is inlined into another function G,
InlineFunction checks if F has debug info associated with it.

For nodebug functions, the InlineFunction logic is unchanged (i.e. it would
still propagate the callsite debugloc to the inlined instructions). Otherwise,
InlineFunction no longer propagates the callsite debug location.

Differential Revision: https://reviews.llvm.org/D27462

llvm-svn: 288895
2016-12-07 10:37:26 +00:00
..
bindings Fix go binding to adapt the new attribute API 2016-11-18 10:11:02 +00:00
cmake [CMake] Fixing clang standalone build 2016-12-06 17:09:29 +00:00
docs [doc] Add .arcconfig setup to the "how to work with a monorepo" section 2016-12-03 01:04:40 +00:00
examples ExceptionDemo: remove some undefined behaviour 2016-11-20 02:36:38 +00:00
include [PM] Add some more logging to make it more clear when the CGSCC 2016-12-07 10:33:15 +00:00
lib [InlineFunction] Do not propagate the callsite debug location to instructions inlined from functions with debug info. 2016-12-07 10:37:26 +00:00
projects
resources
runtimes [CMake] Make the runtimes directory work with bootstrap builds 2016-10-19 21:50:25 +00:00
test [InlineFunction] Do not propagate the callsite debug location to instructions inlined from functions with debug info. 2016-12-07 10:37:26 +00:00
tools [llc] Fix -stop-after=consthoist initializing the pass. 2016-12-06 23:49:58 +00:00
unittests Refactor TargetParserTests. 2016-12-06 02:22:08 +00:00
utils Summary: Currently there is no way to disable deprecated warning from asm like this 2016-12-05 23:55:13 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Fixing clang standalone build 2016-12-06 17:09:29 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Take ownership of IR Linker as discussed on llvm-dev 2016-12-02 14:06:53 +00:00
CREDITS.TXT Test Commit, removing a blank line in CREDITS.TXT 2016-11-24 15:40:19 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt Test commit, deleted empty line at the end of README.txt 2016-11-07 18:31:21 +00:00
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

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

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.