OSDN Git Service

Fix PR26585 by improving the promotion of DBG_VALUEs to DW_AT_locations.
authorAdrian Prantl <aprantl@apple.com>
Mon, 29 Feb 2016 19:49:46 +0000 (19:49 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 29 Feb 2016 19:49:46 +0000 (19:49 +0000)
commitbe45c68b8bf58bd9984003372bbd9607bc1e6cbc
tree12e95bc806dfdb537da2e450b8e865a602880e06
parentb9de197a7a6792eebcf597c8eb9e221151355a04
Fix PR26585 by improving the promotion of DBG_VALUEs to DW_AT_locations.
When a variable is described by a single DBG_VALUE instruction we can
often use a more efficient inline DW_AT_location instead of using a
location list.

This commit makes the heuristic that decides when to apply this
optimization stricter by also verifying that the DBG_VALUE is live at the
entry of the function (instead of just checking that it is valid until
the end of the function).

<rdar://problem/24611008>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262247 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/DebugInfo/X86/PR26148.ll
test/DebugInfo/X86/parameters.ll
test/DebugInfo/X86/pieces-2.ll
test/DebugInfo/X86/pieces-3.ll
test/DebugInfo/X86/reference-argument.ll
test/DebugInfo/X86/single-dbg_value.ll [new file with mode: 0644]
test/DebugInfo/X86/subregisters.ll