llvm-project/llvm/lib
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
..
Analysis Reintroduce a check accidentally removed in 288873 to fix clang bots 2016-12-07 04:48:50 +00:00
AsmParser [AsmParser] Avoid recursing when lexing ';'. NFC. 2016-11-16 22:25:05 +00:00
Bitcode Fix MSVC bool to uint64_t promotion warning 2016-12-06 11:12:53 +00:00
CodeGen [CodeGen] Fix result type for SMULO/UMULO legalization 2016-12-06 22:49:36 +00:00
DebugInfo [pdb] handle missing pdb streams more gracefully 2016-12-05 22:44:00 +00:00
Demangle Demangle: remove references to allocator for default allocator 2016-11-20 00:20:27 +00:00
ExecutionEngine IR: Change the gep_type_iterator API to avoid always exposing the "current" type. 2016-12-02 02:24:42 +00:00
Fuzzer [libFuzzer] refactor the code to allow collecting features in different ways. Also initialize a couple of Fuzzer:: members that might have been used uninitialized :( 2016-12-05 23:35:22 +00:00
IR IR: Reduce the amount of boilerplate required for a metadata kind. NFCI. 2016-12-06 23:53:01 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO [LTOs] Allow generation of hotness information 2016-12-02 17:53:56 +00:00
LibDriver Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI. 2016-06-29 22:27:42 +00:00
LineEditor
Linker IR: Move NumElements field from {Array,Vector}Type to SequentialType. 2016-12-02 03:20:58 +00:00
MC [llvm] Fix D26214: Move error handling out of MC and to the callers. 2016-12-06 02:49:17 +00:00
Object [Object][MachO] Reference-ify some helper function arguments. NFC. 2016-12-04 01:56:10 +00:00
ObjectYAML [ObjectYAML] First bit of support for encoding DWARF in MachO 2016-12-06 06:00:49 +00:00
Option Generalize ArgList::AddAllArgs more 2016-09-29 19:47:58 +00:00
Passes [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
ProfileData Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
Support [DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation 2016-12-05 18:04:47 +00:00
TableGen [TableGen] Centralize/Unify error handling. 2016-12-05 22:58:01 +00:00
Target AMDGPU : Add S_SETREG instructions to fix fdiv precision issues. 2016-12-07 02:42:15 +00:00
Transforms [InlineFunction] Do not propagate the callsite debug location to instructions inlined from functions with debug info. 2016-12-07 10:37:26 +00:00
CMakeLists.txt Try to fix a circular dependency in the modules build. 2016-09-06 20:16:19 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00