blob: b61f6fc2f03a0aaf3e9a2814d914a52bd4df2a46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
-------------- Initial XTL
f() {
16: (x7, x1) = (X1, X0) using x13, x12;
15: if (x1 <s 2) goto 14 else goto 13
14: x11 = 1; goto 1
13: x6 = int64[x7 + 8];
12: X0 = x6; X0 = call "atoi"(X0); x10 = X0;
11:
10: if (x10 <=s 0) goto 9 else goto 4
9: if (x10 ==s 0) goto 6 else goto 8
8: x3 = "__stringlit_1" + 0;
7: X0 = x3; X0 = call "printf"(X0); goto 2
6: x9 = "__stringlit_2" + 0;
5: X0 = x9; X0 = call "printf"(X0); goto 2
4: x5 = "__stringlit_3" + 0;
3: X0 = x5; X0 = call "printf"(X0);
2: x11 = 0;
1: X0 = x11; return X0
}
------------------ Unspillable variables --------------
x12 x13
-------------- After initial register allocation
f() {
16: (x7{X1}, x1{X0}) = (X1, X0) using x13{X2}, x12{D0};
{ x1 x7 }
15: if (x1{X0} <s 2) goto 14 else goto 13
{ x7 }
14: x11{X0} = 1; goto 1
{ x11 }
13: x6{X0} = int64[x7{X1} + 8];
{ x6 }
12: X0 = x6{X0}; X0 = call "atoi"(X0); x10{X0} = X0;
{ x10 }
11:
{ x10 }
10: if (x10{X0} <=s 0) goto 9 else goto 4
{ x10 }
9: if (x10{X0} ==s 0) goto 6 else goto 8
{ }
8: x3{X0} = "__stringlit_1" + 0;
{ x3 }
7: X0 = x3{X0}; X0 = call "printf"(X0); goto 2
{ }
6: x9{X0} = "__stringlit_2" + 0;
{ x9 }
5: X0 = x9{X0}; X0 = call "printf"(X0); goto 2
{ }
4: x5{X0} = "__stringlit_3" + 0;
{ x5 }
3: X0 = x5{X0}; X0 = call "printf"(X0);
{ }
2: x11{X0} = 0;
{ x11 }
1: X0 = x11{X0}; return X0
{ }
}
-------------- Candidate allocation
f() {
16:
15: if (X0 <s 2) goto 14 else goto 13 (prediction: fallthrough)
14: X0 = 1; goto 1
13: X0 = int64[X1 + 8];
12: call "atoi";
11:
10: if (X0 <=s 0) goto 9 else goto 4 (prediction: fallthrough)
9: if (X0 ==s 0) goto 6 else goto 8 (prediction: none)
8: X0 = "__stringlit_1" + 0;
7: call "printf"; goto 2
6: X0 = "__stringlit_2" + 0;
5: call "printf"; goto 2
4: X0 = "__stringlit_3" + 0;
3: call "printf";
2: X0 = 0;
1: return
}
|