aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/profiling/test_profiling.alloctrace
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/profiling/test_profiling.alloctrace')
-rw-r--r--test/monniaux/profiling/test_profiling.alloctrace83
1 files changed, 83 insertions, 0 deletions
diff --git a/test/monniaux/profiling/test_profiling.alloctrace b/test/monniaux/profiling/test_profiling.alloctrace
new file mode 100644
index 00000000..b61f6fc2
--- /dev/null
+++ b/test/monniaux/profiling/test_profiling.alloctrace
@@ -0,0 +1,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
+}
+