diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-12-22 00:45:21 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-12-22 00:45:21 +0000 |
commit | 1eadba1c8c813aa7f53c784711ace70daa73b474 (patch) | |
tree | 33e988c4a144a9c6862d46dafdab31c3198f0a1f /llvm/test/CodeGen/ARM | |
parent | 58c19106429a98c3f3f5c7d36282774432326784 (diff) | |
download | bcm5719-llvm-1eadba1c8c813aa7f53c784711ace70daa73b474.tar.gz bcm5719-llvm-1eadba1c8c813aa7f53c784711ace70daa73b474.zip |
Renumber testcase metadata nodes after r290153.
This patch renumbers the metadata nodes in debug info testcases after
https://reviews.llvm.org/D26769. This is a separate patch because it
causes so much churn. This was implemented with a python script that
pipes the testcases through llvm-as - | llvm-dis - and then goes
through the original and new output side-by side to insert all
comments at a close-enough location.
Differential Revision: https://reviews.llvm.org/D27765
llvm-svn: 290292
Diffstat (limited to 'llvm/test/CodeGen/ARM')
-rw-r--r-- | llvm/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll | 124 | ||||
-rw-r--r-- | llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll | 196 | ||||
-rw-r--r-- | llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll | 184 | ||||
-rw-r--r-- | llvm/test/CodeGen/ARM/coalesce-dbgvalue.ll | 93 |
4 files changed, 324 insertions, 273 deletions
diff --git a/llvm/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll b/llvm/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll index 5fc87625be5..7a98af161c1 100644 --- a/llvm/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll +++ b/llvm/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll @@ -1,78 +1,88 @@ ; RUN: llc < %s +source_filename = "test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll" target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32" target triple = "thumbv7-apple-darwin3.0.0-iphoneos" -@length = common global i32 0, align 4, !dbg !14 ; <i32*> [#uses=1] +@length = common global i32 0, align 4, !dbg !0 -define void @x0(i8* nocapture %buf, i32 %nbytes) nounwind optsize { +; Function Attrs: nounwind optsize +define void @x0(i8* nocapture %buf, i32 %nbytes) #0 { entry: - tail call void @llvm.dbg.value(metadata i8* %buf, i64 0, metadata !0, metadata !DIExpression()), !dbg !15 - tail call void @llvm.dbg.value(metadata i32 %nbytes, i64 0, metadata !8, metadata !DIExpression()), !dbg !16 - %tmp = load i32, i32* @length, !dbg !17 ; <i32> [#uses=3] - %cmp = icmp eq i32 %tmp, -1, !dbg !17 ; <i1> [#uses=1] - %cmp.not = xor i1 %cmp, true ; <i1> [#uses=1] - %cmp3 = icmp ult i32 %tmp, %nbytes, !dbg !17 ; <i1> [#uses=1] - %or.cond = and i1 %cmp.not, %cmp3 ; <i1> [#uses=1] - tail call void @llvm.dbg.value(metadata i32 %tmp, i64 0, metadata !8, metadata !DIExpression()), !dbg !17 - %nbytes.addr.0 = select i1 %or.cond, i32 %tmp, i32 %nbytes ; <i32> [#uses=1] - tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !10, metadata !DIExpression()), !dbg !19 - br label %while.cond, !dbg !20 + tail call void @llvm.dbg.value(metadata i8* %buf, i64 0, metadata !8, metadata !14), !dbg !15 + tail call void @llvm.dbg.value(metadata i32 %nbytes, i64 0, metadata !16, metadata !14), !dbg !18 + %tmp = load i32, i32* @length, !dbg !19 + %cmp = icmp eq i32 %tmp, -1, !dbg !19 + %cmp.not = xor i1 %cmp, true + %cmp3 = icmp ult i32 %tmp, %nbytes, !dbg !19 + %or.cond = and i1 %cmp.not, %cmp3 + tail call void @llvm.dbg.value(metadata i32 %tmp, i64 0, metadata !16, metadata !14), !dbg !19 + %nbytes.addr.0 = select i1 %or.cond, i32 %tmp, i32 %nbytes + tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !21, metadata !14), !dbg !22 + br label %while.cond, !dbg !23 while.cond: ; preds = %while.body, %entry - %0 = phi i32 [ 0, %entry ], [ %inc, %while.body ] ; <i32> [#uses=3] - %buf.addr.0 = getelementptr i8, i8* %buf, i32 %0 ; <i8*> [#uses=1] - %cmp7 = icmp ult i32 %0, %nbytes.addr.0, !dbg !20 ; <i1> [#uses=1] - br i1 %cmp7, label %land.rhs, label %while.end, !dbg !20 + + %0 = phi i32 [ 0, %entry ], [ %inc, %while.body ] + %buf.addr.0 = getelementptr i8, i8* %buf, i32 %0 + %cmp7 = icmp ult i32 %0, %nbytes.addr.0, !dbg !23 + br i1 %cmp7, label %land.rhs, label %while.end, !dbg !23 land.rhs: ; preds = %while.cond - %call = tail call i32 @x1() nounwind optsize, !dbg !20 ; <i32> [#uses=2] - %cmp9 = icmp eq i32 %call, -1, !dbg !20 ; <i1> [#uses=1] - br i1 %cmp9, label %while.end, label %while.body, !dbg !20 + %call = tail call i32 @x1() #0, !dbg !23 + %cmp9 = icmp eq i32 %call, -1, !dbg !23 + br i1 %cmp9, label %while.end, label %while.body, !dbg !23 while.body: ; preds = %land.rhs - %conv = trunc i32 %call to i8, !dbg !21 ; <i8> [#uses=1] - store i8 %conv, i8* %buf.addr.0, !dbg !21 - %inc = add i32 %0, 1, !dbg !23 ; <i32> [#uses=1] - br label %while.cond, !dbg !24 + %conv = trunc i32 %call to i8, !dbg !24 + store i8 %conv, i8* %buf.addr.0, !dbg !24 + %inc = add i32 %0, 1, !dbg !26 + br label %while.cond, !dbg !27 while.end: ; preds = %land.rhs, %while.cond - ret void, !dbg !25 + ret void, !dbg !28 } -declare i32 @x1() optsize +; Function Attrs: optsize +declare i32 @x1() #1 + +; Function Attrs: nounwind readnone +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2 -declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone +attributes #0 = { nounwind optsize } +attributes #1 = { optsize } +attributes #2 = { nounwind readnone } -!llvm.dbg.cu = !{!3} -!llvm.module.flags = !{!27, !28} +!llvm.dbg.cu = !{!4} +!llvm.module.flags = !{!6, !7} -!0 = !DILocalVariable(name: "buf", line: 4, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "x0", linkageName: "x0", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !26, scope: null, type: !4) +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "length", linkageName: "length", scope: !2, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true) !2 = !DIFile(filename: "t.c", directory: "/private/tmp") -!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 2.0", isOptimized: true, file: !26, globals: !{!14}) -!4 = !DISubroutineType(types: !5) -!5 = !{null} -!6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !26, scope: !2, baseType: !7) -!7 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) -!8 = !DILocalVariable(name: "nbytes", line: 4, arg: 2, scope: !1, file: !2, type: !9) -!9 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned long", size: 32, align: 32, encoding: DW_ATE_unsigned) -!10 = !DILocalVariable(name: "nread", line: 6, scope: !11, file: !2, type: !9) -!11 = distinct !DILexicalBlock(line: 5, column: 1, file: !26, scope: !1) -!12 = !DILocalVariable(name: "c", line: 7, scope: !11, file: !2, type: !13) -!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!14 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "length", linkageName: "length", line: 1, isLocal: false, isDefinition: true, scope: !2, file: !2, type: !13)) -!15 = !DILocation(line: 4, column: 24, scope: !1) -!16 = !DILocation(line: 4, column: 43, scope: !1) -!17 = !DILocation(line: 9, column: 2, scope: !11) -!18 = !{i32 0} -!19 = !DILocation(line: 10, column: 2, scope: !11) -!20 = !DILocation(line: 11, column: 2, scope: !11) -!21 = !DILocation(line: 12, column: 3, scope: !22) -!22 = distinct !DILexicalBlock(line: 11, column: 45, file: !26, scope: !11) -!23 = !DILocation(line: 13, column: 3, scope: !22) -!24 = !DILocation(line: 14, column: 2, scope: !22) -!25 = !DILocation(line: 15, column: 1, scope: !11) -!26 = !DIFile(filename: "t.c", directory: "/private/tmp") -!27 = !{i32 2, !"Dwarf Version", i32 2} -!28 = !{i32 2, !"Debug Info Version", i32 3} +!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang 2.0", isOptimized: true, runtimeVersion: 0, emissionKind: NoDebug, globals: !5) +!5 = !{!0} +!6 = !{i32 2, !"Dwarf Version", i32 2} +!7 = !{i32 2, !"Debug Info Version", i32 3} +!8 = !DILocalVariable(name: "buf", arg: 1, scope: !9, file: !2, line: 4, type: !12) +!9 = distinct !DISubprogram(name: "x0", linkageName: "x0", scope: null, file: !2, line: 5, type: !10, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4) +!10 = !DISubroutineType(types: !11) +!11 = !{null} +!12 = !DIDerivedType(tag: DW_TAG_pointer_type, scope: !2, file: !2, baseType: !13, size: 32, align: 32) +!13 = !DIBasicType(name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) +!14 = !DIExpression() +!15 = !DILocation(line: 4, column: 24, scope: !9) +!16 = !DILocalVariable(name: "nbytes", arg: 2, scope: !9, file: !2, line: 4, type: !17) +!17 = !DIBasicType(name: "unsigned long", size: 32, align: 32, encoding: DW_ATE_unsigned) +!18 = !DILocation(line: 4, column: 43, scope: !9) +!19 = !DILocation(line: 9, column: 2, scope: !20) +!20 = distinct !DILexicalBlock(scope: !9, file: !2, line: 5, column: 1) +!21 = !DILocalVariable(name: "nread", scope: !20, file: !2, line: 6, type: !17) +!22 = !DILocation(line: 10, column: 2, scope: !20) +!23 = !DILocation(line: 11, column: 2, scope: !20) +!24 = !DILocation(line: 12, column: 3, scope: !25) +!25 = distinct !DILexicalBlock(scope: !20, file: !2, line: 11, column: 45) +!26 = !DILocation(line: 13, column: 3, scope: !25) +!27 = !DILocation(line: 14, column: 2, scope: !25) +!28 = !DILocation(line: 15, column: 1, scope: !20) + diff --git a/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll b/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll index 7b13e260fcd..d303f3a30d1 100644 --- a/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll +++ b/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll @@ -1,14 +1,14 @@ ; RUN: llc -arm-global-merge -global-merge-group-by-use=false -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s +source_filename = "test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll" target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-darwin10" -@x1 = internal global i8 1, align 1, !dbg !13 -@x2 = internal global i8 1, align 1, !dbg !14 -@x3 = internal global i8 1, align 1, !dbg !15 -@x4 = internal global i8 1, align 1, !dbg !16 -@x5 = global i8 1, align 1, !dbg !17 - +@x1 = internal global i8 1, align 1, !dbg !0 +@x2 = internal global i8 1, align 1, !dbg !4 +@x3 = internal global i8 1, align 1, !dbg !6 +@x4 = internal global i8 1, align 1, !dbg !8 +@x5 = global i8 1, align 1, !dbg !10 ; Check debug info output for merged global. ; DW_AT_location ; 0x03 DW_OP_addr @@ -28,102 +28,120 @@ target triple = "thumbv7-apple-darwin10" ; CHECK-NOT: {{DW_TAG|NULL}} ; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x7> 03 [[ADDR]] 23 01 ) -define zeroext i8 @get1(i8 zeroext %a) nounwind optsize !dbg !0 { +; Function Attrs: nounwind optsize +define zeroext i8 @get1(i8 zeroext %a) #0 !dbg !16 { entry: - tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !10, metadata !DIExpression()), !dbg !30 - %0 = load i8, i8* @x1, align 4, !dbg !30 - tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !11, metadata !DIExpression()), !dbg !30 - store i8 %a, i8* @x1, align 4, !dbg !30 - ret i8 %0, !dbg !31 + tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !20, metadata !23), !dbg !24 + %0 = load i8, i8* @x1, align 4, !dbg !24 + tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !21, metadata !23), !dbg !24 + store i8 %a, i8* @x1, align 4, !dbg !24 + ret i8 %0, !dbg !25 } -declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone +; Function Attrs: nounwind readnone +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 -define zeroext i8 @get2(i8 zeroext %a) nounwind optsize !dbg !6 { +; Function Attrs: nounwind optsize +define zeroext i8 @get2(i8 zeroext %a) #0 !dbg !26 { entry: - tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !18, metadata !DIExpression()), !dbg !32 - %0 = load i8, i8* @x2, align 4, !dbg !32 - tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !19, metadata !DIExpression()), !dbg !32 - store i8 %a, i8* @x2, align 4, !dbg !32 - ret i8 %0, !dbg !33 + tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !28, metadata !23), !dbg !31 + %0 = load i8, i8* @x2, align 4, !dbg !31 + tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !29, metadata !23), !dbg !31 + store i8 %a, i8* @x2, align 4, !dbg !31 + ret i8 %0, !dbg !32 } -define zeroext i8 @get3(i8 zeroext %a) nounwind optsize !dbg !7 { +; Function Attrs: nounwind optsize + +define zeroext i8 @get3(i8 zeroext %a) #0 !dbg !33 { entry: - tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !21, metadata !DIExpression()), !dbg !34 - %0 = load i8, i8* @x3, align 4, !dbg !34 - tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !22, metadata !DIExpression()), !dbg !34 - store i8 %a, i8* @x3, align 4, !dbg !34 - ret i8 %0, !dbg !35 + tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !35, metadata !23), !dbg !38 + %0 = load i8, i8* @x3, align 4, !dbg !38 + tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !36, metadata !23), !dbg !38 + store i8 %a, i8* @x3, align 4, !dbg !38 + ret i8 %0, !dbg !39 } -define zeroext i8 @get4(i8 zeroext %a) nounwind optsize !dbg !8 { +; Function Attrs: nounwind optsize + +define zeroext i8 @get4(i8 zeroext %a) #0 !dbg !40 { entry: - tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !24, metadata !DIExpression()), !dbg !36 - %0 = load i8, i8* @x4, align 4, !dbg !36 - tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !25, metadata !DIExpression()), !dbg !36 - store i8 %a, i8* @x4, align 4, !dbg !36 - ret i8 %0, !dbg !37 + tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !42, metadata !23), !dbg !45 + %0 = load i8, i8* @x4, align 4, !dbg !45 + tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !43, metadata !23), !dbg !45 + store i8 %a, i8* @x4, align 4, !dbg !45 + ret i8 %0, !dbg !46 } -define zeroext i8 @get5(i8 zeroext %a) nounwind optsize !dbg !9 { +; Function Attrs: nounwind optsize + +define zeroext i8 @get5(i8 zeroext %a) #0 !dbg !47 { entry: - tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !27, metadata !DIExpression()), !dbg !38 - %0 = load i8, i8* @x5, align 4, !dbg !38 - tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !28, metadata !DIExpression()), !dbg !38 - store i8 %a, i8* @x5, align 4, !dbg !38 - ret i8 %0, !dbg !39 + tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !49, metadata !23), !dbg !52 + %0 = load i8, i8* @x5, align 4, !dbg !52 + tail call void @llvm.dbg.value(metadata i8 %0, i64 0, metadata !50, metadata !23), !dbg !52 + store i8 %a, i8* @x5, align 4, !dbg !52 + ret i8 %0, !dbg !53 } -!llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!49} - -!0 = distinct !DISubprogram(name: "get1", linkageName: "get1", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 4, file: !47, scope: !1, type: !3, variables: !42) -!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 2369.8)", isOptimized: true, emissionKind: FullDebug, file: !47, enums: !48, retainedTypes: !48, globals: !41, imports: !48) -!3 = !DISubroutineType(types: !4) -!4 = !{!5, !5} -!5 = !DIBasicType(tag: DW_TAG_base_type, name: "_Bool", size: 8, align: 8, encoding: DW_ATE_boolean) -!6 = distinct !DISubprogram(name: "get2", linkageName: "get2", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 7, file: !47, scope: !1, type: !3, variables: !43) -!7 = distinct !DISubprogram(name: "get3", linkageName: "get3", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 10, file: !47, scope: !1, type: !3, variables: !44) -!8 = distinct !DISubprogram(name: "get4", linkageName: "get4", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 13, file: !47, scope: !1, type: !3, variables: !45) -!9 = distinct !DISubprogram(name: "get5", linkageName: "get5", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 16, file: !47, scope: !1, type: !3, variables: !46) -!10 = !DILocalVariable(name: "a", line: 4, arg: 1, scope: !0, file: !1, type: !5) -!11 = !DILocalVariable(name: "b", line: 4, scope: !12, file: !1, type: !5) -!12 = distinct !DILexicalBlock(line: 4, column: 0, file: !47, scope: !0) -!13 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x1", line: 3, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5)) -!14 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x2", line: 6, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5)) -!15 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x3", line: 9, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5)) -!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x4", line: 12, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5)) -!17 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x5", line: 15, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5)) -!18 = !DILocalVariable(name: "a", line: 7, arg: 1, scope: !6, file: !1, type: !5) -!19 = !DILocalVariable(name: "b", line: 7, scope: !20, file: !1, type: !5) -!20 = distinct !DILexicalBlock(line: 7, column: 0, file: !47, scope: !6) -!21 = !DILocalVariable(name: "a", line: 10, arg: 1, scope: !7, file: !1, type: !5) -!22 = !DILocalVariable(name: "b", line: 10, scope: !23, file: !1, type: !5) -!23 = distinct !DILexicalBlock(line: 10, column: 0, file: !47, scope: !7) -!24 = !DILocalVariable(name: "a", line: 13, arg: 1, scope: !8, file: !1, type: !5) -!25 = !DILocalVariable(name: "b", line: 13, scope: !26, file: !1, type: !5) -!26 = distinct !DILexicalBlock(line: 13, column: 0, file: !47, scope: !8) -!27 = !DILocalVariable(name: "a", line: 16, arg: 1, scope: !9, file: !1, type: !5) -!28 = !DILocalVariable(name: "b", line: 16, scope: !29, file: !1, type: !5) -!29 = distinct !DILexicalBlock(line: 16, column: 0, file: !47, scope: !9) -!30 = !DILocation(line: 4, scope: !0) -!31 = !DILocation(line: 4, scope: !12) -!32 = !DILocation(line: 7, scope: !6) -!33 = !DILocation(line: 7, scope: !20) -!34 = !DILocation(line: 10, scope: !7) -!35 = !DILocation(line: 10, scope: !23) -!36 = !DILocation(line: 13, scope: !8) -!37 = !DILocation(line: 13, scope: !26) -!38 = !DILocation(line: 16, scope: !9) -!39 = !DILocation(line: 16, scope: !29) -!41 = !{!13, !14, !15, !16, !17} -!42 = !{!10, !11} -!43 = !{!18, !19} -!44 = !{!21, !22} -!45 = !{!24, !25} -!46 = !{!27, !28} -!47 = !DIFile(filename: "foo.c", directory: "/tmp/") -!48 = !{} -!49 = !{i32 1, !"Debug Info Version", i32 3} +attributes #0 = { nounwind optsize } +attributes #1 = { nounwind readnone } + +!llvm.dbg.cu = !{!12} +!llvm.module.flags = !{!15} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "x1", scope: !2, file: !2, line: 3, type: !3, isLocal: true, isDefinition: true) +!2 = !DIFile(filename: "foo.c", directory: "/tmp/") +!3 = !DIBasicType(name: "_Bool", size: 8, align: 8, encoding: DW_ATE_boolean) +!4 = !DIGlobalVariableExpression(var: !5) +!5 = !DIGlobalVariable(name: "x2", scope: !2, file: !2, line: 6, type: !3, isLocal: true, isDefinition: true) +!6 = !DIGlobalVariableExpression(var: !7) +!7 = !DIGlobalVariable(name: "x3", scope: !2, file: !2, line: 9, type: !3, isLocal: true, isDefinition: true) +!8 = !DIGlobalVariableExpression(var: !9) +!9 = !DIGlobalVariable(name: "x4", scope: !2, file: !2, line: 12, type: !3, isLocal: true, isDefinition: true) +!10 = !DIGlobalVariableExpression(var: !11) +!11 = !DIGlobalVariable(name: "x5", scope: !2, file: !2, line: 15, type: !3, isLocal: false, isDefinition: true) +!12 = distinct !DICompileUnit(language: DW_LANG_C89, file: !2, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2369.8)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !13, retainedTypes: !13, globals: !14, imports: !13) +!13 = !{} +!14 = !{!0, !4, !6, !8, !10} +!15 = !{i32 1, !"Debug Info Version", i32 3} +!16 = distinct !DISubprogram(name: "get1", linkageName: "get1", scope: !2, file: !2, line: 4, type: !17, isLocal: false, isDefinition: true, scopeLine: 4, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !19) +!17 = !DISubroutineType(types: !18) +!18 = !{!3, !3} +!19 = !{!20, !21} +!20 = !DILocalVariable(name: "a", arg: 1, scope: !16, file: !2, line: 4, type: !3) +!21 = !DILocalVariable(name: "b", scope: !22, file: !2, line: 4, type: !3) +!22 = distinct !DILexicalBlock(scope: !16, file: !2, line: 4) +!23 = !DIExpression() +!24 = !DILocation(line: 4, scope: !16) +!25 = !DILocation(line: 4, scope: !22) +!26 = distinct !DISubprogram(name: "get2", linkageName: "get2", scope: !2, file: !2, line: 7, type: !17, isLocal: false, isDefinition: true, scopeLine: 7, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !27) +!27 = !{!28, !29} +!28 = !DILocalVariable(name: "a", arg: 1, scope: !26, file: !2, line: 7, type: !3) +!29 = !DILocalVariable(name: "b", scope: !30, file: !2, line: 7, type: !3) +!30 = distinct !DILexicalBlock(scope: !26, file: !2, line: 7) +!31 = !DILocation(line: 7, scope: !26) +!32 = !DILocation(line: 7, scope: !30) +!33 = distinct !DISubprogram(name: "get3", linkageName: "get3", scope: !2, file: !2, line: 10, type: !17, isLocal: false, isDefinition: true, scopeLine: 10, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !34) +!34 = !{!35, !36} +!35 = !DILocalVariable(name: "a", arg: 1, scope: !33, file: !2, line: 10, type: !3) +!36 = !DILocalVariable(name: "b", scope: !37, file: !2, line: 10, type: !3) +!37 = distinct !DILexicalBlock(scope: !33, file: !2, line: 10) +!38 = !DILocation(line: 10, scope: !33) +!39 = !DILocation(line: 10, scope: !37) +!40 = distinct !DISubprogram(name: "get4", linkageName: "get4", scope: !2, file: !2, line: 13, type: !17, isLocal: false, isDefinition: true, scopeLine: 13, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !41) +!41 = !{!42, !43} +!42 = !DILocalVariable(name: "a", arg: 1, scope: !40, file: !2, line: 13, type: !3) +!43 = !DILocalVariable(name: "b", scope: !44, file: !2, line: 13, type: !3) +!44 = distinct !DILexicalBlock(scope: !40, file: !2, line: 13) +!45 = !DILocation(line: 13, scope: !40) +!46 = !DILocation(line: 13, scope: !44) +!47 = distinct !DISubprogram(name: "get5", linkageName: "get5", scope: !2, file: !2, line: 16, type: !17, isLocal: false, isDefinition: true, scopeLine: 16, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !48) +!48 = !{!49, !50} +!49 = !DILocalVariable(name: "a", arg: 1, scope: !47, file: !2, line: 16, type: !3) +!50 = !DILocalVariable(name: "b", scope: !51, file: !2, line: 16, type: !3) +!51 = distinct !DILexicalBlock(scope: !47, file: !2, line: 16) +!52 = !DILocation(line: 16, scope: !47) +!53 = !DILocation(line: 16, scope: !51) + diff --git a/llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll b/llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll index 6f9febc2010..69e5a0d77a1 100644 --- a/llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll +++ b/llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll @@ -19,103 +19,121 @@ ; CHECK-NOT: {{DW_TAG|NULL}} ; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x7> 03 [[ADDR]] 23 04 ) +source_filename = "test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll" target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-macosx10.7.0" -@x1 = internal unnamed_addr global i32 1, align 4, !dbg !25 -@x2 = internal unnamed_addr global i32 2, align 4, !dbg !26 +@x1 = internal unnamed_addr global i32 1, align 4, !dbg !0 +@x2 = internal unnamed_addr global i32 2, align 4, !dbg !6 @x3 = internal unnamed_addr global i32 3, align 4 @x4 = internal unnamed_addr global i32 4, align 4 @x5 = global i32 0, align 4 -define i32 @get1(i32 %a) nounwind optsize ssp !dbg !1 { - tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !10, metadata !DIExpression()), !dbg !30 - %1 = load i32, i32* @x1, align 4, !dbg !31 - tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !11, metadata !DIExpression()), !dbg !31 - store i32 %a, i32* @x1, align 4, !dbg !31 - ret i32 %1, !dbg !31 +; Function Attrs: nounwind optsize ssp +define i32 @get1(i32 %a) #0 !dbg !10 { + tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !14, metadata !17), !dbg !18 + %1 = load i32, i32* @x1, align 4, !dbg !19 + tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !15, metadata !17), !dbg !19 + store i32 %a, i32* @x1, align 4, !dbg !19 + ret i32 %1, !dbg !19 } -define i32 @get2(i32 %a) nounwind optsize ssp !dbg !6 { - tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !13, metadata !DIExpression()), !dbg !32 - %1 = load i32, i32* @x2, align 4, !dbg !33 - tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !14, metadata !DIExpression()), !dbg !33 - store i32 %a, i32* @x2, align 4, !dbg !33 - ret i32 %1, !dbg !33 +; Function Attrs: nounwind optsize ssp + +define i32 @get2(i32 %a) #0 !dbg !20 { + tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !22, metadata !17), !dbg !25 + %1 = load i32, i32* @x2, align 4, !dbg !26 + tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !23, metadata !17), !dbg !26 + store i32 %a, i32* @x2, align 4, !dbg !26 + ret i32 %1, !dbg !26 } -define i32 @get3(i32 %a) nounwind optsize ssp !dbg !7 { - tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !16, metadata !DIExpression()), !dbg !34 - %1 = load i32, i32* @x3, align 4, !dbg !35 - tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !17, metadata !DIExpression()), !dbg !35 - store i32 %a, i32* @x3, align 4, !dbg !35 - ret i32 %1, !dbg !35 +; Function Attrs: nounwind optsize ssp + +define i32 @get3(i32 %a) #0 !dbg !27 { + tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !29, metadata !17), !dbg !32 + %1 = load i32, i32* @x3, align 4, !dbg !33 + tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !30, metadata !17), !dbg !33 + store i32 %a, i32* @x3, align 4, !dbg !33 + ret i32 %1, !dbg !33 } -define i32 @get4(i32 %a) nounwind optsize ssp !dbg !8 { - tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !19, metadata !DIExpression()), !dbg !36 - %1 = load i32, i32* @x4, align 4, !dbg !37 - tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !20, metadata !DIExpression()), !dbg !37 - store i32 %a, i32* @x4, align 4, !dbg !37 - ret i32 %1, !dbg !37 +; Function Attrs: nounwind optsize ssp + +define i32 @get4(i32 %a) #0 !dbg !34 { + tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !36, metadata !17), !dbg !39 + %1 = load i32, i32* @x4, align 4, !dbg !40 + tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !37, metadata !17), !dbg !40 + store i32 %a, i32* @x4, align 4, !dbg !40 + ret i32 %1, !dbg !40 } -define i32 @get5(i32 %a) nounwind optsize ssp !dbg !9 { - tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !27, metadata !DIExpression()), !dbg !38 - %1 = load i32, i32* @x5, align 4, !dbg !39 - tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !28, metadata !DIExpression()), !dbg !39 - store i32 %a, i32* @x5, align 4, !dbg !39 - ret i32 %1, !dbg !39 +; Function Attrs: nounwind optsize ssp + +define i32 @get5(i32 %a) #0 !dbg !41 { + tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !43, metadata !17), !dbg !46 + %1 = load i32, i32* @x5, align 4, !dbg !47 + tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !44, metadata !17), !dbg !47 + store i32 %a, i32* @x5, align 4, !dbg !47 + ret i32 %1, !dbg !47 } -declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone - -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!49} - -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !47, enums: !48, retainedTypes: !48, globals: !41, imports: !48) -!1 = distinct !DISubprogram(name: "get1", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !47, scope: !2, type: !3, variables: !42) -!2 = !DIFile(filename: "ss3.c", directory: "/private/tmp") -!3 = !DISubroutineType(types: !4) -!4 = !{!5} -!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "get2", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 8, file: !47, scope: !2, type: !3, variables: !43) -!7 = distinct !DISubprogram(name: "get3", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 11, file: !47, scope: !2, type: !3, variables: !44) -!8 = distinct !DISubprogram(name: "get4", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !47, scope: !2, type: !3, variables: !45) -!9 = distinct !DISubprogram(name: "get5", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 17, file: !47, scope: !2, type: !3, variables: !46) -!10 = !DILocalVariable(name: "a", line: 5, arg: 1, scope: !1, file: !2, type: !5) -!11 = !DILocalVariable(name: "b", line: 5, scope: !12, file: !2, type: !5) -!12 = distinct !DILexicalBlock(line: 5, column: 19, file: !47, scope: !1) -!13 = !DILocalVariable(name: "a", line: 8, arg: 1, scope: !6, file: !2, type: !5) -!14 = !DILocalVariable(name: "b", line: 8, scope: !15, file: !2, type: !5) -!15 = distinct !DILexicalBlock(line: 8, column: 17, file: !47, scope: !6) -!16 = !DILocalVariable(name: "a", line: 11, arg: 1, scope: !7, file: !2, type: !5) -!17 = !DILocalVariable(name: "b", line: 11, scope: !18, file: !2, type: !5) -!18 = distinct !DILexicalBlock(line: 11, column: 19, file: !47, scope: !7) -!19 = !DILocalVariable(name: "a", line: 14, arg: 1, scope: !8, file: !2, type: !5) -!20 = !DILocalVariable(name: "b", line: 14, scope: !21, file: !2, type: !5) -!21 = distinct !DILexicalBlock(line: 14, column: 19, file: !47, scope: !8) -!25 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x1", line: 4, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !5)) -!26 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x2", line: 7, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !5)) -!27 = !DILocalVariable(name: "a", line: 17, arg: 1, scope: !9, file: !2, type: !5) -!28 = !DILocalVariable(name: "b", line: 17, scope: !29, file: !2, type: !5) -!29 = distinct !DILexicalBlock(line: 17, column: 19, file: !47, scope: !9) -!30 = !DILocation(line: 5, column: 16, scope: !1) -!31 = !DILocation(line: 5, column: 32, scope: !12) -!32 = !DILocation(line: 8, column: 14, scope: !6) -!33 = !DILocation(line: 8, column: 29, scope: !15) -!34 = !DILocation(line: 11, column: 16, scope: !7) -!35 = !DILocation(line: 11, column: 32, scope: !18) -!36 = !DILocation(line: 14, column: 16, scope: !8) -!37 = !DILocation(line: 14, column: 32, scope: !21) -!38 = !DILocation(line: 17, column: 16, scope: !9) -!39 = !DILocation(line: 17, column: 32, scope: !29) -!41 = !{!25, !26} -!42 = !{!10, !11} -!43 = !{!13, !14} -!44 = !{!16, !17} -!45 = !{!19, !20} -!46 = !{!27, !28} -!47 = !DIFile(filename: "ss3.c", directory: "/private/tmp") -!48 = !{} -!49 = !{i32 1, !"Debug Info Version", i32 3} +; Function Attrs: nounwind readnone + +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 + +attributes #0 = { nounwind optsize ssp } +attributes #1 = { nounwind readnone } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!9} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "x1", scope: !2, file: !3, line: 4, type: !8, isLocal: true, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4) +!3 = !DIFile(filename: "ss3.c", directory: "/private/tmp") +!4 = !{} +!5 = !{!0, !6} +!6 = !DIGlobalVariableExpression(var: !7) +!7 = !DIGlobalVariable(name: "x2", scope: !2, file: !3, line: 7, type: !8, isLocal: true, isDefinition: true) +!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!9 = !{i32 1, !"Debug Info Version", i32 3} +!10 = distinct !DISubprogram(name: "get1", scope: !3, file: !3, line: 5, type: !11, isLocal: false, isDefinition: true, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !13) +!11 = !DISubroutineType(types: !12) +!12 = !{!8} +!13 = !{!14, !15} +!14 = !DILocalVariable(name: "a", arg: 1, scope: !10, file: !3, line: 5, type: !8) +!15 = !DILocalVariable(name: "b", scope: !16, file: !3, line: 5, type: !8) +!16 = distinct !DILexicalBlock(scope: !10, file: !3, line: 5, column: 19) +!17 = !DIExpression() +!18 = !DILocation(line: 5, column: 16, scope: !10) +!19 = !DILocation(line: 5, column: 32, scope: !16) +!20 = distinct !DISubprogram(name: "get2", scope: !3, file: !3, line: 8, type: !11, isLocal: false, isDefinition: true, scopeLine: 8, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !21) +!21 = !{!22, !23} +!22 = !DILocalVariable(name: "a", arg: 1, scope: !20, file: !3, line: 8, type: !8) +!23 = !DILocalVariable(name: "b", scope: !24, file: !3, line: 8, type: !8) +!24 = distinct !DILexicalBlock(scope: !20, file: !3, line: 8, column: 17) +!25 = !DILocation(line: 8, column: 14, scope: !20) +!26 = !DILocation(line: 8, column: 29, scope: !24) +!27 = distinct !DISubprogram(name: "get3", scope: !3, file: !3, line: 11, type: !11, isLocal: false, isDefinition: true, scopeLine: 11, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !28) +!28 = !{!29, !30} +!29 = !DILocalVariable(name: "a", arg: 1, scope: !27, file: !3, line: 11, type: !8) +!30 = !DILocalVariable(name: "b", scope: !31, file: !3, line: 11, type: !8) +!31 = distinct !DILexicalBlock(scope: !27, file: !3, line: 11, column: 19) +!32 = !DILocation(line: 11, column: 16, scope: !27) +!33 = !DILocation(line: 11, column: 32, scope: !31) +!34 = distinct !DISubprogram(name: "get4", scope: !3, file: !3, line: 14, type: !11, isLocal: false, isDefinition: true, scopeLine: 14, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !35) +!35 = !{!36, !37} +!36 = !DILocalVariable(name: "a", arg: 1, scope: !34, file: !3, line: 14, type: !8) +!37 = !DILocalVariable(name: "b", scope: !38, file: !3, line: 14, type: !8) +!38 = distinct !DILexicalBlock(scope: !34, file: !3, line: 14, column: 19) +!39 = !DILocation(line: 14, column: 16, scope: !34) +!40 = !DILocation(line: 14, column: 32, scope: !38) +!41 = distinct !DISubprogram(name: "get5", scope: !3, file: !3, line: 17, type: !11, isLocal: false, isDefinition: true, scopeLine: 17, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !42) +!42 = !{!43, !44} +!43 = !DILocalVariable(name: "a", arg: 1, scope: !41, file: !3, line: 17, type: !8) +!44 = !DILocalVariable(name: "b", scope: !45, file: !3, line: 17, type: !8) +!45 = distinct !DILexicalBlock(scope: !41, file: !3, line: 17, column: 19) +!46 = !DILocation(line: 17, column: 16, scope: !41) +!47 = !DILocation(line: 17, column: 32, scope: !45) + diff --git a/llvm/test/CodeGen/ARM/coalesce-dbgvalue.ll b/llvm/test/CodeGen/ARM/coalesce-dbgvalue.ll index 1437b12a4e9..c346ea102c3 100644 --- a/llvm/test/CodeGen/ARM/coalesce-dbgvalue.ll +++ b/llvm/test/CodeGen/ARM/coalesce-dbgvalue.ll @@ -6,18 +6,19 @@ ; instruction which must be updated during ; ConnectedVNInfoEqClasses::Distribute(). +source_filename = "test/CodeGen/ARM/coalesce-dbgvalue.ll" target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32" target triple = "thumbv7-apple-ios3.0.0" -@c = common global i32 0, align 4, !dbg !19 -@b = common global i32 0, align 4, !dbg !18 -@a = common global i64 0, align 8, !dbg !16 -@d = common global i32 0, align 4, !dbg !20 +@c = common global i32 0, align 4, !dbg !0 +@b = common global i32 0, align 4, !dbg !4 +@a = common global i64 0, align 8, !dbg !6 +@d = common global i32 0, align 4, !dbg !9 ; Function Attrs: nounwind ssp -define i32 @pr16110() #0 !dbg !4 { +define i32 @pr16110() #0 !dbg !15 { for.cond1.preheader: - store i32 0, i32* @c, align 4, !dbg !21 + store i32 0, i32* @c, align 4, !dbg !24 br label %for.cond1.outer, !dbg !26 for.cond1: ; preds = %for.end9, %for.cond1.outer @@ -27,11 +28,11 @@ for.cond1: ; preds = %for.end9, %for.cond for.body2: ; preds = %for.cond1 store i32 %storemerge11, i32* @b, align 4, !dbg !26 - tail call void @llvm.dbg.value(metadata i32* null, i64 0, metadata !11, metadata !DIExpression()), !dbg !28 + tail call void @llvm.dbg.value(metadata i32* null, i64 0, metadata !20, metadata !27), !dbg !28 %0 = load i64, i64* @a, align 8, !dbg !29 %xor = xor i64 %0, %e.1.ph, !dbg !29 %conv3 = trunc i64 %xor to i32, !dbg !29 - tail call void @llvm.dbg.value(metadata i32 %conv3, i64 0, metadata !10, metadata !DIExpression()), !dbg !29 + tail call void @llvm.dbg.value(metadata i32 %conv3, i64 0, metadata !19, metadata !27), !dbg !29 %tobool4 = icmp eq i32 %conv3, 0, !dbg !29 br i1 %tobool4, label %land.end, label %land.rhs, !dbg !29 @@ -52,16 +53,16 @@ land.end: ; preds = %land.rhs, %for.body for.cond1.outer: ; preds = %land.end, %for.cond1.preheader %storemerge11.ph = phi i32 [ %inc8, %land.end ], [ 0, %for.cond1.preheader ] %e.1.ph = phi i64 [ %phitmp, %land.end ], [ 0, %for.cond1.preheader ] - %3 = load i32, i32* @d, align 4, !dbg !31 - %tobool10 = icmp eq i32 %3, 0, !dbg !31 + %3 = load i32, i32* @d, align 4, !dbg !30 + %tobool10 = icmp eq i32 %3, 0, !dbg !30 br label %for.cond1 for.end9: ; preds = %for.cond1 - br i1 %tobool10, label %if.end, label %for.cond1, !dbg !31 + br i1 %tobool10, label %if.end, label %for.cond1, !dbg !30 if.end: ; preds = %for.end9 store i32 %storemerge11, i32* @b, align 4, !dbg !26 - ret i32 0, !dbg !32 + ret i32 0, !dbg !31 } declare i32 @fn2(...) #1 @@ -76,35 +77,39 @@ attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n attributes #2 = { nounwind readnone } attributes #3 = { nounwind } -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!33} - -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 182024) (llvm/trunk 182023)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !15, imports: !2) -!1 = !DIFile(filename: "pr16110.c", directory: "/d/b") -!2 = !{} -!4 = distinct !DISubprogram(name: "pr16110", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !9) -!5 = !DIFile(filename: "pr16110.c", directory: "/d/b") -!6 = !DISubroutineType(types: !7) -!7 = !{!8} -!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = !{!10, !11} -!10 = !DILocalVariable(name: "e", line: 8, scope: !4, file: !5, type: !8) -!11 = !DILocalVariable(name: "f", line: 13, scope: !12, file: !5, type: !14) -!12 = distinct !DILexicalBlock(line: 12, column: 0, file: !1, scope: !13) -!13 = distinct !DILexicalBlock(line: 12, column: 0, file: !1, scope: !4) -!14 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !8) -!15 = !{!16, !18, !19, !20} -!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !17)) -!17 = !DIBasicType(tag: DW_TAG_base_type, name: "long long int", size: 64, align: 32, encoding: DW_ATE_signed) -!18 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8)) -!19 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "c", line: 3, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8)) -!20 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "d", line: 4, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8)) -!21 = !DILocation(line: 10, scope: !22) -!22 = distinct !DILexicalBlock(line: 10, column: 0, file: !1, scope: !4) -!26 = !DILocation(line: 12, scope: !13) -!27 = !{i32* null} -!28 = !DILocation(line: 13, scope: !12) -!29 = !DILocation(line: 14, scope: !12) -!31 = !DILocation(line: 16, scope: !4) -!32 = !DILocation(line: 18, scope: !4) -!33 = !{i32 1, !"Debug Info Version", i32 3} +!llvm.dbg.cu = !{!11} +!llvm.module.flags = !{!14} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "c", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "pr16110.c", directory: "/d/b") +!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!4 = !DIGlobalVariableExpression(var: !5) +!5 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true) +!6 = !DIGlobalVariableExpression(var: !7) +!7 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 1, type: !8, isLocal: false, isDefinition: true) +!8 = !DIBasicType(name: "long long int", size: 64, align: 32, encoding: DW_ATE_signed) +!9 = !DIGlobalVariableExpression(var: !10) +!10 = !DIGlobalVariable(name: "d", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true) +!11 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.4 (trunk 182024) (llvm/trunk 182023)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !12, retainedTypes: !12, globals: !13, imports: !12) +!12 = !{} +!13 = !{!6, !4, !0, !9} +!14 = !{i32 1, !"Debug Info Version", i32 3} +!15 = distinct !DISubprogram(name: "pr16110", scope: !2, file: !2, line: 7, type: !16, isLocal: false, isDefinition: true, scopeLine: 7, virtualIndex: 6, isOptimized: true, unit: !11, variables: !18) +!16 = !DISubroutineType(types: !17) +!17 = !{!3} +!18 = !{!19, !20} +!19 = !DILocalVariable(name: "e", scope: !15, file: !2, line: 8, type: !3) +!20 = !DILocalVariable(name: "f", scope: !21, file: !2, line: 13, type: !23) +!21 = distinct !DILexicalBlock(scope: !22, file: !2, line: 12) +!22 = distinct !DILexicalBlock(scope: !15, file: !2, line: 12) +!23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 32, align: 32) +!24 = !DILocation(line: 10, scope: !25) +!25 = distinct !DILexicalBlock(scope: !15, file: !2, line: 10) +!26 = !DILocation(line: 12, scope: !22) +!27 = !DIExpression() +!28 = !DILocation(line: 13, scope: !21) +!29 = !DILocation(line: 14, scope: !21) +!30 = !DILocation(line: 16, scope: !15) +!31 = !DILocation(line: 18, scope: !15) + |