1 # Test of the llmv-dwarfdump --statistics newly added stats (version 3).
3 RUN: llvm-mc -triple x86_64-unknown-linux-gnu %S/Inputs/statistics-fib.s -filetype=obj -o %t-statistics-fib.o
4 RUN: llvm-dwarfdump --statistics %t-statistics-fib.o | FileCheck %s
6 # Source program - A version of Fibonacci
7 # Compilation options: -g -O3 -c
10 # real_fib (int x, int answers[11])
14 # if ((answers)[x] != -1)
15 # return (answers)[x];
17 # result = real_fib(x-1, answers) + real_fib(x-2, answers);
18 # (answers)[x] = result;
32 # for (i = 0; i < 11; i++)
39 # return real_fib(x, answers);
42 # int main (int argc, char **argv)
47 # printf ("fibonacci(3) = %d\n", result);
49 # printf ("fibonacci(4) = %d\n", result);
51 # printf ("fibonacci(5) = %d\n", result);
53 # printf ("fibonacci(6) = %d\n", result);
55 # printf ("fibonacci(7) = %d\n", result);
57 # printf ("fibonacci(8) = %d\n", result);
59 # printf ("fibonacci(9) = %d\n", result);
61 # printf ("fibonacci(10) = %d\n", result);
68 CHECK: "source functions":3
69 CHECK: "source functions with location":3
70 CHECK: "inlined functions":8
71 CHECK: "inlined funcs with abstract origins":8
72 CHECK: "unique source variables":9
73 CHECK: "source variables":33
75 # Ideally the value below would be 33 but currently it's not.
76 CHECK: "variables with location":24
77 CHECK: "call site entries":8
78 CHECK: "scope bytes total":2958
79 CHECK: "scope bytes covered":1188
80 CHECK: "total function size":636
81 CHECK: "total inlined function size":388
82 CHECK: "total formal params":13
83 CHECK: "formal params with source location":13
84 CHECK: "formal params with type":13
85 CHECK: "formal params with binary location":13
86 CHECK: "total vars":20
87 CHECK: "vars with source location":20
88 CHECK: "vars with type":20
90 # Ideally the value below would be 20, but currently it's not.
91 CHECK: "vars with binary location":11