diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-02-29 19:49:46 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-02-29 19:49:46 +0000 |
commit | fb2add2be1e00cd003c6c08d41285ca92fba5274 (patch) | |
tree | 491960ee25ef58a70188cdbad0f1a1d129876753 /llvm/test/DebugInfo/X86/reference-argument.ll | |
parent | bbd16815b02ca6345598b523c1b07fa814c73dd2 (diff) | |
download | bcm5719-llvm-fb2add2be1e00cd003c6c08d41285ca92fba5274.tar.gz bcm5719-llvm-fb2add2be1e00cd003c6c08d41285ca92fba5274.zip |
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>
llvm-svn: 262247
Diffstat (limited to 'llvm/test/DebugInfo/X86/reference-argument.ll')
-rw-r--r-- | llvm/test/DebugInfo/X86/reference-argument.ll | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/test/DebugInfo/X86/reference-argument.ll b/llvm/test/DebugInfo/X86/reference-argument.ll index 9433b878531..fcbbac9a033 100644 --- a/llvm/test/DebugInfo/X86/reference-argument.ll +++ b/llvm/test/DebugInfo/X86/reference-argument.ll @@ -1,8 +1,9 @@ -; RUN: llc -mtriple=x86_64-apple-macosx10.9.0 -filetype=obj -O0 < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s +; RUN: llc -mtriple=x86_64-apple-macosx10.9.0 -filetype=obj -O0 < %s | llvm-dwarfdump -debug-dump=all - | FileCheck %s ; ModuleID = 'aggregate-indirect-arg.cpp' ; extracted from debuginfo-tests/aggregate-indirect-arg.cpp ; v should be a pointer. +; CHECK: .debug_info contents: ; CHECK: DW_TAG_subprogram ; CHECK: DW_AT_specification {{.*}} "_ZN1A3fooE4SVal" ; CHECK-NOT: DW_TAG_subprogram @@ -10,9 +11,11 @@ ; CHECK: DW_AT_name {{.*}} "this" ; CHECK-NOT: DW_TAG_subprogram ; CHECK: DW_TAG_formal_parameter -; rsi+0 -; CHECK-NEXT: DW_AT_location [DW_FORM_block1] (<0x02> 74 00{{ *}}) +; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (0x00000000) ; CHECK-NEXT: DW_AT_name {{.*}} "v" +; CHECK: .debug_loc contents: +; rsi+0 +; CHECK: Location description: 74 00 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.9.0" |