llvm.org GIT mirror llvm / 82fdced
Pulled all tests into one test. Removed some redundant tests. Rename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80355 91177308-0d34-0410-b5e6-96231b3b80d8 Andreas Neustifter 11 years ago
4 changed file(s) with 181 addition(s) and 326 deletion(s). Raw diff Collapse all Expand all
+0
-154
test/Analysis/Profiling/2009-08-21-irregular-loop.ll less more
None ; RUN: llvm-as < %s | opt -insert-edge-profiling > %t1
1 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1
2 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1 1
3 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1 1 2
4 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1 1 2 3
5 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1 1 2 3 4
6 ; RUN: mv llvmprof.out %t2
7 ; RUN: llvm-prof -print-all-code %t1 %t2 | tee %t3 | FileCheck %s
8 ; CHECK: 1. 5/5 main
9 ; CHECK: 1. 19.5745% 46/235 main() - bb6
10 ; CHECK: 2. 15.7447% 37/235 main() - bb2
11 ; CHECK: 3. 15.3191% 36/235 main() - bb3
12 ; CHECK: 4. 15.3191% 36/235 main() - bb5
13 ; CHECK: 5. 7.23404% 17/235 main() - bb10
14 ; CHECK: 6. 5.53191% 13/235 main() - bb
15 ; CHECK: 7. 5.10638% 12/235 main() - bb9
16 ; CHECK: 8. 4.25532% 10/235 main() - bb1
17 ; CHECK: 9. 3.82979% 9/235 main() - bb7
18 ; CHECK: 10. 2.55319% 6/235 main() - bb11
19 ; CHECK: 11. 2.12766% 5/235 main() - entry
20 ; CHECK: 12. 1.70213% 4/235 main() - bb10.bb11_crit_edge
21 ; CHECK: 13. 1.2766% 3/235 main() - bb8
22 ; CHECK: 14. 0.425532% 1/235 main() - bb4
23 ; ModuleID = ''
24 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
25 target triple = "x86_64-unknown-linux-gnu"
26 @.str = internal constant [6 x i8] c"franz\00" ; <[6 x i8]*> [#uses=1]
27 @.str1 = internal constant [9 x i8] c"argc > 2\00" ; <[9 x i8]*> [#uses=1]
28 @.str2 = internal constant [9 x i8] c"argc = 1\00" ; <[9 x i8]*> [#uses=1]
29 @.str3 = internal constant [6 x i8] c"fritz\00" ; <[6 x i8]*> [#uses=1]
30 @.str4 = internal constant [10 x i8] c"argc <= 1\00" ; <[10 x i8]*> [#uses=1]
31
32 ; CHECK:;;; %main called 5 times.
33 ; CHECK:;;;
34 define i32 @main(i32 %argc, i8** %argv) nounwind {
35 entry:
36 ; CHECK:entry:
37 ; CHECK: ;;; Basic block executed 5 times.
38 %argc_addr = alloca i32 ; [#uses=4]
39 %argv_addr = alloca i8** ; [#uses=1]
40 %retval = alloca i32 ; [#uses=2]
41 %j = alloca i32 ; [#uses=4]
42 %i = alloca i32 ; [#uses=4]
43 %0 = alloca i32 ; [#uses=2]
44 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
45 store i32 %argc, i32* %argc_addr
46 store i8** %argv, i8*** %argv_addr
47 store i32 0, i32* %i, align 4
48 br label %bb10
49 ; CHECK: ;;; Out-edge counts: [5.000000e+00 -> bb10]
50
51 bb: ; preds = %bb10
52 ; CHECK:bb:
53 ; CHECK: ;;; Basic block executed 13 times.
54 %1 = load i32* %argc_addr, align 4 ; [#uses=1]
55 %2 = icmp sgt i32 %1, 1 ; [#uses=1]
56 br i1 %2, label %bb1, label %bb8
57 ; CHECK: ;;; Out-edge counts: [1.000000e+01 -> bb1] [3.000000e+00 -> bb8]
58
59 bb1: ; preds = %bb
60 ; CHECK:bb1:
61 ; CHECK: ;;; Basic block executed 10 times.
62 store i32 0, i32* %j, align 4
63 br label %bb6
64 ; CHECK: ;;; Out-edge counts: [1.000000e+01 -> bb6]
65
66 bb2: ; preds = %bb6
67 ; CHECK:bb2:
68 ; CHECK: ;;; Basic block executed 37 times.
69 %3 = call i32 @puts(i8* getelementptr ([6 x i8]* @.str, i64 0, i64 0)) nounwind ; [#uses=0]
70 %4 = load i32* %argc_addr, align 4 ; [#uses=1]
71 %5 = icmp sgt i32 %4, 2 ; [#uses=1]
72 br i1 %5, label %bb3, label %bb4
73 ; CHECK: ;;; Out-edge counts: [3.600000e+01 -> bb3] [1.000000e+00 -> bb4]
74
75 bb3: ; preds = %bb2
76 ; CHECK:bb3:
77 ; CHECK: ;;; Basic block executed 36 times.
78 %6 = call i32 @puts(i8* getelementptr ([9 x i8]* @.str1, i64 0, i64 0)) nounwind ; [#uses=0]
79 br label %bb5
80 ; CHECK: ;;; Out-edge counts: [3.600000e+01 -> bb5]
81
82 bb4: ; preds = %bb2
83 ; CHECK:bb4:
84 ; CHECK: ;;; Basic block executed 1 times.
85 %7 = call i32 @puts(i8* getelementptr ([9 x i8]* @.str2, i64 0, i64 0)) nounwind ; [#uses=0]
86 br label %bb11
87 ; CHECK: ;;; Out-edge counts: [1.000000e+00 -> bb11]
88
89 bb5: ; preds = %bb3
90 ; CHECK:bb5:
91 ; CHECK: ;;; Basic block executed 36 times.
92 %8 = call i32 @puts(i8* getelementptr ([6 x i8]* @.str3, i64 0, i64 0)) nounwind ; [#uses=0]
93 %9 = load i32* %j, align 4 ; [#uses=1]
94 %10 = add i32 %9, 1 ; [#uses=1]
95 store i32 %10, i32* %j, align 4
96 br label %bb6
97 ; CHECK: ;;; Out-edge counts: [3.600000e+01 -> bb6]
98
99 bb6: ; preds = %bb5, %bb1
100 ; CHECK:bb6:
101 ; CHECK: ;;; Basic block executed 46 times.
102 %11 = load i32* %j, align 4 ; [#uses=1]
103 %12 = load i32* %argc_addr, align 4 ; [#uses=1]
104 %13 = icmp slt i32 %11, %12 ; [#uses=1]
105 br i1 %13, label %bb2, label %bb7
106 ; CHECK: ;;; Out-edge counts: [3.700000e+01 -> bb2] [9.000000e+00 -> bb7]
107
108 bb7: ; preds = %bb6
109 ; CHECK:bb7:
110 ; CHECK: ;;; Basic block executed 9 times.
111 br label %bb9
112 ; CHECK: ;;; Out-edge counts: [9.000000e+00 -> bb9]
113
114 bb8: ; preds = %bb
115 ; CHECK:bb8:
116 ; CHECK: ;;; Basic block executed 3 times.
117 %14 = call i32 @puts(i8* getelementptr ([10 x i8]* @.str4, i64 0, i64 0)) nounwind ; [#uses=0]
118 br label %bb9
119 ; CHECK: ;;; Out-edge counts: [3.000000e+00 -> bb9]
120
121 bb9: ; preds = %bb8, %bb7
122 ; CHECK:bb9:
123 ; CHECK: ;;; Basic block executed 12 times.
124 %15 = load i32* %i, align 4 ; [#uses=1]
125 %16 = add i32 %15, 1 ; [#uses=1]
126 store i32 %16, i32* %i, align 4
127 br label %bb10
128 ; CHECK: ;;; Out-edge counts: [1.200000e+01 -> bb10]
129
130 bb10: ; preds = %bb9, %entry
131 ; CHECK: ;;; Basic block executed 17 times.
132 %17 = load i32* %i, align 4 ; [#uses=1]
133 %18 = icmp ne i32 %17, 3 ; [#uses=1]
134 br i1 %18, label %bb, label %bb11
135 ; CHECK: ;;; Out-edge counts: [1.300000e+01 -> bb] [4.000000e+00 -> bb10.bb11_crit_edge]
136 ; CHECK: ;;; Basic block executed 4 times.
137 ; CHECK: ;;; Out-edge counts: [5.000000e+00 -> bb11]
138
139 bb11: ; preds = %bb10, %bb4
140 ; CHECK:bb11:
141 ; CHECK: ;;; Basic block executed 6 times.
142 store i32 0, i32* %0, align 4
143 %19 = load i32* %0, align 4 ; [#uses=1]
144 store i32 %19, i32* %retval, align 4
145 br label %return
146
147 return: ; preds = %bb11
148 ; CHECK:return:
149 %retval12 = load i32* %retval ; [#uses=1]
150 ret i32 %retval12
151 }
152
153 declare i32 @puts(i8*)
+0
-18
test/Analysis/Profiling/2009-08-21-only-one-block.ll less more
None ; RUN: llvm-as < %s | opt -insert-edge-profiling > %t1
1 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1
2 ; RUN: mv llvmprof.out %t2
3 ; RUN: llvm-prof -print-all-code %t1 %t2 | tee %t3 | FileCheck %s
4 ; CHECK: 1. 1/1 main
5 ; CHECK: 1. 100% 1/1 main() - entry
6 ; ModuleID = ''
7 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
8 target triple = "x86_64-unknown-linux-gnu"
9
10 ; CHECK:;;; %main called 1 times.
11 ; CHECK:;;;
12 define i32 @main() nounwind readnone {
13 entry:
14 ; CHECK:entry:
15 ; CHECK: ;;; Basic block executed 1 times.
16 ret i32 undef
17 }
+0
-154
test/Analysis/Profiling/2009-08-21-several-blocks.ll less more
None ; RUN: llvm-as < %s | opt -insert-edge-profiling > %t1
1 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1
2 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1 1
3 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1 1 2
4 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1 1 2 3
5 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t1 1 2 3 4
6 ; RUN: mv llvmprof.out %t2
7 ; RUN: llvm-prof -print-all-code %t1 %t2 | tee %t3 | FileCheck %s
8 ; CHECK: 1. 5/5 main
9 ; CHECK: 1. 19.8529% 54/272 main() - bb6
10 ; CHECK: 2. 15.4412% 42/272 main() - bb2
11 ; CHECK: 3. 15.4412% 42/272 main() - bb5
12 ; CHECK: 4. 13.2353% 36/272 main() - bb3
13 ; CHECK: 5. 7.35294% 20/272 main() - bb10
14 ; CHECK: 6. 5.51471% 15/272 main() - bb
15 ; CHECK: 7. 5.51471% 15/272 main() - bb9
16 ; CHECK: 8. 4.41176% 12/272 main() - bb1
17 ; CHECK: 9. 4.41176% 12/272 main() - bb7
18 ; CHECK: 10. 2.20588% 6/272 main() - bb4
19 ; CHECK: 11. 1.83824% 5/272 main() - entry
20 ; CHECK: 12. 1.83824% 5/272 main() - bb11
21 ; CHECK: 13. 1.83824% 5/272 main() - return
22 ; CHECK: 14. 1.10294% 3/272 main() - bb8
23 ; ModuleID = ''
24 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
25 target triple = "x86_64-unknown-linux-gnu"
26
27 @.str = private constant [6 x i8] c"franz\00", align 1 ; <[6 x i8]*> [#uses=1]
28 @.str1 = private constant [9 x i8] c"argc > 2\00", align 1 ; <[9 x i8]*> [#uses=1]
29 @.str2 = private constant [9 x i8] c"argc = 1\00", align 1 ; <[9 x i8]*> [#uses=1]
30 @.str3 = private constant [6 x i8] c"fritz\00", align 1 ; <[6 x i8]*> [#uses=1]
31 @.str4 = private constant [10 x i8] c"argc <= 1\00", align 1 ; <[10 x i8]*> [#uses=1]
32
33 ; CHECK:;;; %main called 5 times.
34 ; CHECK:;;;
35 define i32 @main(i32 %argc, i8** %argv) nounwind {
36 entry:
37 ; CHECK:entry:
38 ; CHECK: ;;; Basic block executed 5 times.
39 %argc_addr = alloca i32 ; [#uses=4]
40 %argv_addr = alloca i8** ; [#uses=1]
41 %retval = alloca i32 ; [#uses=2]
42 %j = alloca i32 ; [#uses=4]
43 %i = alloca i32 ; [#uses=4]
44 %0 = alloca i32 ; [#uses=2]
45 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
46 store i32 %argc, i32* %argc_addr
47 store i8** %argv, i8*** %argv_addr
48 store i32 0, i32* %i, align 4
49 br label %bb10
50 ; CHECK: ;;; Out-edge counts: [5.000000e+00 -> bb10]
51
52 bb: ; preds = %bb10
53 ; CHECK:bb:
54 ; CHECK: ;;; Basic block executed 15 times.
55 %1 = load i32* %argc_addr, align 4 ; [#uses=1]
56 %2 = icmp sgt i32 %1, 1 ; [#uses=1]
57 br i1 %2, label %bb1, label %bb8
58 ; CHECK: ;;; Out-edge counts: [1.200000e+01 -> bb1] [3.000000e+00 -> bb8]
59
60 bb1: ; preds = %bb
61 ; CHECK:bb1:
62 ; CHECK: ;;; Basic block executed 12 times.
63 store i32 0, i32* %j, align 4
64 br label %bb6
65 ; CHECK: ;;; Out-edge counts: [1.200000e+01 -> bb6]
66
67 bb2: ; preds = %bb6
68 ; CHECK:bb2:
69 ; CHECK: ;;; Basic block executed 42 times.
70 %3 = call i32 @puts(i8* getelementptr ([6 x i8]* @.str, i64 0, i64 0)) nounwind ; [#uses=0]
71 %4 = load i32* %argc_addr, align 4 ; [#uses=1]
72 %5 = icmp sgt i32 %4, 2 ; [#uses=1]
73 br i1 %5, label %bb3, label %bb4
74 ; CHECK: ;;; Out-edge counts: [3.600000e+01 -> bb3] [6.000000e+00 -> bb4]
75
76 bb3: ; preds = %bb2
77 ; CHECK:bb3:
78 ; CHECK: ;;; Basic block executed 36 times.
79 %6 = call i32 @puts(i8* getelementptr ([9 x i8]* @.str1, i64 0, i64 0)) nounwind ; [#uses=0]
80 br label %bb5
81 ; CHECK: ;;; Out-edge counts: [3.600000e+01 -> bb5]
82
83 bb4: ; preds = %bb2
84 ; CHECK:bb4:
85 ; CHECK: ;;; Basic block executed 6 times.
86 %7 = call i32 @puts(i8* getelementptr ([9 x i8]* @.str2, i64 0, i64 0)) nounwind ; [#uses=0]
87 br label %bb5
88 ; CHECK: ;;; Out-edge counts: [6.000000e+00 -> bb5]
89
90 bb5: ; preds = %bb4, %bb3
91 ; CHECK:bb5:
92 ; CHECK: ;;; Basic block executed 42 times.
93 %8 = call i32 @puts(i8* getelementptr ([6 x i8]* @.str3, i64 0, i64 0)) nounwind ; [#uses=0]
94 %9 = load i32* %j, align 4 ; [#uses=1]
95 %10 = add i32 %9, 1 ; [#uses=1]
96 store i32 %10, i32* %j, align 4
97 br label %bb6
98 ; CHECK: ;;; Out-edge counts: [4.200000e+01 -> bb6]
99
100 bb6: ; preds = %bb5, %bb1
101 ; CHECK:bb6:
102 ; CHECK: ;;; Basic block executed 54 times.
103 %11 = load i32* %j, align 4 ; [#uses=1]
104 %12 = load i32* %argc_addr, align 4 ; [#uses=1]
105 %13 = icmp slt i32 %11, %12 ; [#uses=1]
106 br i1 %13, label %bb2, label %bb7
107 ; CHECK: ;;; Out-edge counts: [4.200000e+01 -> bb2] [1.200000e+01 -> bb7]
108
109 bb7: ; preds = %bb6
110 ; CHECK:bb7:
111 ; CHECK: ;;; Basic block executed 12 times.
112 br label %bb9
113 ; CHECK: ;;; Out-edge counts: [1.200000e+01 -> bb9]
114
115 bb8: ; preds = %bb
116 ; CHECK:bb8:
117 ; CHECK: ;;; Basic block executed 3 times.
118 %14 = call i32 @puts(i8* getelementptr ([10 x i8]* @.str4, i64 0, i64 0)) nounwind ; [#uses=0]
119 br label %bb9
120 ; CHECK: ;;; Out-edge counts: [3.000000e+00 -> bb9]
121
122 bb9: ; preds = %bb8, %bb7
123 ; CHECK:bb9:
124 ; CHECK: ;;; Basic block executed 15 times.
125 %15 = load i32* %i, align 4 ; [#uses=1]
126 %16 = add i32 %15, 1 ; [#uses=1]
127 store i32 %16, i32* %i, align 4
128 br label %bb10
129 ; CHECK: ;;; Out-edge counts: [1.500000e+01 -> bb10]
130
131 bb10: ; preds = %bb9, %entry
132 ; CHECK: ;;; Basic block executed 20 times.
133 %17 = load i32* %i, align 4 ; [#uses=1]
134 %18 = icmp ne i32 %17, 3 ; [#uses=1]
135 br i1 %18, label %bb, label %bb11
136 ; CHECK: ;;; Out-edge counts: [1.500000e+01 -> bb] [5.000000e+00 -> bb11]
137
138 bb11: ; preds = %bb10
139 ; CHECK:bb11:
140 store i32 0, i32* %0, align 4
141 %19 = load i32* %0, align 4 ; [#uses=1]
142 store i32 %19, i32* %retval, align 4
143 br label %return
144 ; CHECK: ;;; Out-edge counts: [5.000000e+00 -> return]
145
146 return: ; preds = %bb11
147 ; CHECK:return:
148 ; CHECK: ;;; Basic block executed 5 times.
149 %retval12 = load i32* %retval ; [#uses=1]
150 ret i32 %retval12
151 }
152
153 declare i32 @puts(i8*)
0 ; RUN: llvm-as %s -o %t1
1 ; RUN: opt %t1 -insert-edge-profiling -o %t2
2 ; RUN: llvm-dis < %t2 | FileCheck --check-prefix=INST %s
3
4 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t2
5 ; RUN: lli -load %llvmlibsdir/profile_rt%shlibext %t2 1 2
6 ; RUN: llvm-prof -print-all-code %t1 | tee %t3 | FileCheck --check-prefix=PROF %s
7
8 ; PROF: 1. 2/4 oneblock
9 ; PROF: 2. 2/4 main
10 ; PROF: 1. 15.7895% 12/76 main() - bb6
11 ; PROF: 2. 11.8421% 9/76 main() - bb2
12 ; PROF: 3. 11.8421% 9/76 main() - bb3
13 ; PROF: 4. 11.8421% 9/76 main() - bb5
14 ; PROF: 5. 10.5263% 8/76 main() - bb10
15 ; PROF: 6. 7.89474% 6/76 main() - bb
16 ; PROF: 7. 7.89474% 6/76 main() - bb9
17 ; PROF: 8. 3.94737% 3/76 main() - bb1
18 ; PROF: 9. 3.94737% 3/76 main() - bb7
19 ; PROF: 10. 3.94737% 3/76 main() - bb8
20 ; PROF: 11. 2.63158% 2/76 oneblock() - entry
21 ; PROF: 12. 2.63158% 2/76 main() - entry
22 ; PROF: 13. 2.63158% 2/76 main() - bb11
23 ; PROF: 14. 2.63158% 2/76 main() - return
24
25 ; ModuleID = ''
26 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
27 target triple = "x86_64-unknown-linux-gnu"
28
29 @.str = private constant [12 x i8] c"hello world\00", align 1 ; <[12 x i8]*> [#uses=1]
30 @.str1 = private constant [6 x i8] c"franz\00", align 1 ; <[6 x i8]*> [#uses=1]
31 @.str2 = private constant [9 x i8] c"argc > 2\00", align 1 ; <[9 x i8]*> [#uses=1]
32 @.str3 = private constant [9 x i8] c"argc = 1\00", align 1 ; <[9 x i8]*> [#uses=1]
33 @.str4 = private constant [6 x i8] c"fritz\00", align 1 ; <[6 x i8]*> [#uses=1]
34 @.str5 = private constant [10 x i8] c"argc <= 1\00", align 1 ; <[10 x i8]*> [#uses=1]
35 ; INST:@EdgeProfCounters
36 ; INST:[19 x i32]
37 ; INST:zeroinitializer
38
39 ; PROF:;;; %oneblock called 2 times.
40 ; PROF:;;;
41 define void @oneblock() nounwind {
42 entry:
43 ; PROF:entry:
44 ; PROF: ;;; Basic block executed 2 times.
45 %0 = call i32 @puts(i8* getelementptr inbounds ([12 x i8]* @.str, i64 0, i64 0)) nounwind ; [#uses=0]
46 ret void
47 }
48
49 declare i32 @puts(i8*)
50
51 ; PROF:;;; %main called 2 times.
52 ; PROF:;;;
53 define i32 @main(i32 %argc, i8** %argv) nounwind {
54 entry:
55 ; PROF:entry:
56 ; PROF: ;;; Basic block executed 2 times.
57 %argc_addr = alloca i32 ; [#uses=4]
58 %argv_addr = alloca i8** ; [#uses=1]
59 %retval = alloca i32 ; [#uses=2]
60 %j = alloca i32 ; [#uses=4]
61 %i = alloca i32 ; [#uses=4]
62 %0 = alloca i32 ; [#uses=2]
63 ; INST:call
64 ; INST:@llvm_start_edge_profiling
65 ; INST:@EdgeProfCounters
66 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
67 store i32 %argc, i32* %argc_addr
68 store i8** %argv, i8*** %argv_addr
69 store i32 0, i32* %i, align 4
70 br label %bb10
71 ; PROF: ;;; Out-edge counts: [2.000000e+00 -> bb10]
72
73 bb: ; preds = %bb10
74 ; PROF:bb:
75 ; PROF: ;;; Basic block executed 6 times.
76 %1 = load i32* %argc_addr, align 4 ; [#uses=1]
77 %2 = icmp sgt i32 %1, 1 ; [#uses=1]
78 br i1 %2, label %bb1, label %bb8
79 ; PROF: ;;; Out-edge counts: [3.000000e+00 -> bb1] [3.000000e+00 -> bb8]
80
81 bb1: ; preds = %bb
82 ; PROF:bb1:
83 ; PROF: ;;; Basic block executed 3 times.
84 store i32 0, i32* %j, align 4
85 br label %bb6
86 ; PROF: ;;; Out-edge counts: [3.000000e+00 -> bb6]
87
88 bb2: ; preds = %bb6
89 ; PROF:bb2:
90 ; PROF: ;;; Basic block executed 9 times.
91 %3 = call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str1, i64 0, i64 0)) nounwind ; [#uses=0]
92 %4 = load i32* %argc_addr, align 4 ; [#uses=1]
93 %5 = icmp sgt i32 %4, 2 ; [#uses=1]
94 br i1 %5, label %bb3, label %bb4
95 ; PROF: ;;; Out-edge counts: [9.000000e+00 -> bb3]
96
97 bb3: ; preds = %bb2
98 ; PROF:bb3:
99 ; PROF: ;;; Basic block executed 9 times.
100 %6 = call i32 @puts(i8* getelementptr inbounds ([9 x i8]* @.str2, i64 0, i64 0)) nounwind ; [#uses=0]
101 br label %bb5
102 ; PROF: ;;; Out-edge counts: [9.000000e+00 -> bb5]
103
104 bb4: ; preds = %bb2
105 ; PROF:bb4:
106 ; PROF: ;;; Never executed!
107 %7 = call i32 @puts(i8* getelementptr inbounds ([9 x i8]* @.str3, i64 0, i64 0)) nounwind ; [#uses=0]
108 br label %bb11
109
110 bb5: ; preds = %bb3
111 ; PROF:bb5:
112 ; PROF: ;;; Basic block executed 9 times.
113 %8 = call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str4, i64 0, i64 0)) nounwind ; [#uses=0]
114 %9 = load i32* %j, align 4 ; [#uses=1]
115 %10 = add nsw i32 %9, 1 ; [#uses=1]
116 store i32 %10, i32* %j, align 4
117 br label %bb6
118 ; PROF: ;;; Out-edge counts: [9.000000e+00 -> bb6]
119
120 bb6: ; preds = %bb5, %bb1
121 ; PROF:bb6:
122 ; PROF: ;;; Basic block executed 12 times.
123 %11 = load i32* %j, align 4 ; [#uses=1]
124 %12 = load i32* %argc_addr, align 4 ; [#uses=1]
125 %13 = icmp slt i32 %11, %12 ; [#uses=1]
126 br i1 %13, label %bb2, label %bb7
127 ; PROF: ;;; Out-edge counts: [9.000000e+00 -> bb2] [3.000000e+00 -> bb7]
128
129 bb7: ; preds = %bb6
130 ; PROF:bb7:
131 ; PROF: ;;; Basic block executed 3 times.
132 br label %bb9
133 ; PROF: ;;; Out-edge counts: [3.000000e+00 -> bb9]
134
135 bb8: ; preds = %bb
136 ; PROF:bb8:
137 ; PROF: ;;; Basic block executed 3 times.
138 %14 = call i32 @puts(i8* getelementptr inbounds ([10 x i8]* @.str5, i64 0, i64 0)) nounwind ; [#uses=0]
139 br label %bb9
140 ; PROF: ;;; Out-edge counts: [3.000000e+00 -> bb9]
141
142 bb9: ; preds = %bb8, %bb7
143 ; PROF:bb9:
144 ; PROF: ;;; Basic block executed 6 times.
145 %15 = load i32* %i, align 4 ; [#uses=1]
146 %16 = add nsw i32 %15, 1 ; [#uses=1]
147 store i32 %16, i32* %i, align 4
148 br label %bb10
149 ; PROF: ;;; Out-edge counts: [6.000000e+00 -> bb10]
150
151 bb10: ; preds = %bb9, %entry
152 ; PROF:bb10:
153 ; PROF: ;;; Basic block executed 8 times.
154 %17 = load i32* %i, align 4 ; [#uses=1]
155 %18 = icmp ne i32 %17, 3 ; [#uses=1]
156 br i1 %18, label %bb, label %bb11
157 ; INST:br
158 ; INST:label %bb10.bb11_crit_edge
159 ; PROF: ;;; Out-edge counts: [6.000000e+00 -> bb] [2.000000e+00 -> bb11]
160
161 ; INST:bb10.bb11_crit_edge:
162 ; INST:br
163 ; INST:label %bb11
164
165 bb11: ; preds = %bb10, %bb4
166 ; PROF:bb11:
167 ; PROF: ;;; Basic block executed 2 times.
168 call void @oneblock() nounwind
169 store i32 0, i32* %0, align 4
170 %19 = load i32* %0, align 4 ; [#uses=1]
171 store i32 %19, i32* %retval, align 4
172 br label %return
173 ; PROF: ;;; Out-edge counts: [2.000000e+00 -> return]
174
175 return: ; preds = %bb11
176 ; PROF:return:
177 ; PROF: ;;; Basic block executed 2 times.
178 %retval12 = load i32* %retval ; [#uses=1]
179 ret i32 %retval12
180 }