llvm/test
Andrea Di Biagio 0736f445e3 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 10:37:26 +00:00
..
Analysis [AArch64] Correct the check of signed 9-bit imm in isLegalAddressingMode() 2016-12-07 01:45:04 +00:00
Assembler [DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation 2016-12-05 18:04:47 +00:00
Bindings
Bitcode [DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation 2016-12-05 18:04:47 +00:00
BugPoint
CodeGen AMDGPU : Add S_SETREG instructions to fix fdiv precision issues. 2016-12-07 02:42:15 +00:00
DebugInfo [InlineFunction] Do not propagate the callsite debug location to instructions inlined from functions with debug info. 2016-12-07 10:37:26 +00:00
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation [asan/win] Align global registration metadata to its size 2016-11-29 01:32:21 +00:00
Integer
JitListener
LibDriver
Linker [ThinLTO] Stop importing constant global vars as copies in the backend 2016-12-02 01:02:30 +00:00
LTO [LTOs] Allow generation of hotness information 2016-12-02 17:53:56 +00:00
MC AMDGPU: Fix operand name for v_interp_* 2016-12-06 22:29:43 +00:00
Object [llvm-readobj] - Teach readobj to print PT_OPENBSD_BOOTDATA header 2016-12-06 17:55:52 +00:00
ObjectYAML [ObjectYAML] First bit of support for encoding DWARF in MachO 2016-12-06 06:00:49 +00:00
Other Analysis: gep inbounds (gep inbounds (...)) is inbounds. 2016-11-22 01:03:40 +00:00
SymbolRewriter
TableGen [tablegen] Delete duplicates from a vector without skipping elements 2016-12-01 19:38:50 +00:00
ThinLTO/X86 [LTOs] Allow generation of hotness information 2016-12-02 17:53:56 +00:00
tools [llvm-readobj] - Teach readobj to print PT_OPENBSD_BOOTDATA header 2016-12-06 17:55:52 +00:00
Transforms LowerTypeTests: Add a test that covers "unsatisfiable" type metadata. 2016-12-07 03:04:34 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt Add llvm-modextract tool. 2016-11-29 21:54:33 +00:00
lit.cfg Add llvm-modextract tool. 2016-11-29 21:54:33 +00:00
lit.site.cfg.in
TestRunner.sh