diff options
Diffstat (limited to 'test/Transforms/SampleProfile')
-rw-r--r-- | test/Transforms/SampleProfile/branch.ll | 98 | ||||
-rw-r--r-- | test/Transforms/SampleProfile/calls.ll | 52 | ||||
-rw-r--r-- | test/Transforms/SampleProfile/discriminator.ll | 44 | ||||
-rw-r--r-- | test/Transforms/SampleProfile/fnptr.ll | 52 | ||||
-rw-r--r-- | test/Transforms/SampleProfile/propagate.ll | 86 |
5 files changed, 166 insertions, 166 deletions
diff --git a/test/Transforms/SampleProfile/branch.ll b/test/Transforms/SampleProfile/branch.ll index e646609..6391fc5 100644 --- a/test/Transforms/SampleProfile/branch.ll +++ b/test/Transforms/SampleProfile/branch.ll @@ -32,8 +32,8 @@ define i32 @main(i32 %argc, i8** nocapture readonly %argv) #0 { ; CHECK: Printing analysis 'Branch Probability Analysis' for function 'main': entry: - tail call void @llvm.dbg.value(metadata !{i32 %argc}, i64 0, metadata !13, metadata !{}), !dbg !27 - tail call void @llvm.dbg.value(metadata !{i8** %argv}, i64 0, metadata !14, metadata !{}), !dbg !27 + tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !13, metadata !{}), !dbg !27 + tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !14, metadata !{}), !dbg !27 %cmp = icmp slt i32 %argc, 2, !dbg !28 br i1 %cmp, label %return, label %if.end, !dbg !28 ; CHECK: edge entry -> return probability is 1 / 2 = 50% @@ -43,7 +43,7 @@ if.end: ; preds = %entry %arrayidx = getelementptr inbounds i8** %argv, i64 1, !dbg !30 %0 = load i8** %arrayidx, align 8, !dbg !30, !tbaa !31 %call = tail call i32 @atoi(i8* %0) #4, !dbg !30 - tail call void @llvm.dbg.value(metadata !{i32 %call}, i64 0, metadata !17, metadata !{}), !dbg !30 + tail call void @llvm.dbg.value(metadata i32 %call, i64 0, metadata !17, metadata !{}), !dbg !30 %cmp1 = icmp sgt i32 %call, 100, !dbg !35 br i1 %cmp1, label %for.body, label %if.end6, !dbg !35 ; CHECK: edge if.end -> for.body probability is 1 / 2 = 50% @@ -55,14 +55,14 @@ for.body: ; preds = %if.end, %for.body %add = fadd double %s.015, 3.049000e+00, !dbg !36 %conv = sitofp i32 %u.016 to double, !dbg !36 %add4 = fadd double %add, %conv, !dbg !36 - tail call void @llvm.dbg.value(metadata !{double %add4}, i64 0, metadata !18, metadata !{}), !dbg !36 + tail call void @llvm.dbg.value(metadata double %add4, i64 0, metadata !18, metadata !{}), !dbg !36 %div = fdiv double 3.940000e+00, %s.015, !dbg !37 %mul = fmul double %div, 3.200000e-01, !dbg !37 %add5 = fadd double %add4, %mul, !dbg !37 %sub = fsub double %add4, %add5, !dbg !37 - tail call void @llvm.dbg.value(metadata !{double %sub}, i64 0, metadata !18, metadata !{}), !dbg !37 + tail call void @llvm.dbg.value(metadata double %sub, i64 0, metadata !18, metadata !{}), !dbg !37 %inc = add nsw i32 %u.016, 1, !dbg !38 - tail call void @llvm.dbg.value(metadata !{i32 %inc}, i64 0, metadata !21, metadata !{}), !dbg !38 + tail call void @llvm.dbg.value(metadata i32 %inc, i64 0, metadata !21, metadata !{}), !dbg !38 %exitcond = icmp eq i32 %inc, %call, !dbg !38 br i1 %exitcond, label %if.end6, label %for.body, !dbg !38 ; CHECK: edge for.body -> if.end6 probability is 1 / 10227 = 0.00977804 @@ -98,46 +98,46 @@ attributes #4 = { nounwind readonly } !llvm.module.flags = !{!25, !42} !llvm.ident = !{!26} -!0 = metadata !{metadata !"0x11\004\00clang version 3.4 (trunk 192896) (llvm/trunk 192895)\001\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [./branch.cc] [DW_LANG_C_plus_plus] -!1 = metadata !{metadata !"branch.cc", metadata !"."} -!2 = metadata !{i32 0} -!3 = metadata !{metadata !4} -!4 = metadata !{metadata !"0x2e\00main\00main\00\004\000\001\000\006\00256\001\004", metadata !1, metadata !5, metadata !6, null, i32 (i32, i8**)* @main, null, null, metadata !12} ; [ DW_TAG_subprogram ] [line 4] [def] [main] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [./branch.cc] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{metadata !8, metadata !8, metadata !9} -!8 = metadata !{metadata !"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] -!9 = metadata !{metadata !"0xf\00\000\0064\0064\000\000", null, null, metadata !10} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ] -!10 = metadata !{metadata !"0xf\00\000\0064\0064\000\000", null, null, metadata !11} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from char] -!11 = metadata !{metadata !"0x24\00char\000\008\008\000\000\006", null, null} ; [ DW_TAG_base_type ] [char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char] -!12 = metadata !{metadata !13, metadata !14, metadata !15, metadata !17, metadata !18, metadata !21, metadata !23} -!13 = metadata !{metadata !"0x101\00argc\0016777220\000", metadata !4, metadata !5, metadata !8} ; [ DW_TAG_arg_variable ] [argc] [line 4] -!14 = metadata !{metadata !"0x101\00argv\0033554436\000", metadata !4, metadata !5, metadata !9} ; [ DW_TAG_arg_variable ] [argv] [line 4] -!15 = metadata !{metadata !"0x100\00result\007\000", metadata !4, metadata !5, metadata !16} ; [ DW_TAG_auto_variable ] [result] [line 7] -!16 = metadata !{metadata !"0x24\00double\000\0064\0064\000\000\004", null, null} ; [ DW_TAG_base_type ] [double] [line 0, size 64, align 64, offset 0, enc DW_ATE_float] -!17 = metadata !{metadata !"0x100\00limit\008\000", metadata !4, metadata !5, metadata !8} ; [ DW_TAG_auto_variable ] [limit] [line 8] -!18 = metadata !{metadata !"0x100\00s\0010\000", metadata !19, metadata !5, metadata !16} ; [ DW_TAG_auto_variable ] [s] [line 10] -!19 = metadata !{metadata !"0xb\009\000\000", metadata !1, metadata !20} ; [ DW_TAG_lexical_block ] [./branch.cc] -!20 = metadata !{metadata !"0xb\009\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [./branch.cc] -!21 = metadata !{metadata !"0x100\00u\0011\000", metadata !22, metadata !5, metadata !8} ; [ DW_TAG_auto_variable ] [u] [line 11] -!22 = metadata !{metadata !"0xb\0011\000\000", metadata !1, metadata !19} ; [ DW_TAG_lexical_block ] [./branch.cc] -!23 = metadata !{metadata !"0x100\00x\0012\000", metadata !24, metadata !5, metadata !16} ; [ DW_TAG_auto_variable ] [x] [line 12] -!24 = metadata !{metadata !"0xb\0011\000\000", metadata !1, metadata !22} ; [ DW_TAG_lexical_block ] [./branch.cc] -!25 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!26 = metadata !{metadata !"clang version 3.4 (trunk 192896) (llvm/trunk 192895)"} -!27 = metadata !{i32 4, i32 0, metadata !4, null} -!28 = metadata !{i32 5, i32 0, metadata !29, null} -!29 = metadata !{metadata !"0xb\005\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [./branch.cc] -!30 = metadata !{i32 8, i32 0, metadata !4, null} -!31 = metadata !{metadata !32, metadata !32, i64 0} -!32 = metadata !{metadata !"any pointer", metadata !33, i64 0} -!33 = metadata !{metadata !"omnipotent char", metadata !34, i64 0} -!34 = metadata !{metadata !"Simple C/C++ TBAA"} -!35 = metadata !{i32 9, i32 0, metadata !20, null} -!36 = metadata !{i32 13, i32 0, metadata !24, null} -!37 = metadata !{i32 14, i32 0, metadata !24, null} -!38 = metadata !{i32 11, i32 0, metadata !22, null} -!39 = metadata !{i32 20, i32 0, metadata !4, null} -!40 = metadata !{i32 21, i32 0, metadata !4, null} -!41 = metadata !{i32 22, i32 0, metadata !4, null} -!42 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} +!0 = !{!"0x11\004\00clang version 3.4 (trunk 192896) (llvm/trunk 192895)\001\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [./branch.cc] [DW_LANG_C_plus_plus] +!1 = !{!"branch.cc", !"."} +!2 = !{i32 0} +!3 = !{!4} +!4 = !{!"0x2e\00main\00main\00\004\000\001\000\006\00256\001\004", !1, !5, !6, null, i32 (i32, i8**)* @main, null, null, !12} ; [ DW_TAG_subprogram ] [line 4] [def] [main] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [./branch.cc] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{!8, !8, !9} +!8 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] +!9 = !{!"0xf\00\000\0064\0064\000\000", null, null, !10} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ] +!10 = !{!"0xf\00\000\0064\0064\000\000", null, null, !11} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from char] +!11 = !{!"0x24\00char\000\008\008\000\000\006", null, null} ; [ DW_TAG_base_type ] [char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char] +!12 = !{!13, !14, !15, !17, !18, !21, !23} +!13 = !{!"0x101\00argc\0016777220\000", !4, !5, !8} ; [ DW_TAG_arg_variable ] [argc] [line 4] +!14 = !{!"0x101\00argv\0033554436\000", !4, !5, !9} ; [ DW_TAG_arg_variable ] [argv] [line 4] +!15 = !{!"0x100\00result\007\000", !4, !5, !16} ; [ DW_TAG_auto_variable ] [result] [line 7] +!16 = !{!"0x24\00double\000\0064\0064\000\000\004", null, null} ; [ DW_TAG_base_type ] [double] [line 0, size 64, align 64, offset 0, enc DW_ATE_float] +!17 = !{!"0x100\00limit\008\000", !4, !5, !8} ; [ DW_TAG_auto_variable ] [limit] [line 8] +!18 = !{!"0x100\00s\0010\000", !19, !5, !16} ; [ DW_TAG_auto_variable ] [s] [line 10] +!19 = !{!"0xb\009\000\000", !1, !20} ; [ DW_TAG_lexical_block ] [./branch.cc] +!20 = !{!"0xb\009\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [./branch.cc] +!21 = !{!"0x100\00u\0011\000", !22, !5, !8} ; [ DW_TAG_auto_variable ] [u] [line 11] +!22 = !{!"0xb\0011\000\000", !1, !19} ; [ DW_TAG_lexical_block ] [./branch.cc] +!23 = !{!"0x100\00x\0012\000", !24, !5, !16} ; [ DW_TAG_auto_variable ] [x] [line 12] +!24 = !{!"0xb\0011\000\000", !1, !22} ; [ DW_TAG_lexical_block ] [./branch.cc] +!25 = !{i32 2, !"Dwarf Version", i32 4} +!26 = !{!"clang version 3.4 (trunk 192896) (llvm/trunk 192895)"} +!27 = !MDLocation(line: 4, scope: !4) +!28 = !MDLocation(line: 5, scope: !29) +!29 = !{!"0xb\005\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [./branch.cc] +!30 = !MDLocation(line: 8, scope: !4) +!31 = !{!32, !32, i64 0} +!32 = !{!"any pointer", !33, i64 0} +!33 = !{!"omnipotent char", !34, i64 0} +!34 = !{!"Simple C/C++ TBAA"} +!35 = !MDLocation(line: 9, scope: !20) +!36 = !MDLocation(line: 13, scope: !24) +!37 = !MDLocation(line: 14, scope: !24) +!38 = !MDLocation(line: 11, scope: !22) +!39 = !MDLocation(line: 20, scope: !4) +!40 = !MDLocation(line: 21, scope: !4) +!41 = !MDLocation(line: 22, scope: !4) +!42 = !{i32 1, !"Debug Info Version", i32 2} diff --git a/test/Transforms/SampleProfile/calls.ll b/test/Transforms/SampleProfile/calls.ll index c39472b..d566609 100644 --- a/test/Transforms/SampleProfile/calls.ll +++ b/test/Transforms/SampleProfile/calls.ll @@ -92,29 +92,29 @@ declare i32 @printf(i8*, ...) #2 !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = metadata !{metadata !"0x11\004\00clang version 3.5 \000\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [./calls.cc] [DW_LANG_C_plus_plus] -!1 = metadata !{metadata !"calls.cc", metadata !"."} -!2 = metadata !{} -!3 = metadata !{metadata !4, metadata !7} -!4 = metadata !{metadata !"0x2e\00sum\00sum\00\003\000\001\000\006\00256\000\003", metadata !1, metadata !5, metadata !6, null, i32 (i32, i32)* @_Z3sumii, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 3] [def] [sum] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [./calls.cc] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{metadata !"0x2e\00main\00main\00\007\000\001\000\006\00256\000\007", metadata !1, metadata !5, metadata !6, null, i32 ()* @main, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 7] [def] [main] -!8 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!9 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} -!10 = metadata !{metadata !"clang version 3.5 "} -!11 = metadata !{i32 4, i32 0, metadata !4, null} -!12 = metadata !{i32 8, i32 0, metadata !7, null} -!13 = metadata !{i32 9, i32 0, metadata !7, null} -!14 = metadata !{i32 9, i32 0, metadata !15, null} -!15 = metadata !{metadata !"0xb\001", metadata !1, metadata !7} ; [ DW_TAG_lexical_block ] [./calls.cc] -!16 = metadata !{i32 10, i32 0, metadata !17, null} -!17 = metadata !{metadata !"0xb\0010\000\000", metadata !1, metadata !7} ; [ DW_TAG_lexical_block ] [./calls.cc] -!18 = metadata !{i32 10, i32 0, metadata !19, null} -!19 = metadata !{metadata !"0xb\001", metadata !1, metadata !17} ; [ DW_TAG_lexical_block ] [./calls.cc] -!20 = metadata !{i32 10, i32 0, metadata !21, null} -!21 = metadata !{metadata !"0xb\002", metadata !1, metadata !17} ; [ DW_TAG_lexical_block ] [./calls.cc] -!22 = metadata !{i32 10, i32 0, metadata !23, null} -!23 = metadata !{metadata !"0xb\003", metadata !1, metadata !17} ; [ DW_TAG_lexical_block ] [./calls.cc] -!24 = metadata !{i32 11, i32 0, metadata !7, null} -!25 = metadata !{i32 12, i32 0, metadata !7, null} +!0 = !{!"0x11\004\00clang version 3.5 \000\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [./calls.cc] [DW_LANG_C_plus_plus] +!1 = !{!"calls.cc", !"."} +!2 = !{} +!3 = !{!4, !7} +!4 = !{!"0x2e\00sum\00sum\00\003\000\001\000\006\00256\000\003", !1, !5, !6, null, i32 (i32, i32)* @_Z3sumii, null, null, !2} ; [ DW_TAG_subprogram ] [line 3] [def] [sum] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [./calls.cc] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{!"0x2e\00main\00main\00\007\000\001\000\006\00256\000\007", !1, !5, !6, null, i32 ()* @main, null, null, !2} ; [ DW_TAG_subprogram ] [line 7] [def] [main] +!8 = !{i32 2, !"Dwarf Version", i32 4} +!9 = !{i32 1, !"Debug Info Version", i32 2} +!10 = !{!"clang version 3.5 "} +!11 = !MDLocation(line: 4, scope: !4) +!12 = !MDLocation(line: 8, scope: !7) +!13 = !MDLocation(line: 9, scope: !7) +!14 = !MDLocation(line: 9, scope: !15) +!15 = !{!"0xb\001", !1, !7} ; [ DW_TAG_lexical_block ] [./calls.cc] +!16 = !MDLocation(line: 10, scope: !17) +!17 = !{!"0xb\0010\000\000", !1, !7} ; [ DW_TAG_lexical_block ] [./calls.cc] +!18 = !MDLocation(line: 10, scope: !19) +!19 = !{!"0xb\001", !1, !17} ; [ DW_TAG_lexical_block ] [./calls.cc] +!20 = !MDLocation(line: 10, scope: !21) +!21 = !{!"0xb\002", !1, !17} ; [ DW_TAG_lexical_block ] [./calls.cc] +!22 = !MDLocation(line: 10, scope: !23) +!23 = !{!"0xb\003", !1, !17} ; [ DW_TAG_lexical_block ] [./calls.cc] +!24 = !MDLocation(line: 11, scope: !7) +!25 = !MDLocation(line: 12, scope: !7) diff --git a/test/Transforms/SampleProfile/discriminator.ll b/test/Transforms/SampleProfile/discriminator.ll index 73c73d1..cafc69d 100644 --- a/test/Transforms/SampleProfile/discriminator.ll +++ b/test/Transforms/SampleProfile/discriminator.ll @@ -66,25 +66,25 @@ while.end: ; preds = %while.cond !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = metadata !{metadata !"0x11\0012\00clang version 3.5 \000\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [discriminator.c] [DW_LANG_C99] -!1 = metadata !{metadata !"discriminator.c", metadata !"."} -!2 = metadata !{} -!3 = metadata !{metadata !4} -!4 = metadata !{metadata !"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", metadata !1, metadata !5, metadata !6, null, i32 (i32)* @foo, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [discriminator.c] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!8 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} -!9 = metadata !{metadata !"clang version 3.5 "} -!10 = metadata !{i32 2, i32 0, metadata !4, null} -!11 = metadata !{i32 3, i32 0, metadata !4, null} -!12 = metadata !{i32 3, i32 0, metadata !13, null} -!13 = metadata !{metadata !"0xb\001", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [discriminator.c] -!14 = metadata !{i32 4, i32 0, metadata !15, null} -!15 = metadata !{metadata !"0xb\004\000\001", metadata !1, metadata !16} ; [ DW_TAG_lexical_block ] [discriminator.c] -!16 = metadata !{metadata !"0xb\003\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [discriminator.c] -!17 = metadata !{i32 4, i32 0, metadata !18, null} -!18 = metadata !{metadata !"0xb\001", metadata !1, metadata !15} ; [ DW_TAG_lexical_block ] [discriminator.c] -!19 = metadata !{i32 5, i32 0, metadata !16, null} -!20 = metadata !{i32 6, i32 0, metadata !16, null} -!21 = metadata !{i32 7, i32 0, metadata !4, null} +!0 = !{!"0x11\0012\00clang version 3.5 \000\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [discriminator.c] [DW_LANG_C99] +!1 = !{!"discriminator.c", !"."} +!2 = !{} +!3 = !{!4} +!4 = !{!"0x2e\00foo\00foo\00\001\000\001\000\006\00256\000\001", !1, !5, !6, null, i32 (i32)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 1] [def] [foo] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [discriminator.c] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{i32 2, !"Dwarf Version", i32 4} +!8 = !{i32 1, !"Debug Info Version", i32 2} +!9 = !{!"clang version 3.5 "} +!10 = !MDLocation(line: 2, scope: !4) +!11 = !MDLocation(line: 3, scope: !4) +!12 = !MDLocation(line: 3, scope: !13) +!13 = !{!"0xb\001", !1, !4} ; [ DW_TAG_lexical_block ] [discriminator.c] +!14 = !MDLocation(line: 4, scope: !15) +!15 = !{!"0xb\004\000\001", !1, !16} ; [ DW_TAG_lexical_block ] [discriminator.c] +!16 = !{!"0xb\003\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [discriminator.c] +!17 = !MDLocation(line: 4, scope: !18) +!18 = !{!"0xb\001", !1, !15} ; [ DW_TAG_lexical_block ] [discriminator.c] +!19 = !MDLocation(line: 5, scope: !16) +!20 = !MDLocation(line: 6, scope: !16) +!21 = !MDLocation(line: 7, scope: !4) diff --git a/test/Transforms/SampleProfile/fnptr.ll b/test/Transforms/SampleProfile/fnptr.ll index f78123c..096033b 100644 --- a/test/Transforms/SampleProfile/fnptr.ll +++ b/test/Transforms/SampleProfile/fnptr.ll @@ -127,29 +127,29 @@ declare i32 @printf(i8* nocapture readonly, ...) #1 !llvm.module.flags = !{!0} !llvm.ident = !{!1} -!0 = metadata !{i32 2, metadata !"Debug Info Version", i32 2} -!1 = metadata !{metadata !"clang version 3.6.0 "} -!2 = metadata !{i32 9, i32 3, metadata !3, null} -!3 = metadata !{metadata !"0x2e\00foo\00foo\00\008\000\001\000\000\00256\001\008", metadata !4, metadata !5, metadata !6, null, double (i32)* @_Z3fooi, null, null, metadata !7} ; [ DW_TAG_subprogram ] [line 8] [def] [foo] -!4 = metadata !{metadata !"fnptr.cc", metadata !"."} -!5 = metadata !{metadata !"0x29", metadata !4} ; [ DW_TAG_file_type ] [./fnptr.cc] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", null, null, null, metadata !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{} -!8 = metadata !{i32 9, i32 14, metadata !3, null} -!9 = metadata !{i32 13, i32 3, metadata !10, null} -!10 = metadata !{metadata !"0x2e\00bar\00bar\00\0012\000\001\000\000\00256\001\0012", metadata !4, metadata !5, metadata !6, null, double (i32)* @_Z3bari, null, null, metadata !7} ; [ DW_TAG_subprogram ] [line 12] [def] [bar] -!11 = metadata !{i32 13, i32 14, metadata !10, null} -!12 = metadata !{i32 19, i32 3, metadata !13, null} -!13 = metadata !{metadata !"0x2e\00main\00main\00\0016\000\001\000\000\00256\001\0016", metadata !4, metadata !5, metadata !6, null, i32 ()* @main, null, null, metadata !7} ; [ DW_TAG_subprogram ] [line 16] [def] [main] -!14 = metadata !{i32 20, i32 5, metadata !13, null} -!15 = metadata !{i32 21, i32 15, metadata !13, null} -!16 = metadata !{i32 22, i32 11, metadata !13, null} -!17 = metadata !{metadata !"branch_weights", i32 534, i32 2064} -!18 = metadata !{i32 23, i32 14, metadata !13, null} -!19 = metadata !{i32 25, i32 14, metadata !13, null} -!20 = metadata !{i32 20, i32 28, metadata !13, null} -!21 = metadata !{metadata !"branch_weights", i32 0, i32 1075} -!22 = metadata !{i32 19, i32 26, metadata !13, null} -!23 = metadata !{metadata !"branch_weights", i32 0, i32 534} -!24 = metadata !{i32 27, i32 3, metadata !13, null} -!25 = metadata !{i32 28, i32 3, metadata !13, null} +!0 = !{i32 2, !"Debug Info Version", i32 2} +!1 = !{!"clang version 3.6.0 "} +!2 = !MDLocation(line: 9, column: 3, scope: !3) +!3 = !{!"0x2e\00foo\00foo\00\008\000\001\000\000\00256\001\008", !4, !5, !6, null, double (i32)* @_Z3fooi, null, null, !7} ; [ DW_TAG_subprogram ] [line 8] [def] [foo] +!4 = !{!"fnptr.cc", !"."} +!5 = !{!"0x29", !4} ; [ DW_TAG_file_type ] [./fnptr.cc] +!6 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{} +!8 = !MDLocation(line: 9, column: 14, scope: !3) +!9 = !MDLocation(line: 13, column: 3, scope: !10) +!10 = !{!"0x2e\00bar\00bar\00\0012\000\001\000\000\00256\001\0012", !4, !5, !6, null, double (i32)* @_Z3bari, null, null, !7} ; [ DW_TAG_subprogram ] [line 12] [def] [bar] +!11 = !MDLocation(line: 13, column: 14, scope: !10) +!12 = !MDLocation(line: 19, column: 3, scope: !13) +!13 = !{!"0x2e\00main\00main\00\0016\000\001\000\000\00256\001\0016", !4, !5, !6, null, i32 ()* @main, null, null, !7} ; [ DW_TAG_subprogram ] [line 16] [def] [main] +!14 = !MDLocation(line: 20, column: 5, scope: !13) +!15 = !MDLocation(line: 21, column: 15, scope: !13) +!16 = !MDLocation(line: 22, column: 11, scope: !13) +!17 = !{!"branch_weights", i32 534, i32 2064} +!18 = !MDLocation(line: 23, column: 14, scope: !13) +!19 = !MDLocation(line: 25, column: 14, scope: !13) +!20 = !MDLocation(line: 20, column: 28, scope: !13) +!21 = !{!"branch_weights", i32 0, i32 1075} +!22 = !MDLocation(line: 19, column: 26, scope: !13) +!23 = !{!"branch_weights", i32 0, i32 534} +!24 = !MDLocation(line: 27, column: 3, scope: !13) +!25 = !MDLocation(line: 28, column: 3, scope: !13) diff --git a/test/Transforms/SampleProfile/propagate.ll b/test/Transforms/SampleProfile/propagate.ll index 9ee8ec5..594645f 100644 --- a/test/Transforms/SampleProfile/propagate.ll +++ b/test/Transforms/SampleProfile/propagate.ll @@ -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 = metadata !{metadata !"0x11\004\00clang version 3.5 \000\00\000\00\000", metadata !1, metadata !2, metadata !2, metadata !3, metadata !2, metadata !2} ; [ DW_TAG_compile_unit ] [propagate.cc] [DW_LANG_C_plus_plus] -!1 = metadata !{metadata !"propagate.cc", metadata !"."} -!2 = metadata !{i32 0} -!3 = metadata !{metadata !4, metadata !7} -!4 = metadata !{metadata !"0x2e\00foo\00foo\00\003\000\001\000\006\00256\000\003", metadata !1, metadata !5, metadata !6, null, i64 (i32, i32, i64)* @_Z3fooiil, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 3] [def] [foo] -!5 = metadata !{metadata !"0x29", metadata !1} ; [ DW_TAG_file_type ] [propagate.cc] -!6 = metadata !{metadata !"0x15\00\000\000\000\000\000\000", i32 0, null, null, metadata !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!7 = metadata !{metadata !"0x2e\00main\00main\00\0024\000\001\000\006\00256\000\0024", metadata !1, metadata !5, metadata !6, null, i32 ()* @main, null, null, metadata !2} ; [ DW_TAG_subprogram ] [line 24] [def] [main] -!8 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} -!9 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} -!10 = metadata !{metadata !"clang version 3.5 "} -!11 = metadata !{i32 4, i32 0, metadata !12, null} -!12 = metadata !{metadata !"0xb\004\000\000", metadata !1, metadata !4} ; [ DW_TAG_lexical_block ] [propagate.cc] -!13 = metadata !{i32 5, i32 0, metadata !14, null} -!14 = metadata !{metadata !"0xb\004\000\000", metadata !1, metadata !12} ; [ DW_TAG_lexical_block ] [propagate.cc] -!15 = metadata !{i32 7, i32 0, metadata !16, null} -!16 = metadata !{metadata !"0xb\007\000\000", metadata !1, metadata !17} ; [ DW_TAG_lexical_block ] [propagate.cc] -!17 = metadata !{metadata !"0xb\006\000\000", metadata !1, metadata !12} ; [ DW_TAG_lexical_block ] [propagate.cc] -!18 = metadata !{i32 8, i32 0, metadata !19, null} -!19 = metadata !{metadata !"0xb\008\000\000", metadata !1, metadata !20} ; [ DW_TAG_lexical_block ] [propagate.cc] -!20 = metadata !{metadata !"0xb\007\000\000", metadata !1, metadata !16} ; [ DW_TAG_lexical_block ] [propagate.cc] -!21 = metadata !{i32 9, i32 0, metadata !19, null} -!22 = metadata !{i32 10, i32 0, metadata !23, null} -!23 = metadata !{metadata !"0xb\0010\000\000", metadata !1, metadata !20} ; [ DW_TAG_lexical_block ] [propagate.cc] -!24 = metadata !{i32 11, i32 0, metadata !25, null} -!25 = metadata !{metadata !"0xb\0010\000\000", metadata !1, metadata !23} ; [ DW_TAG_lexical_block ] [propagate.cc] -!26 = metadata !{i32 12, i32 0, metadata !25, null} -!27 = metadata !{i32 13, i32 0, metadata !25, null} -!28 = metadata !{i32 14, i32 0, metadata !29, null} -!29 = metadata !{metadata !"0xb\0014\000\000", metadata !1, metadata !30} ; [ DW_TAG_lexical_block ] [propagate.cc] -!30 = metadata !{metadata !"0xb\0013\000\000", metadata !1, metadata !23} ; [ DW_TAG_lexical_block ] [propagate.cc] -!31 = metadata !{i32 15, i32 0, metadata !32, null} -!32 = metadata !{metadata !"0xb\0014\000\000", metadata !1, metadata !29} ; [ DW_TAG_lexical_block ] [propagate.cc] -!33 = metadata !{i32 16, i32 0, metadata !32, null} -!34 = metadata !{i32 17, i32 0, metadata !32, null} -!35 = metadata !{i32 19, i32 0, metadata !20, null} -!36 = metadata !{i32 21, i32 0, metadata !4, null} -!37 = metadata !{i32 22, i32 0, metadata !4, null} -!38 = metadata !{i32 25, i32 0, metadata !7, null} -!39 = metadata !{i32 26, i32 0, metadata !7, null} -!40 = metadata !{i32 27, i32 0, metadata !7, null} -!41 = metadata !{i32 28, i32 0, metadata !7, null} -!42 = metadata !{i32 29, i32 0, metadata !7, null} +!0 = !{!"0x11\004\00clang version 3.5 \000\00\000\00\000", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [propagate.cc] [DW_LANG_C_plus_plus] +!1 = !{!"propagate.cc", !"."} +!2 = !{i32 0} +!3 = !{!4, !7} +!4 = !{!"0x2e\00foo\00foo\00\003\000\001\000\006\00256\000\003", !1, !5, !6, null, i64 (i32, i32, i64)* @_Z3fooiil, null, null, !2} ; [ DW_TAG_subprogram ] [line 3] [def] [foo] +!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [propagate.cc] +!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!7 = !{!"0x2e\00main\00main\00\0024\000\001\000\006\00256\000\0024", !1, !5, !6, null, i32 ()* @main, null, null, !2} ; [ DW_TAG_subprogram ] [line 24] [def] [main] +!8 = !{i32 2, !"Dwarf Version", i32 4} +!9 = !{i32 1, !"Debug Info Version", i32 2} +!10 = !{!"clang version 3.5 "} +!11 = !MDLocation(line: 4, scope: !12) +!12 = !{!"0xb\004\000\000", !1, !4} ; [ DW_TAG_lexical_block ] [propagate.cc] +!13 = !MDLocation(line: 5, scope: !14) +!14 = !{!"0xb\004\000\000", !1, !12} ; [ DW_TAG_lexical_block ] [propagate.cc] +!15 = !MDLocation(line: 7, scope: !16) +!16 = !{!"0xb\007\000\000", !1, !17} ; [ DW_TAG_lexical_block ] [propagate.cc] +!17 = !{!"0xb\006\000\000", !1, !12} ; [ DW_TAG_lexical_block ] [propagate.cc] +!18 = !MDLocation(line: 8, scope: !19) +!19 = !{!"0xb\008\000\000", !1, !20} ; [ DW_TAG_lexical_block ] [propagate.cc] +!20 = !{!"0xb\007\000\000", !1, !16} ; [ DW_TAG_lexical_block ] [propagate.cc] +!21 = !MDLocation(line: 9, scope: !19) +!22 = !MDLocation(line: 10, scope: !23) +!23 = !{!"0xb\0010\000\000", !1, !20} ; [ DW_TAG_lexical_block ] [propagate.cc] +!24 = !MDLocation(line: 11, scope: !25) +!25 = !{!"0xb\0010\000\000", !1, !23} ; [ DW_TAG_lexical_block ] [propagate.cc] +!26 = !MDLocation(line: 12, scope: !25) +!27 = !MDLocation(line: 13, scope: !25) +!28 = !MDLocation(line: 14, scope: !29) +!29 = !{!"0xb\0014\000\000", !1, !30} ; [ DW_TAG_lexical_block ] [propagate.cc] +!30 = !{!"0xb\0013\000\000", !1, !23} ; [ DW_TAG_lexical_block ] [propagate.cc] +!31 = !MDLocation(line: 15, scope: !32) +!32 = !{!"0xb\0014\000\000", !1, !29} ; [ DW_TAG_lexical_block ] [propagate.cc] +!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) |