1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/lib/Transforms
Andrea Di Biagio 15b634f111 [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
..
Coroutines Fix spelling mistakes in Transforms comments. NFC. 2016-11-20 13:19:49 +00:00
Hello
InstCombine [InstCombine] change select type to eliminate bitcasts 2016-12-03 15:25:16 +00:00
Instrumentation [sanitizer-coverage] use IRB.SetCurrentDebugLocation after IRB.SetInsertPoint 2016-12-03 01:43:30 +00:00
IPO LowerTypeTests: Improve performance by optimising type metadata queries. 2016-12-06 23:02:13 +00:00
ObjCARC [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
Scalar [BDCE/DebugInfo] Preserve llvm.dbg.value's argument. 2016-12-06 21:52:47 +00:00
Utils [InlineFunction] Do not propagate the callsite debug location to instructions inlined from functions with debug info. 2016-12-07 10:37:26 +00:00
Vectorize Revert "[SLP] Fix for PR6246: vectorization for scalar ops on vector elements." 2016-12-02 16:56:26 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00