DI: Require subprogram definitions to be distinct
[oota-llvm.git] / test / Transforms / SampleProfile / propagate.ll
index 8a115d734d8ccdcdc33cb1a8d4906994b69bca0c..7d5ce7368a2c68cf5889f96b2e24e7de9681e5fb 100644 (file)
@@ -73,8 +73,8 @@ for.cond:                                         ; preds = %for.inc16, %if.else
   %5 = load i64, i64* %N.addr, align 8, !dbg !15
   %cmp1 = icmp slt i64 %4, %5, !dbg !15
   br i1 %cmp1, label %for.body, label %for.end18, !dbg !15
-; CHECK: edge for.cond -> for.body probability is 10 / 11 = 90.9091% [HOT edge]
-; CHECK: edge for.cond -> for.end18 probability is 1 / 11 = 9.09091%
+; CHECK: edge for.cond -> for.body probability is 10 / 10 = 100% [HOT edge]
+; CHECK: edge for.cond -> for.end18 probability is 0 / 10 = 0%
 
 for.body:                                         ; preds = %for.cond
   %6 = load i64, i64* %i, align 8, !dbg !18
@@ -119,8 +119,8 @@ for.cond8:                                        ; preds = %for.inc, %if.else7
   %14 = load i64, i64* %i, align 8, !dbg !28
   %cmp10 = icmp slt i64 %conv9, %14, !dbg !28
   br i1 %cmp10, label %for.body11, label %for.end, !dbg !28
-; CHECK: edge for.cond8 -> for.body11 probability is 16191 / 16192 = 99.9938% [HOT edge]
-; CHECK: edge for.cond8 -> for.end probability is 1 / 16192 = 0.00617589%
+; CHECK: edge for.cond8 -> for.body11 probability is 16191 / 16191 = 100% [HOT edge]
+; CHECK: edge for.cond8 -> for.end probability is 0 / 16191 = 0%
 
 for.body11:                                       ; preds = %for.cond8
   %15 = load i32, i32* %j, align 4, !dbg !31
@@ -184,7 +184,7 @@ entry:
   %4 = load i32, i32* %y, align 4, !dbg !41
   %5 = load i64, i64* %N, align 8, !dbg !41
   %call = call i64 @_Z3fooiil(i32 %3, i32 %4, i64 %5), !dbg !41
-  %call1 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([24 x i8]* @.str, i32 0, i32 0), i32 %0, i32 %1, i64 %2, i64 %call), !dbg !41
+  %call1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i32 0, i32 0), i32 %0, i32 %1, i64 %2, i64 %call), !dbg !41
   ret i32 0, !dbg !42
 }
 
@@ -198,46 +198,46 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
 !llvm.module.flags = !{!8, !9}
 !llvm.ident = !{!10}
 
-!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2)
-!1 = !MDFile(filename: "propagate.cc", directory: ".")
-!2 = !{i32 0}
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2)
+!1 = !DIFile(filename: "propagate.cc", directory: ".")
+!2 = !{}
 !3 = !{!4, !7}
-!4 = !MDSubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: i64 (i32, i32, i64)* @_Z3fooiil, variables: !2)
-!5 = !MDFile(filename: "propagate.cc", directory: ".")
-!6 = !MDSubroutineType(types: !2)
-!7 = !MDSubprogram(name: "main", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
+!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: i64 (i32, i32, i64)* @_Z3fooiil, variables: !2)
+!5 = !DIFile(filename: "propagate.cc", directory: ".")
+!6 = !DISubroutineType(types: !{null})
+!7 = distinct !DISubprogram(name: "main", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
 !8 = !{i32 2, !"Dwarf Version", i32 4}
 !9 = !{i32 1, !"Debug Info Version", i32 3}
 !10 = !{!"clang version 3.5 "}
-!11 = !MDLocation(line: 4, scope: !12)
-!12 = distinct !MDLexicalBlock(line: 4, column: 0, file: !1, scope: !4)
-!13 = !MDLocation(line: 5, scope: !14)
-!14 = distinct !MDLexicalBlock(line: 4, column: 0, file: !1, scope: !12)
-!15 = !MDLocation(line: 7, scope: !16)
-!16 = distinct !MDLexicalBlock(line: 7, column: 0, file: !1, scope: !17)
-!17 = distinct !MDLexicalBlock(line: 6, column: 0, file: !1, scope: !12)
-!18 = !MDLocation(line: 8, scope: !19)
-!19 = distinct !MDLexicalBlock(line: 8, column: 0, file: !1, scope: !20)
-!20 = distinct !MDLexicalBlock(line: 7, column: 0, file: !1, scope: !16)
-!21 = !MDLocation(line: 9, scope: !19)
-!22 = !MDLocation(line: 10, scope: !23)
-!23 = distinct !MDLexicalBlock(line: 10, column: 0, file: !1, scope: !20)
-!24 = !MDLocation(line: 11, scope: !25)
-!25 = distinct !MDLexicalBlock(line: 10, column: 0, file: !1, scope: !23)
-!26 = !MDLocation(line: 12, scope: !25)
-!27 = !MDLocation(line: 13, scope: !25)
-!28 = !MDLocation(line: 14, scope: !29)
-!29 = distinct !MDLexicalBlock(line: 14, column: 0, file: !1, scope: !30)
-!30 = distinct !MDLexicalBlock(line: 13, column: 0, file: !1, scope: !23)
-!31 = !MDLocation(line: 15, scope: !32)
-!32 = distinct !MDLexicalBlock(line: 14, column: 0, file: !1, scope: !29)
-!33 = !MDLocation(line: 16, scope: !32)
-!34 = !MDLocation(line: 17, scope: !32)
-!35 = !MDLocation(line: 19, scope: !20)
-!36 = !MDLocation(line: 21, scope: !4)
-!37 = !MDLocation(line: 22, scope: !4)
-!38 = !MDLocation(line: 25, scope: !7)
-!39 = !MDLocation(line: 26, scope: !7)
-!40 = !MDLocation(line: 27, scope: !7)
-!41 = !MDLocation(line: 28, scope: !7)
-!42 = !MDLocation(line: 29, scope: !7)
+!11 = !DILocation(line: 4, scope: !12)
+!12 = distinct !DILexicalBlock(line: 4, column: 0, file: !1, scope: !4)
+!13 = !DILocation(line: 5, scope: !14)
+!14 = distinct !DILexicalBlock(line: 4, column: 0, file: !1, scope: !12)
+!15 = !DILocation(line: 7, scope: !16)
+!16 = distinct !DILexicalBlock(line: 7, column: 0, file: !1, scope: !17)
+!17 = distinct !DILexicalBlock(line: 6, column: 0, file: !1, scope: !12)
+!18 = !DILocation(line: 8, scope: !19)
+!19 = distinct !DILexicalBlock(line: 8, column: 0, file: !1, scope: !20)
+!20 = distinct !DILexicalBlock(line: 7, column: 0, file: !1, scope: !16)
+!21 = !DILocation(line: 9, scope: !19)
+!22 = !DILocation(line: 10, scope: !23)
+!23 = distinct !DILexicalBlock(line: 10, column: 0, file: !1, scope: !20)
+!24 = !DILocation(line: 11, scope: !25)
+!25 = distinct !DILexicalBlock(line: 10, column: 0, file: !1, scope: !23)
+!26 = !DILocation(line: 12, scope: !25)
+!27 = !DILocation(line: 13, scope: !25)
+!28 = !DILocation(line: 14, scope: !29)
+!29 = distinct !DILexicalBlock(line: 14, column: 0, file: !1, scope: !30)
+!30 = distinct !DILexicalBlock(line: 13, column: 0, file: !1, scope: !23)
+!31 = !DILocation(line: 15, scope: !32)
+!32 = distinct !DILexicalBlock(line: 14, column: 0, file: !1, scope: !29)
+!33 = !DILocation(line: 16, scope: !32)
+!34 = !DILocation(line: 17, scope: !32)
+!35 = !DILocation(line: 19, scope: !20)
+!36 = !DILocation(line: 21, scope: !4)
+!37 = !DILocation(line: 22, scope: !4)
+!38 = !DILocation(line: 25, scope: !7)
+!39 = !DILocation(line: 26, scope: !7)
+!40 = !DILocation(line: 27, scope: !7)
+!41 = !DILocation(line: 28, scope: !7)
+!42 = !DILocation(line: 29, scope: !7)