diff options
42 files changed, 1720 insertions, 0 deletions
diff --git a/test/monniaux/profiling/compcert_profiling.dat b/test/monniaux/profiling/compcert_profiling.dat Binary files differnew file mode 100644 index 00000000..fa57a995 --- /dev/null +++ b/test/monniaux/profiling/compcert_profiling.dat diff --git a/test/monniaux/profiling/test_profiling b/test/monniaux/profiling/test_profiling Binary files differnew file mode 100755 index 00000000..b530aae2 --- /dev/null +++ b/test/monniaux/profiling/test_profiling 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 +} + diff --git a/test/monniaux/profiling/test_profiling.c b/test/monniaux/profiling/test_profiling.c new file mode 100644 index 00000000..013b1d68 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.c @@ -0,0 +1,15 @@ +#include <stdlib.h> +#include <stdio.h> + +int main(int argc, char **argv) { + if (argc < 2) return 1; + int i = atoi(argv[1]); + if (i > 0) { + printf("positive\n"); + } else if (i==0) { + printf("zero\n"); + } else { + printf("negative\n"); + } + return 0; +} diff --git a/test/monniaux/profiling/test_profiling.cm b/test/monniaux/profiling/test_profiling.cm new file mode 100644 index 00000000..2a352510 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.cm @@ -0,0 +1,112 @@ +var "__stringlit_2" readonly {int8 122,int8 101,int8 114,int8 111,int8 10,int8 0} +var "__stringlit_1" readonly {int8 110,int8 101,int8 103,int8 97,int8 116,int8 105,int8 118,int8 101,int8 10,int8 0} +var "__stringlit_3" readonly {int8 112,int8 111,int8 115,int8 105,int8 116,int8 105,int8 118,int8 101,int8 10,int8 0} + +extern "__builtin_ais_annot" = builtin "__builtin_ais_annot" : long -> void +extern "__builtin_expect" = builtin "__builtin_expect" : long -> long -> long +extern "__builtin_bswap64" = builtin "__builtin_bswap64" : long -> long +extern "__builtin_bswap" = builtin "__builtin_bswap" : int -> int +extern "__builtin_bswap32" = builtin "__builtin_bswap32" : int -> int +extern "__builtin_bswap16" = builtin "__builtin_bswap16" : int -> int16u +extern "__builtin_clz" = builtin "__builtin_clz" : int -> int +extern "__builtin_clzl" = builtin "__builtin_clzl" : long -> int +extern "__builtin_clzll" = builtin "__builtin_clzll" : long -> int +extern "__builtin_ctz" = builtin "__builtin_ctz" : int -> int +extern "__builtin_ctzl" = builtin "__builtin_ctzl" : long -> int +extern "__builtin_ctzll" = builtin "__builtin_ctzll" : long -> int +extern "__builtin_fabs" = builtin "__builtin_fabs" : float -> float +extern "__builtin_fabsf" = builtin "__builtin_fabsf" : single -> single +extern "__builtin_fsqrt" = builtin "__builtin_fsqrt" : float -> float +extern "__builtin_sqrt" = builtin "__builtin_sqrt" : float -> float +extern "__builtin_memcpy_aligned" = builtin "__builtin_memcpy_aligned" : + long -> long -> long -> long -> void +extern "__builtin_sel" = builtin "__builtin_sel" : int -> void +extern "__builtin_annot" = builtin "__builtin_annot" : long -> void +extern "__builtin_annot_intval" = builtin "__builtin_annot_intval" : long -> + int -> int +extern "__builtin_membar" = builtin "__builtin_membar" : void +extern "__builtin_va_start" = builtin "__builtin_va_start" : long -> void +extern "__builtin_va_arg" = builtin "__builtin_va_arg" : long -> int -> void +extern "__builtin_va_copy" = builtin "__builtin_va_copy" : long -> long -> + void +extern "__builtin_va_end" = builtin "__builtin_va_end" : long -> void +extern "__compcert_va_int32" = extern "__compcert_va_int32" : long -> int +extern "__compcert_va_int64" = extern "__compcert_va_int64" : long -> long +extern "__compcert_va_float64" = extern "__compcert_va_float64" : long -> + float +extern "__compcert_va_composite" = extern "__compcert_va_composite" : long -> + long -> long +extern "__compcert_i64_dtos" = runtime "__compcert_i64_dtos" : float -> long +extern "__compcert_i64_dtou" = runtime "__compcert_i64_dtou" : float -> long +extern "__compcert_i64_stod" = runtime "__compcert_i64_stod" : long -> float +extern "__compcert_i64_utod" = runtime "__compcert_i64_utod" : long -> float +extern "__compcert_i64_stof" = runtime "__compcert_i64_stof" : long -> single +extern "__compcert_i64_utof" = runtime "__compcert_i64_utof" : long -> single +extern "__compcert_i64_sdiv" = runtime "__compcert_i64_sdiv" : long -> + long -> long +extern "__compcert_i64_udiv" = runtime "__compcert_i64_udiv" : long -> + long -> long +extern "__compcert_i64_smod" = runtime "__compcert_i64_smod" : long -> + long -> long +extern "__compcert_i64_umod" = runtime "__compcert_i64_umod" : long -> + long -> long +extern "__compcert_i64_shl" = runtime "__compcert_i64_shl" : long -> int -> + long +extern "__compcert_i64_shr" = runtime "__compcert_i64_shr" : long -> int -> + long +extern "__compcert_i64_sar" = runtime "__compcert_i64_sar" : long -> int -> + long +extern "__compcert_i64_smulh" = runtime "__compcert_i64_smulh" : long -> + long -> long +extern "__compcert_i64_umulh" = runtime "__compcert_i64_umulh" : long -> + long -> long +extern "__compcert_i32_sdiv" = runtime "__compcert_i32_sdiv" : int -> int -> + int +extern "__compcert_i32_udiv" = runtime "__compcert_i32_udiv" : int -> int -> + int +extern "__compcert_i32_smod" = runtime "__compcert_i32_smod" : int -> int -> + int +extern "__compcert_i32_umod" = runtime "__compcert_i32_umod" : int -> int -> + int +extern "__compcert_f32_div" = runtime "__compcert_f32_div" : single -> + single -> single +extern "__compcert_f64_div" = runtime "__compcert_f64_div" : float -> + float -> float +extern "__builtin_fence" = builtin "__builtin_fence" : void +extern "__builtin_cls" = builtin "__builtin_cls" : int -> int +extern "__builtin_clsl" = builtin "__builtin_clsl" : long -> int +extern "__builtin_clsll" = builtin "__builtin_clsll" : long -> int +extern "__builtin_fmadd" = builtin "__builtin_fmadd" : float -> float -> + float -> float +extern "__builtin_fmsub" = builtin "__builtin_fmsub" : float -> float -> + float -> float +extern "__builtin_fnmadd" = builtin "__builtin_fnmadd" : float -> float -> + float -> float +extern "__builtin_fnmsub" = builtin "__builtin_fnmsub" : float -> float -> + float -> float +extern "__builtin_fmax" = builtin "__builtin_fmax" : float -> float -> float +extern "__builtin_fmin" = builtin "__builtin_fmin" : float -> float -> float +extern "__builtin_debug" = extern "__builtin_debug" : int -> void +extern "atoi" = extern "atoi" : long -> int +extern "printf" = extern "printf" : long -> int +"main"('argc', 'argv') : int -> long -> int +{ + var 'i', '$71'; + if ('argc' < 2) { + return 1; + } + '$71' = "atoi"(int64['argv' +l 8LL *l longofint 1]) : long -> int; + 'i' = '$71'; + if ('i' > 0) { + "printf"("__stringlit_3") : long -> int; + } else { + if ('i' == 0) { + "printf"("__stringlit_2") : long -> int; + } else { + "printf"("__stringlit_1") : long -> int; + } + } + return 0; + return 0; +} + diff --git a/test/monniaux/profiling/test_profiling.i b/test/monniaux/profiling/test_profiling.i new file mode 100644 index 00000000..35c67916 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.i @@ -0,0 +1,747 @@ +# 1 "test_profiling.c" +# 1 "<built-in>" +# 1 "<command-line>" +# 1 "/usr/aarch64-linux-gnu/include/stdc-predef.h" 1 3 +# 1 "<command-line>" 2 +# 1 "test_profiling.c" +# 1 "/usr/aarch64-linux-gnu/include/stdlib.h" 1 3 +# 25 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/libc-header-start.h" 1 3 +# 33 "/usr/aarch64-linux-gnu/include/bits/libc-header-start.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/features.h" 1 3 +# 461 "/usr/aarch64-linux-gnu/include/features.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/sys/cdefs.h" 1 3 +# 452 "/usr/aarch64-linux-gnu/include/sys/cdefs.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/wordsize.h" 1 3 +# 453 "/usr/aarch64-linux-gnu/include/sys/cdefs.h" 2 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/long-double.h" 1 3 +# 454 "/usr/aarch64-linux-gnu/include/sys/cdefs.h" 2 3 +# 462 "/usr/aarch64-linux-gnu/include/features.h" 2 3 +# 485 "/usr/aarch64-linux-gnu/include/features.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/gnu/stubs.h" 1 3 + + + + +# 1 "/usr/aarch64-linux-gnu/include/bits/wordsize.h" 1 3 +# 6 "/usr/aarch64-linux-gnu/include/gnu/stubs.h" 2 3 + + +# 1 "/usr/aarch64-linux-gnu/include/gnu/stubs-lp64.h" 1 3 +# 9 "/usr/aarch64-linux-gnu/include/gnu/stubs.h" 2 3 +# 486 "/usr/aarch64-linux-gnu/include/features.h" 2 3 +# 34 "/usr/aarch64-linux-gnu/include/bits/libc-header-start.h" 2 3 +# 26 "/usr/aarch64-linux-gnu/include/stdlib.h" 2 3 + + + + + +# 1 "/opt/CompCert/kvx-work/2021-04-12_e37d655d/aarch64-linux/lib/compcert/include/stddef.h" 1 3 +# 67 "/opt/CompCert/kvx-work/2021-04-12_e37d655d/aarch64-linux/lib/compcert/include/stddef.h" 3 + +# 67 "/opt/CompCert/kvx-work/2021-04-12_e37d655d/aarch64-linux/lib/compcert/include/stddef.h" 3 +typedef unsigned long size_t; +# 101 "/opt/CompCert/kvx-work/2021-04-12_e37d655d/aarch64-linux/lib/compcert/include/stddef.h" 3 +typedef signed int wchar_t; +# 32 "/usr/aarch64-linux-gnu/include/stdlib.h" 2 3 + + +# 55 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/floatn.h" 1 3 +# 23 "/usr/aarch64-linux-gnu/include/bits/floatn.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/long-double.h" 1 3 +# 24 "/usr/aarch64-linux-gnu/include/bits/floatn.h" 2 3 +# 80 "/usr/aarch64-linux-gnu/include/bits/floatn.h" 3 +typedef long double _Float128; +# 95 "/usr/aarch64-linux-gnu/include/bits/floatn.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/floatn-common.h" 1 3 +# 24 "/usr/aarch64-linux-gnu/include/bits/floatn-common.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/long-double.h" 1 3 +# 25 "/usr/aarch64-linux-gnu/include/bits/floatn-common.h" 2 3 +# 214 "/usr/aarch64-linux-gnu/include/bits/floatn-common.h" 3 +typedef float _Float32; +# 251 "/usr/aarch64-linux-gnu/include/bits/floatn-common.h" 3 +typedef double _Float64; +# 268 "/usr/aarch64-linux-gnu/include/bits/floatn-common.h" 3 +typedef double _Float32x; +# 285 "/usr/aarch64-linux-gnu/include/bits/floatn-common.h" 3 +typedef long double _Float64x; +# 96 "/usr/aarch64-linux-gnu/include/bits/floatn.h" 2 3 +# 56 "/usr/aarch64-linux-gnu/include/stdlib.h" 2 3 + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +# 97 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern size_t __ctype_get_mb_cur_max (void) ; + + + +extern double atof (const char *__nptr) + ; + +extern int atoi (const char *__nptr) + ; + +extern long int atol (const char *__nptr) + ; + + + + extern long long int atoll (const char *__nptr) + ; + + + +extern double strtod (const char *restrict __nptr, + char **restrict __endptr) + ; + + + +extern float strtof (const char *restrict __nptr, + char **restrict __endptr) ; + +extern long double strtold (const char *restrict __nptr, + char **restrict __endptr) + ; +# 176 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern long int strtol (const char *restrict __nptr, + char **restrict __endptr, int __base) + ; + +extern unsigned long int strtoul (const char *restrict __nptr, + char **restrict __endptr, int __base) + ; +# 199 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 + +extern long long int strtoll (const char *restrict __nptr, + char **restrict __endptr, int __base) + ; + + +extern unsigned long long int strtoull (const char *restrict __nptr, + char **restrict __endptr, int __base) + ; +# 453 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern int rand (void) ; + +extern void srand (unsigned int __seed) ; +# 539 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern void *malloc (size_t __size) + ; + +extern void *calloc (size_t __nmemb, size_t __size) + ; + + + + + + +extern void *realloc (void *__ptr, size_t __size) + ; +# 565 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern void free (void *__ptr) ; +# 591 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern void abort (void) ; + + + +extern int atexit (void (*__func) (void)) ; +# 617 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern void exit (int __status) ; +# 629 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern void _Exit (int __status) ; + + + + +extern char *getenv (const char *__name) ; +# 784 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern int system (const char *__command) ; +# 808 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +typedef int (*__compar_fn_t) (const void *, const void *); +# 820 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern void *bsearch (const void *__key, const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + ; + + + + + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) ; +# 840 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern int abs (int __x) ; +extern long int labs (long int __x) ; + + + extern long long int llabs (long long int __x) + ; + + + + + + +extern div_t div (int __numer, int __denom) + ; +extern ldiv_t ldiv (long int __numer, long int __denom) + ; + + + extern lldiv_t lldiv (long long int __numer, + long long int __denom) + ; +# 922 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +extern int mblen (const char *__s, size_t __n) ; + + +extern int mbtowc (wchar_t *restrict __pwc, + const char *restrict __s, size_t __n) ; + + +extern int wctomb (char *__s, wchar_t __wchar) ; + + + +extern size_t mbstowcs (wchar_t *restrict __pwcs, + const char *restrict __s, size_t __n) ; + +extern size_t wcstombs (char *restrict __s, + const wchar_t *restrict __pwcs, size_t __n) + ; +# 1013 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/stdlib-float.h" 1 3 +# 1014 "/usr/aarch64-linux-gnu/include/stdlib.h" 2 3 +# 1023 "/usr/aarch64-linux-gnu/include/stdlib.h" 3 + +# 2 "test_profiling.c" 2 +# 1 "/usr/aarch64-linux-gnu/include/stdio.h" 1 3 +# 27 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/libc-header-start.h" 1 3 +# 28 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 + + + + + +# 1 "/opt/CompCert/kvx-work/2021-04-12_e37d655d/aarch64-linux/lib/compcert/include/stddef.h" 1 3 +# 34 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 + + +# 1 "/opt/CompCert/kvx-work/2021-04-12_e37d655d/aarch64-linux/lib/compcert/include/stdarg.h" 1 3 +# 43 "/opt/CompCert/kvx-work/2021-04-12_e37d655d/aarch64-linux/lib/compcert/include/stdarg.h" 3 +typedef __builtin_va_list __gnuc_va_list; +# 37 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 + +# 1 "/usr/aarch64-linux-gnu/include/bits/types.h" 1 3 +# 27 "/usr/aarch64-linux-gnu/include/bits/types.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/wordsize.h" 1 3 +# 28 "/usr/aarch64-linux-gnu/include/bits/types.h" 2 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/timesize.h" 1 3 +# 19 "/usr/aarch64-linux-gnu/include/bits/timesize.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/wordsize.h" 1 3 +# 20 "/usr/aarch64-linux-gnu/include/bits/timesize.h" 2 3 +# 29 "/usr/aarch64-linux-gnu/include/bits/types.h" 2 3 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; + + + + + + +typedef __int8_t __int_least8_t; +typedef __uint8_t __uint_least8_t; +typedef __int16_t __int_least16_t; +typedef __uint16_t __uint_least16_t; +typedef __int32_t __int_least32_t; +typedef __uint32_t __uint_least32_t; +typedef __int64_t __int_least64_t; +typedef __uint64_t __uint_least64_t; + + + +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; + + + + + + + +typedef long int __intmax_t; +typedef unsigned long int __uintmax_t; +# 141 "/usr/aarch64-linux-gnu/include/bits/types.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/typesizes.h" 1 3 +# 142 "/usr/aarch64-linux-gnu/include/bits/types.h" 2 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/time64.h" 1 3 +# 143 "/usr/aarch64-linux-gnu/include/bits/types.h" 2 3 + + +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; + +typedef int __daddr_t; +typedef int __key_t; + + +typedef int __clockid_t; + + +typedef void * __timer_t; + + +typedef int __blksize_t; + + + + +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; + + +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; + + +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; + + +typedef long int __fsword_t; + +typedef long int __ssize_t; + + +typedef long int __syscall_slong_t; + +typedef unsigned long int __syscall_ulong_t; + + + +typedef __off64_t __loff_t; +typedef char *__caddr_t; + + +typedef long int __intptr_t; + + +typedef unsigned int __socklen_t; + + + + +typedef int __sig_atomic_t; +# 39 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/types/__fpos_t.h" 1 3 + + + + +# 1 "/usr/aarch64-linux-gnu/include/bits/types/__mbstate_t.h" 1 3 +# 13 "/usr/aarch64-linux-gnu/include/bits/types/__mbstate_t.h" 3 +typedef struct +{ + int __count; + union + { + unsigned int __wch; + char __wchb[4]; + } __value; +} __mbstate_t; +# 6 "/usr/aarch64-linux-gnu/include/bits/types/__fpos_t.h" 2 3 + + + + +typedef struct _G_fpos_t +{ + __off_t __pos; + __mbstate_t __state; +} __fpos_t; +# 40 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/types/__fpos64_t.h" 1 3 +# 10 "/usr/aarch64-linux-gnu/include/bits/types/__fpos64_t.h" 3 +typedef struct _G_fpos64_t +{ + __off64_t __pos; + __mbstate_t __state; +} __fpos64_t; +# 41 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/types/__FILE.h" 1 3 + + + +struct _IO_FILE; +typedef struct _IO_FILE __FILE; +# 42 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/types/FILE.h" 1 3 + + + +struct _IO_FILE; + + +typedef struct _IO_FILE FILE; +# 43 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/types/struct_FILE.h" 1 3 +# 35 "/usr/aarch64-linux-gnu/include/bits/types/struct_FILE.h" 3 +struct _IO_FILE; +struct _IO_marker; +struct _IO_codecvt; +struct _IO_wide_data; + + + + +typedef void _IO_lock_t; + + + + + +struct _IO_FILE +{ + int _flags; + + + char *_IO_read_ptr; + char *_IO_read_end; + char *_IO_read_base; + char *_IO_write_base; + char *_IO_write_ptr; + char *_IO_write_end; + char *_IO_buf_base; + char *_IO_buf_end; + + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + int _flags2; + __off_t _old_offset; + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + _IO_lock_t *_lock; + + + + + + + + __off64_t _offset; + + struct _IO_codecvt *_codecvt; + struct _IO_wide_data *_wide_data; + struct _IO_FILE *_freeres_list; + void *_freeres_buf; + size_t __pad5; + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; +}; +# 44 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 +# 84 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +typedef __fpos_t fpos_t; +# 133 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +# 1 "/usr/aarch64-linux-gnu/include/bits/stdio_lim.h" 1 3 +# 134 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 + + + +extern FILE *stdin; +extern FILE *stdout; +extern FILE *stderr; + + + + + + +extern int remove (const char *__filename) ; + +extern int rename (const char *__old, const char *__new) ; +# 173 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern FILE *tmpfile (void) ; +# 187 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern char *tmpnam (char *__s) ; +# 213 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); +# 246 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern FILE *fopen (const char *restrict __filename, + const char *restrict __modes) ; + + + + +extern FILE *freopen (const char *restrict __filename, + const char *restrict __modes, + FILE *restrict __stream) ; +# 304 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern void setbuf (FILE *restrict __stream, char *restrict __buf) ; + + + +extern int setvbuf (FILE *restrict __stream, char *restrict __buf, + int __modes, size_t __n) ; +# 326 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int fprintf (FILE *restrict __stream, + const char *restrict __format, ...); + + + + +extern int printf (const char *restrict __format, ...); + +extern int sprintf (char *restrict __s, + const char *restrict __format, ...) ; + + + + + +extern int vfprintf (FILE *restrict __s, const char *restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (const char *restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *restrict __s, const char *restrict __format, + __gnuc_va_list __arg) ; + + + +extern int snprintf (char *restrict __s, size_t __maxlen, + const char *restrict __format, ...) + ; + +extern int vsnprintf (char *restrict __s, size_t __maxlen, + const char *restrict __format, __gnuc_va_list __arg) + ; +# 391 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int fscanf (FILE *restrict __stream, + const char *restrict __format, ...) ; + + + + +extern int scanf (const char *restrict __format, ...) ; + +extern int sscanf (const char *restrict __s, + const char *restrict __format, ...) ; +# 416 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int __isoc99_fscanf (FILE *restrict __stream, + const char *restrict __format, ...) ; +extern int __isoc99_scanf (const char *restrict __format, ...) ; +extern int __isoc99_sscanf (const char *restrict __s, + const char *restrict __format, ...) ; +# 432 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int vfscanf (FILE *restrict __s, const char *restrict __format, + __gnuc_va_list __arg) + ; + + + + + +extern int vscanf (const char *restrict __format, __gnuc_va_list __arg) + ; + + +extern int vsscanf (const char *restrict __s, + const char *restrict __format, __gnuc_va_list __arg) + ; +# 465 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int __isoc99_vfscanf (FILE *restrict __s, + const char *restrict __format, + __gnuc_va_list __arg) ; +extern int __isoc99_vscanf (const char *restrict __format, + __gnuc_va_list __arg) ; +extern int __isoc99_vsscanf (const char *restrict __s, + const char *restrict __format, + __gnuc_va_list __arg) ; +# 485 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); +# 521 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); +# 564 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern char *fgets (char *restrict __s, int __n, FILE *restrict __stream) + ; +# 577 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern char *gets (char *__s) ; +# 626 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int fputs (const char *restrict __s, FILE *restrict __stream); + + + + + +extern int puts (const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *restrict __ptr, size_t __size, + size_t __n, FILE *restrict __stream) ; + + + + +extern size_t fwrite (const void *restrict __ptr, size_t __size, + size_t __n, FILE *restrict __s); +# 684 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) ; + + + + +extern void rewind (FILE *__stream); +# 731 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int fgetpos (FILE *restrict __stream, fpos_t *restrict __pos); + + + + +extern int fsetpos (FILE *__stream, const fpos_t *__pos); +# 757 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern void clearerr (FILE *__stream) ; + +extern int feof (FILE *__stream) ; + +extern int ferror (FILE *__stream) ; +# 775 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern void perror (const char *__s); + + + + + +# 1 "/usr/aarch64-linux-gnu/include/bits/sys_errlist.h" 1 3 +# 782 "/usr/aarch64-linux-gnu/include/stdio.h" 2 3 +# 858 "/usr/aarch64-linux-gnu/include/stdio.h" 3 +extern int __uflow (FILE *); +extern int __overflow (FILE *, int); +# 873 "/usr/aarch64-linux-gnu/include/stdio.h" 3 + +# 3 "test_profiling.c" 2 + + +# 4 "test_profiling.c" +int main(int argc, char **argv) { + if (argc < 2) return 1; + int i = atoi(argv[1]); + if (i > 0) { + printf("positive\n"); + } else if (i==0) { + printf("zero\n"); + } else { + printf("negative\n"); + } + return 0; +} diff --git a/test/monniaux/profiling/test_profiling.ltl.1 b/test/monniaux/profiling/test_profiling.ltl.1 new file mode 100644 index 00000000..fdfb7fe0 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.ltl.1 @@ -0,0 +1,19 @@ +main() { + 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 +} + diff --git a/test/monniaux/profiling/test_profiling.ltl.2 b/test/monniaux/profiling/test_profiling.ltl.2 new file mode 100644 index 00000000..f9be9feb --- /dev/null +++ b/test/monniaux/profiling/test_profiling.ltl.2 @@ -0,0 +1,19 @@ +main() { +goto 15 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"; goto 10 + 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 +} + diff --git a/test/monniaux/profiling/test_profiling.mach b/test/monniaux/profiling/test_profiling.mach new file mode 100644 index 00000000..31124d94 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.mach @@ -0,0 +1,20 @@ +main() { + if (X0 <s 2) goto 14 + X0 = int64[X1 + 8] + call "atoi" + if (X0 <=s 0) goto 9 + X0 = "__stringlit_3" + 0 + call "printf" + goto 2 + 14: X0 = 1 + goto 1 + 9: if (X0 ==s 0) goto 6 + X0 = "__stringlit_1" + 0 + call "printf" + goto 2 + 6: X0 = "__stringlit_2" + 0 + call "printf" + 2: X0 = 0 + 1: return +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.0 b/test/monniaux/profiling/test_profiling.rtl.0 new file mode 100644 index 00000000..d5ce096d --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.0 @@ -0,0 +1,23 @@ +main(x2, x1) { + 16: if (x2 <s 2) goto 15 else goto 14 (prediction: none) + 15: x5 = 1 + goto 1 + 14: x12 = int64[x1 + 8] + 13: x3 = "atoi"(x12) + 12: x4 = x3 + 11: if (x4 >s 0) goto 5 else goto 10 (prediction: none) + 10: if (x4 ==s 0) goto 7 else goto 9 (prediction: none) + 9: x10 = "__stringlit_1" + 0 + 8: x11 = "printf"(x10) + goto 3 + 7: x8 = "__stringlit_2" + 0 + 6: x9 = "printf"(x8) + goto 3 + 5: x6 = "__stringlit_3" + 0 + 4: x7 = "printf"(x6) + 3: x5 = 0 + goto 1 + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.1 b/test/monniaux/profiling/test_profiling.rtl.1 new file mode 100644 index 00000000..d5ce096d --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.1 @@ -0,0 +1,23 @@ +main(x2, x1) { + 16: if (x2 <s 2) goto 15 else goto 14 (prediction: none) + 15: x5 = 1 + goto 1 + 14: x12 = int64[x1 + 8] + 13: x3 = "atoi"(x12) + 12: x4 = x3 + 11: if (x4 >s 0) goto 5 else goto 10 (prediction: none) + 10: if (x4 ==s 0) goto 7 else goto 9 (prediction: none) + 9: x10 = "__stringlit_1" + 0 + 8: x11 = "printf"(x10) + goto 3 + 7: x8 = "__stringlit_2" + 0 + 6: x9 = "printf"(x8) + goto 3 + 5: x6 = "__stringlit_3" + 0 + 4: x7 = "printf"(x6) + 3: x5 = 0 + goto 1 + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.10 b/test/monniaux/profiling/test_profiling.rtl.10 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.10 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.11 b/test/monniaux/profiling/test_profiling.rtl.11 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.11 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.12 b/test/monniaux/profiling/test_profiling.rtl.12 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.12 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.13 b/test/monniaux/profiling/test_profiling.rtl.13 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.13 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.14 b/test/monniaux/profiling/test_profiling.rtl.14 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.14 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.15 b/test/monniaux/profiling/test_profiling.rtl.15 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.15 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.16 b/test/monniaux/profiling/test_profiling.rtl.16 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.16 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.17 b/test/monniaux/profiling/test_profiling.rtl.17 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.17 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.18 b/test/monniaux/profiling/test_profiling.rtl.18 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.18 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.19 b/test/monniaux/profiling/test_profiling.rtl.19 new file mode 100644 index 00000000..091878ec --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.19 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.2 b/test/monniaux/profiling/test_profiling.rtl.2 new file mode 100644 index 00000000..d5ce096d --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.2 @@ -0,0 +1,23 @@ +main(x2, x1) { + 16: if (x2 <s 2) goto 15 else goto 14 (prediction: none) + 15: x5 = 1 + goto 1 + 14: x12 = int64[x1 + 8] + 13: x3 = "atoi"(x12) + 12: x4 = x3 + 11: if (x4 >s 0) goto 5 else goto 10 (prediction: none) + 10: if (x4 ==s 0) goto 7 else goto 9 (prediction: none) + 9: x10 = "__stringlit_1" + 0 + 8: x11 = "printf"(x10) + goto 3 + 7: x8 = "__stringlit_2" + 0 + 6: x9 = "printf"(x8) + goto 3 + 5: x6 = "__stringlit_3" + 0 + 4: x7 = "printf"(x6) + 3: x5 = 0 + goto 1 + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.20 b/test/monniaux/profiling/test_profiling.rtl.20 new file mode 100644 index 00000000..091878ec --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.20 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.21 b/test/monniaux/profiling/test_profiling.rtl.21 new file mode 100644 index 00000000..091878ec --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.21 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.22 b/test/monniaux/profiling/test_profiling.rtl.22 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.22 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.23 b/test/monniaux/profiling/test_profiling.rtl.23 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.23 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.24 b/test/monniaux/profiling/test_profiling.rtl.24 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.24 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.25 b/test/monniaux/profiling/test_profiling.rtl.25 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.25 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.26 b/test/monniaux/profiling/test_profiling.rtl.26 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.26 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.27 b/test/monniaux/profiling/test_profiling.rtl.27 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.27 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.28 b/test/monniaux/profiling/test_profiling.rtl.28 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.28 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.29 b/test/monniaux/profiling/test_profiling.rtl.29 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.29 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.3 b/test/monniaux/profiling/test_profiling.rtl.3 new file mode 100644 index 00000000..d5ce096d --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.3 @@ -0,0 +1,23 @@ +main(x2, x1) { + 16: if (x2 <s 2) goto 15 else goto 14 (prediction: none) + 15: x5 = 1 + goto 1 + 14: x12 = int64[x1 + 8] + 13: x3 = "atoi"(x12) + 12: x4 = x3 + 11: if (x4 >s 0) goto 5 else goto 10 (prediction: none) + 10: if (x4 ==s 0) goto 7 else goto 9 (prediction: none) + 9: x10 = "__stringlit_1" + 0 + 8: x11 = "printf"(x10) + goto 3 + 7: x8 = "__stringlit_2" + 0 + 6: x9 = "printf"(x8) + goto 3 + 5: x6 = "__stringlit_3" + 0 + 4: x7 = "printf"(x6) + 3: x5 = 0 + goto 1 + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.30 b/test/monniaux/profiling/test_profiling.rtl.30 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.30 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.31 b/test/monniaux/profiling/test_profiling.rtl.31 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.31 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.32 b/test/monniaux/profiling/test_profiling.rtl.32 new file mode 100644 index 00000000..9102f74f --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.32 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: nop + 10: if (x3 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x3 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.4 b/test/monniaux/profiling/test_profiling.rtl.4 new file mode 100644 index 00000000..d5ce096d --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.4 @@ -0,0 +1,23 @@ +main(x2, x1) { + 16: if (x2 <s 2) goto 15 else goto 14 (prediction: none) + 15: x5 = 1 + goto 1 + 14: x12 = int64[x1 + 8] + 13: x3 = "atoi"(x12) + 12: x4 = x3 + 11: if (x4 >s 0) goto 5 else goto 10 (prediction: none) + 10: if (x4 ==s 0) goto 7 else goto 9 (prediction: none) + 9: x10 = "__stringlit_1" + 0 + 8: x11 = "printf"(x10) + goto 3 + 7: x8 = "__stringlit_2" + 0 + 6: x9 = "printf"(x8) + goto 3 + 5: x6 = "__stringlit_3" + 0 + 4: x7 = "printf"(x6) + 3: x5 = 0 + goto 1 + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.5 b/test/monniaux/profiling/test_profiling.rtl.5 new file mode 100644 index 00000000..d5ce096d --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.5 @@ -0,0 +1,23 @@ +main(x2, x1) { + 16: if (x2 <s 2) goto 15 else goto 14 (prediction: none) + 15: x5 = 1 + goto 1 + 14: x12 = int64[x1 + 8] + 13: x3 = "atoi"(x12) + 12: x4 = x3 + 11: if (x4 >s 0) goto 5 else goto 10 (prediction: none) + 10: if (x4 ==s 0) goto 7 else goto 9 (prediction: none) + 9: x10 = "__stringlit_1" + 0 + 8: x11 = "printf"(x10) + goto 3 + 7: x8 = "__stringlit_2" + 0 + 6: x9 = "printf"(x8) + goto 3 + 5: x6 = "__stringlit_3" + 0 + 4: x7 = "printf"(x6) + 3: x5 = 0 + goto 1 + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.6 b/test/monniaux/profiling/test_profiling.rtl.6 new file mode 100644 index 00000000..2f75aa61 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.6 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: none) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 >s 0) goto 4 else goto 9 (prediction: none) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.7 b/test/monniaux/profiling/test_profiling.rtl.7 new file mode 100644 index 00000000..2f75aa61 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.7 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: none) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 >s 0) goto 4 else goto 9 (prediction: none) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.8 b/test/monniaux/profiling/test_profiling.rtl.8 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.8 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + diff --git a/test/monniaux/profiling/test_profiling.rtl.9 b/test/monniaux/profiling/test_profiling.rtl.9 new file mode 100644 index 00000000..8b268c84 --- /dev/null +++ b/test/monniaux/profiling/test_profiling.rtl.9 @@ -0,0 +1,21 @@ +main(x2, x1) { + 15: if (x2 <s 2) goto 14 else goto 13 (prediction: fallthrough) + 14: x5 = 1 + goto 1 + 13: x12 = int64[x1 + 8] + 12: x3 = "atoi"(x12) + 11: x4 = x3 + 10: if (x4 <=s 0) goto 9 else goto 4 (prediction: fallthrough) + 9: if (x4 ==s 0) goto 6 else goto 8 (prediction: none) + 8: x10 = "__stringlit_1" + 0 + 7: x11 = "printf"(x10) + goto 2 + 6: x8 = "__stringlit_2" + 0 + 5: x9 = "printf"(x8) + goto 2 + 4: x6 = "__stringlit_3" + 0 + 3: x7 = "printf"(x6) + 2: x5 = 0 + 1: return x5 +} + |