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/Transforms/GlobalOpt | |
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/Transforms/GlobalOpt')
-rw-r--r-- | llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll | 106 |
1 files changed, 52 insertions, 54 deletions
diff --git a/llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll b/llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll index cced3c3b464..c785e13403c 100644 --- a/llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll +++ b/llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll @@ -2,81 +2,79 @@ ; RUN: opt < %s -globalopt -stats -disable-output 2>&1 | FileCheck %s ; CHECK: 1 globalopt - Number of global vars shrunk to booleans -@Stop = internal global i32 0, !dbg !0 ; <i32*> [#uses=3] +source_filename = "test/Transforms/GlobalOpt/2009-03-05-dbg.ll" -define i32 @foo(i32 %i) nounwind ssp { +@Stop = internal global i32 0, !dbg !0 + +; Function Attrs: nounwind ssp +define i32 @foo(i32 %i) #0 { entry: - %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] - call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !3, metadata !DIExpression()), !dbg !7 - %0 = icmp eq i32 %i, 1, !dbg !7 ; <i1> [#uses=1] - br i1 %0, label %bb, label %bb1, !dbg !7 + %"alloca point" = bitcast i32 0 to i32 + call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !8, metadata !12), !dbg !13 + %0 = icmp eq i32 %i, 1, !dbg !13 + br i1 %0, label %bb, label %bb1, !dbg !13 bb: ; preds = %entry - store i32 0, i32* @Stop, align 4, !dbg !9 - %1 = mul nsw i32 %i, 42, !dbg !10 ; <i32> [#uses=1] - call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !3, metadata !DIExpression()), !dbg !10 - br label %bb2, !dbg !10 + store i32 0, i32* @Stop, align 4, !dbg !15 + %1 = mul nsw i32 %i, 42, !dbg !16 + call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !8, metadata !12), !dbg !16 + br label %bb2, !dbg !16 bb1: ; preds = %entry - store i32 1, i32* @Stop, align 4, !dbg !11 - br label %bb2, !dbg !11 + store i32 1, i32* @Stop, align 4, !dbg !17 + br label %bb2, !dbg !17 bb2: ; preds = %bb1, %bb - %i_addr.0 = phi i32 [ %1, %bb ], [ %i, %bb1 ] ; <i32> [#uses=1] - br label %return, !dbg !12 + %i_addr.0 = phi i32 [ %1, %bb ], [ %i, %bb1 ] + br label %return, !dbg !18 return: ; preds = %bb2 - ret i32 %i_addr.0, !dbg !12 + ret i32 %i_addr.0, !dbg !18 } -declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone +; Function Attrs: nounwind readnone + +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -define i32 @bar() nounwind ssp { +; Function Attrs: nounwind ssp +define i32 @bar() #0 { entry: - %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] - %0 = load i32, i32* @Stop, align 4, !dbg !13 ; <i32> [#uses=1] - %1 = icmp eq i32 %0, 1, !dbg !13 ; <i1> [#uses=1] - br i1 %1, label %bb, label %bb1, !dbg !13 + %"alloca point" = bitcast i32 0 to i32 + %0 = load i32, i32* @Stop, align 4, !dbg !19 + %1 = icmp eq i32 %0, 1, !dbg !19 + br i1 %1, label %bb, label %bb1, !dbg !19 bb: ; preds = %entry - br label %bb2, !dbg !18 + + br label %bb2, !dbg !24 bb1: ; preds = %entry - br label %bb2, !dbg !19 + br label %bb2, !dbg !25 bb2: ; preds = %bb1, %bb - %.0 = phi i32 [ 0, %bb ], [ 1, %bb1 ] ; <i32> [#uses=1] - br label %return, !dbg !19 + %.0 = phi i32 [ 0, %bb ], [ 1, %bb1 ] + br label %return, !dbg !25 return: ; preds = %bb2 - ret i32 %.0, !dbg !19 + ret i32 %.0, !dbg !25 } -declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone - -!llvm.dbg.cu = !{!1} -!llvm.module.flags = !{!21, !22} - -!0 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "Stop", line: 2, isLocal: true, isDefinition: true, scope: !1, file: !20, type: !2)) -!1 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !20, globals: !{!0}) -!2 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!3 = !DILocalVariable(name: "i", line: 4, arg: 1, scope: !4, file: !20, type: !2) -!4 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !1, scope: !1, type: !5) -!5 = !DISubroutineType(types: !6) -!6 = !{!2, !2} -!7 = !DILocation(line: 5, scope: !8) -!8 = distinct !DILexicalBlock(line: 0, column: 0, file: !20, scope: !4) -!9 = !DILocation(line: 6, scope: !8) -!10 = !DILocation(line: 7, scope: !8) -!11 = !DILocation(line: 9, scope: !8) -!12 = !DILocation(line: 11, scope: !8) -!13 = !DILocation(line: 14, scope: !14) -!14 = distinct !DILexicalBlock(line: 0, column: 0, file: !20, scope: !15) -!15 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !1, scope: !1, type: !16) -!16 = !DISubroutineType(types: !17) -!17 = !{!2} -!18 = !DILocation(line: 15, scope: !14) -!19 = !DILocation(line: 16, scope: !14) -!20 = !DIFile(filename: "g.c", directory: "/tmp") -!21 = !{i32 2, !"Dwarf Version", i32 2} -!22 = !{i32 2, !"Debug Info Version", i32 3} +; Function Attrs: nounwind readnone +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 + +attributes #0 = { nounwind ssp } +attributes #1 = { nounwind readnone } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!6, !7} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "Stop", scope: !2, file: !3, line: 2, type: !5, isLocal: true, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, file: !3, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4) +!3 = !DIFile(filename: "g.c", directory: "/tmp") +!4 = !{!0} +!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!6 = !{i32 2, !"Dwarf Version", i32 2} +!7 = !{i32 2, !"Debug Info Version", i32 3} +!8 = !DILocalVariable(name: "i", arg: 1, scope: !9, file: !3, line: 4, type: !5) +!9 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !2, line: 4, type: !10, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2)!10 = !DISubroutineType(types: !11)!11 = !{!5, !5}!12 = !DIExpression()!13 = !DILocation(line: 5, scope: !14)!14 = distinct !DILexicalBlock(scope: !9, file: !3)!15 = !DILocation(line: 6, scope: !14)!16 = !DILocation(line: 7, scope: !14)!17 = !DILocation(line: 9, scope: !14)!18 = !DILocation(line: 11, scope: !14)!19 = !DILocation(line: 14, scope: !20)!20 = distinct !DILexicalBlock(scope: !21, file: !3)!21 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !2, line: 13, type: !22, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2)!22 = !DISubroutineType(types: !23)!23 = !{!5}!24 = !DILocation(line: 15, scope: !20)!25 = !DILocation(line: 16, scope: !20)
\ No newline at end of file |