summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-08-31 21:26:22 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-08-31 21:26:22 +0000
commit6a150a87ef7d7d546b34ab0b7fe58729da1d6c3e (patch)
tree9aa973a3c4d4ab73f98cb480430e0de3aa2fd47b /llvm/test/DebugInfo
parenta8efaf96d4eef19946b53d62ef8c68badc9cab6c (diff)
downloadbcm5719-llvm-6a150a87ef7d7d546b34ab0b7fe58729da1d6c3e.tar.gz
bcm5719-llvm-6a150a87ef7d7d546b34ab0b7fe58729da1d6c3e.zip
DebugInfo: Elide lexical scopes which only contain other (inline or lexical) scopes.
DW_TAG_lexical_scopes inform debuggers about the instruction range for which a given variable (or imported declaration/module/etc) is valid. If the scope doesn't itself contain any such entities, it's a waste of space and should be omitted. We were correctly doing this for entirely empty leaves, but not for intermediate nodes. Reduces total (not just debug sections) .o file size for a bootstrap -gmlt LLVM by 22% and bootstrap -gmlt clang executable by 13%. The wins for a full -g build will be less as a % (and in absolute terms), but should still be substantial - with some of that win being fewer relocations, thus more substantiall reducing link times than fewer bytes alone would have. llvm-svn: 216861
Diffstat (limited to 'llvm/test/DebugInfo')
-rw-r--r--llvm/test/DebugInfo/PR20038.ll12
-rw-r--r--llvm/test/DebugInfo/X86/concrete_out_of_line.ll3
-rw-r--r--llvm/test/DebugInfo/X86/fission-ranges.ll2
-rw-r--r--llvm/test/DebugInfo/missing-abstract-variable.ll13
4 files changed, 7 insertions, 23 deletions
diff --git a/llvm/test/DebugInfo/PR20038.ll b/llvm/test/DebugInfo/PR20038.ll
index 61145e5c844..b8a80524fb9 100644
--- a/llvm/test/DebugInfo/PR20038.ll
+++ b/llvm/test/DebugInfo/PR20038.ll
@@ -30,23 +30,19 @@
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name {{.*}} "fun4"
; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_TAG_lexical_block
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_TAG_inlined_subroutine
+; CHECK: DW_TAG_inlined_subroutine
; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_abstract_origin {{.*}} {[[D1_ABS]]}
+; CHECK: DW_AT_abstract_origin {{.*}} {[[D1_ABS]]}
; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_TAG_formal_parameter
+; CHECK: DW_TAG_formal_parameter
; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_abstract_origin {{.*}} {[[D1_THIS_ABS]]}
+; CHECK: DW_AT_abstract_origin {{.*}} {[[D1_THIS_ABS]]}
; FIXME: D2 is actually inlined into D1 but doesn't show up here, possibly due
; to there being no work in D2 (calling another member function from the dtor
; causes D2 to show up, calling a free function doesn't).
; CHECK-NOT: DW_TAG
-; CHECK: NULL
-; CHECK-NOT: DW_TAG
; CHECK: NULL
; CHECK-NOT: DW_TAG
; CHECK: NULL
diff --git a/llvm/test/DebugInfo/X86/concrete_out_of_line.ll b/llvm/test/DebugInfo/X86/concrete_out_of_line.ll
index ac038f353ad..32ebb068b68 100644
--- a/llvm/test/DebugInfo/X86/concrete_out_of_line.ll
+++ b/llvm/test/DebugInfo/X86/concrete_out_of_line.ll
@@ -32,9 +32,6 @@
; CHECK: DW_TAG_formal_parameter
; CHECK-NOT: NULL
; CHECK-NOT: DW_TAG
-; CHECK: DW_TAG_lexical_block
-; CHECK-NOT: NULL
-; CHECK-NOT: DW_TAG
; CHECK: DW_TAG_inlined_subroutine
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} {[[ASSIGN:0x........]]}
; CHECK-NOT: NULL
diff --git a/llvm/test/DebugInfo/X86/fission-ranges.ll b/llvm/test/DebugInfo/X86/fission-ranges.ll
index 6e3bbfef75c..482ed8fa920 100644
--- a/llvm/test/DebugInfo/X86/fission-ranges.ll
+++ b/llvm/test/DebugInfo/X86/fission-ranges.ll
@@ -16,7 +16,7 @@
; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[E:0x[0-9a-z]*]])
; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[B:0x[0-9a-z]*]])
; CHECK: DW_AT_location [DW_FORM_sec_offset] ([[D:0x[0-9a-z]*]])
-; CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x000000a0)
+; CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x00000000)
; CHECK: .debug_loc contents:
; CHECK-NOT: Beginning address offset
; CHECK: .debug_loc.dwo contents:
diff --git a/llvm/test/DebugInfo/missing-abstract-variable.ll b/llvm/test/DebugInfo/missing-abstract-variable.ll
index 59a38cf39d5..2d4ba07843e 100644
--- a/llvm/test/DebugInfo/missing-abstract-variable.ll
+++ b/llvm/test/DebugInfo/missing-abstract-variable.ll
@@ -45,8 +45,6 @@
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name {{.*}} "b"
; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_TAG_lexical_block
-; CHECK-NOT: {{DW_TAG|NULL}}
; CHECK: DW_TAG_lexical_block
; CHECK-NOT: {{DW_TAG|NULL}}
; CHECK: [[ABS_S:.*]]: DW_TAG_variable
@@ -89,19 +87,12 @@
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_abstract_origin {{.*}} {[[ABS_B]]}
-; The two lexical blocks here are caused by the scope of the if that includes
-; the condition variable, and the scope within the if's composite statement. I'm
-; not sure we really need both of them since there's no variable declared in the
-; outer of the two
-
; CHECK-NOT: {{DW_TAG|NULL}}
; CHECK: DW_TAG_lexical_block
; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_TAG_lexical_block
-; CHECK-NOT: {{DW_TAG|NULL}}
-; CHECK: DW_TAG_variable
+; CHECK: DW_TAG_variable
; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_abstract_origin {{.*}} {[[ABS_S]]}
+; CHECK: DW_AT_abstract_origin {{.*}} {[[ABS_S]]}
@t = external global i32
OpenPOWER on IntegriCloud