summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-03-09 21:12:06 +0000
committerTim Northover <tnorthover@apple.com>2017-03-09 21:12:06 +0000
commit7a9ea8f628f863c2cde41e63be45a2e47fbd95ef (patch)
tree352006c08d3894ee9c6e38b6a68d3710c6cc3831 /llvm/test
parent7e56366204287a513420a2633daa1f92b009f4bf (diff)
downloadbcm5719-llvm-7a9ea8f628f863c2cde41e63be45a2e47fbd95ef.tar.gz
bcm5719-llvm-7a9ea8f628f863c2cde41e63be45a2e47fbd95ef.zip
GlobalISel: put debug info for static allocas in the MachineFunction.
The good reason to do this is that static allocas are pretty simple to handle (especially at -O0) and avoiding tracking DBG_VALUEs throughout the pipeline should give some kind of performance benefit. The bad reason is that the debug pipeline is an unholy mess of implicit contracts, where determining whether "DBG_VALUE %reg, imm" actually implies a load or not involves the services of at least 3 soothsayers and the sacrifice of at least one chicken. And it still gets it wrong if the variable is at SP directly. llvm-svn: 297410
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AArch64/GlobalISel/debug-insts.ll15
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/debug-insts.ll b/llvm/test/CodeGen/AArch64/GlobalISel/debug-insts.ll
index 2c3def2e4a9..5a76661180f 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/debug-insts.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/debug-insts.ll
@@ -1,8 +1,10 @@
; RUN: llc -global-isel -mtriple=aarch64 %s -stop-after=irtranslator -o - | FileCheck %s
-
+; RUN: llc -mtriple=aarch64 -global-isel --global-isel-abort=0 -o /dev/null
; CHECK-LABEL: name: debug_declare
-; CHECK: DBG_VALUE %stack.0.in.addr, 0, !11, !12, debug-location !13
+; CHECK: stack:
+; CHECK: - { id: {{.*}}, name: in.addr, offset: {{.*}}, size: {{.*}}, alignment: {{.*}}, di-variable: '!11',
+; CHECK-NEXT: di-expression: '!12', di-location: '!13' }
; CHECK: DBG_VALUE debug-use %0(s32), debug-use _, !11, !12, debug-location !13
define void @debug_declare(i32 %in) #0 !dbg !7 {
entry:
@@ -13,6 +15,15 @@ entry:
ret void, !dbg !14
}
+; CHECK-LABEL: name: debug_declare_vla
+; CHECK: DBG_VALUE debug-use %{{[0-9]+}}(p0), debug-use _, !11, !12, debug-location !13
+define void @debug_declare_vla(i32 %in) #0 !dbg !7 {
+entry:
+ %vla.addr = alloca i32, i32 %in
+ call void @llvm.dbg.declare(metadata i32* %vla.addr, metadata !11, metadata !12), !dbg !13
+ ret void, !dbg !14
+}
+
; CHECK-LABEL: name: debug_value
; CHECK: [[IN:%[0-9]+]](s32) = COPY %w0
define void @debug_value(i32 %in) #0 !dbg !7 {
OpenPOWER on IntegriCloud