summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-12-20 02:09:43 +0000
committerAdrian Prantl <aprantl@apple.com>2016-12-20 02:09:43 +0000
commitbceaaa9643609088b20a51d2c34b3c411185a3c0 (patch)
tree0522b0bc96fc25520b0d342c2e41fdc9ede93451 /llvm/test/CodeGen/X86
parent6db6efd40c46d4e54a302ac1227d1818fe28965d (diff)
downloadbcm5719-llvm-bceaaa9643609088b20a51d2c34b3c411185a3c0.tar.gz
bcm5719-llvm-bceaaa9643609088b20a51d2c34b3c411185a3c0.zip
[IR] Remove the DIExpression field from DIGlobalVariable.
This patch implements PR31013 by introducing a DIGlobalVariableExpression that holds a pair of DIGlobalVariable and DIExpression. Currently, DIGlobalVariables holds a DIExpression. This is not the best way to model this: (1) The DIGlobalVariable should describe the source level variable, not how to get to its location. (2) It makes it unsafe/hard to update the expressions when we call replaceExpression on the DIGLobalVariable. (3) It makes it impossible to represent a global variable that is in more than one location (e.g., a variable with multiple DW_OP_LLVM_fragment-s). We also moved away from attaching the DIExpression to DILocalVariable for the same reasons. This reapplies r289902 with additional testcase upgrades and a change to the Bitcode record for DIGlobalVariable, that makes upgrading the old format unambiguous also for variables without DIExpressions. <rdar://problem/29250149> https://llvm.org/bugs/show_bug.cgi?id=31013 Differential Revision: https://reviews.llvm.org/D26769 llvm-svn: 290153
Diffstat (limited to 'llvm/test/CodeGen/X86')
-rw-r--r--llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll2
-rw-r--r--llvm/test/CodeGen/X86/fp128-g.ll2
-rw-r--r--llvm/test/CodeGen/X86/fpstack-debuginstr-kill.ll4
-rw-r--r--llvm/test/CodeGen/X86/misched-code-difference-with-debug.ll2
-rw-r--r--llvm/test/CodeGen/X86/null-streamer.ll2
5 files changed, 6 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll b/llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll
index 30e5e346d29..ae8214b4bb6 100644
--- a/llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll
+++ b/llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll
@@ -24,7 +24,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!38}
-!0 = !DIGlobalVariable(name: "ret", line: 7, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !3)
+!0 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "ret", line: 7, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !3))
!1 = !DIFile(filename: "foo.c", directory: "/tmp/")
!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !36, enums: !37, retainedTypes: !37, globals: !31, imports: !37)
!3 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
diff --git a/llvm/test/CodeGen/X86/fp128-g.ll b/llvm/test/CodeGen/X86/fp128-g.ll
index 129695dbe20..aede7e55f4b 100644
--- a/llvm/test/CodeGen/X86/fp128-g.ll
+++ b/llvm/test/CodeGen/X86/fp128-g.ll
@@ -116,7 +116,7 @@ attributes #2 = { nounwind readnone }
!llvm.module.flags = !{!7, !8, !9}
!llvm.ident = !{!10}
-!0 = distinct !DIGlobalVariable(name: "ld_ptr", scope: !1, file: !2, line: 17, type: !5, isLocal: false, isDefinition: true)
+!0 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "ld_ptr", scope: !1, file: !2, line: 17, type: !5, isLocal: false, isDefinition: true))
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (trunk 281495)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)
!2 = !DIFile(filename: "fp128-g.c", directory: "/disk5/chh/Debug/ld.loop")
!3 = !{}
diff --git a/llvm/test/CodeGen/X86/fpstack-debuginstr-kill.ll b/llvm/test/CodeGen/X86/fpstack-debuginstr-kill.ll
index 60d335dd48d..208a893c82c 100644
--- a/llvm/test/CodeGen/X86/fpstack-debuginstr-kill.ll
+++ b/llvm/test/CodeGen/X86/fpstack-debuginstr-kill.ll
@@ -64,7 +64,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
!19 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!20 = !DILocalVariable(name: "value", line: 16, scope: !4, file: !6, type: !14)
!21 = !{!22, !23}
-!22 = !DIGlobalVariable(name: "g1", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !14)
-!23 = !DIGlobalVariable(name: "g2", line: 6, isLocal: false, isDefinition: true, scope: null, file: !6, type: !19)
+!22 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "g1", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !14))
+!23 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "g2", line: 6, isLocal: false, isDefinition: true, scope: null, file: !6, type: !19))
!24 = !{i32 2, !"Dwarf Version", i32 2}
!25 = !{i32 2, !"Debug Info Version", i32 3}
diff --git a/llvm/test/CodeGen/X86/misched-code-difference-with-debug.ll b/llvm/test/CodeGen/X86/misched-code-difference-with-debug.ll
index 1f91e3ad0b8..5737ffd6374 100644
--- a/llvm/test/CodeGen/X86/misched-code-difference-with-debug.ll
+++ b/llvm/test/CodeGen/X86/misched-code-difference-with-debug.ll
@@ -82,7 +82,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
!18 = !DILocalVariable(name: "c", line: 7, scope: !13, file: !14, type: !4)
!19 = !DILocalVariable(name: "lc", line: 8, scope: !13, file: !14, type: !11)
!20 = !{!21}
-!21 = !DIGlobalVariable(name: "argc", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !11)
+!21 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "argc", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !11))
!22 = !{i32 2, !"Dwarf Version", i32 4}
!23 = !{i32 2, !"Debug Info Version", i32 3}
!25 = !DILocation(line: 8, column: 3, scope: !13)
diff --git a/llvm/test/CodeGen/X86/null-streamer.ll b/llvm/test/CodeGen/X86/null-streamer.ll
index b331b92868f..30dfade356b 100644
--- a/llvm/test/CodeGen/X86/null-streamer.ll
+++ b/llvm/test/CodeGen/X86/null-streamer.ll
@@ -22,6 +22,6 @@ define void @f1() {
!7 = !{!8}
!8 = !DIBasicType(tag: DW_TAG_base_type, size: 32, align: 32, encoding: DW_ATE_signed)
!9 = !{!10}
-!10 = !DIGlobalVariable(name: "i", linkageName: "_ZL1i", line: 1, isLocal: true, isDefinition: true, scope: null, file: !1, type: !8)
+!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", linkageName: "_ZL1i", line: 1, isLocal: true, isDefinition: true, scope: null, file: !1, type: !8))
!11 = !{i32 2, !"Dwarf Version", i32 3}
!13 = !{i32 1, !"Debug Info Version", i32 3}
OpenPOWER on IntegriCloud