• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN: llvm-opt-report -r %p %p/Inputs/q.yaml | FileCheck -strict-whitespace %s
2RUN: llvm-opt-report -s -r %p %p/Inputs/q.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
3
4; CHECK: < {{.*[/\]}}q.c
5; CHECK-NEXT:  1     | void bar();
6; CHECK-NEXT:  2     | void foo(int n) {
7; CHECK-NEXT:  {{\[\[}}
8; CHECK-NEXT:   > foo:
9; CHECK-NEXT:  3     |   for (int i = 0; i < n; ++i)
10; CHECK-NEXT:   > quack, quack2:
11; CHECK-NEXT:  3  U4 |   for (int i = 0; i < n; ++i)
12; CHECK-NEXT:  {{\]\]}}
13; CHECK-NEXT:  4     |     bar();
14; CHECK-NEXT:  5     | }
15; CHECK-NEXT:  6     |
16; CHECK-NEXT:  7     | void quack() {
17; CHECK-NEXT:  8 I   |   foo(4);
18; CHECK-NEXT:  9     | }
19; CHECK-NEXT: 10     |
20; CHECK-NEXT: 11     | void quack2() {
21; CHECK-NEXT: 12 I   |   foo(4);
22; CHECK-NEXT: 13     | }
23; CHECK-NEXT: 14     |
24
25; CHECK-SUCCINCT: < {{.*[/\]}}q.c
26; CHECK-SUCCINCT-NEXT:  1    | void bar();
27; CHECK-SUCCINCT-NEXT:  2    | void foo(int n) {
28; CHECK-SUCCINCT-NEXT:  {{\[\[}}
29; CHECK-SUCCINCT-NEXT:   > foo:
30; CHECK-SUCCINCT-NEXT:  3    |   for (int i = 0; i < n; ++i)
31; CHECK-SUCCINCT-NEXT:   > quack, quack2:
32; CHECK-SUCCINCT-NEXT:  3  U |   for (int i = 0; i < n; ++i)
33; CHECK-SUCCINCT-NEXT:  {{\]\]}}
34; CHECK-SUCCINCT-NEXT:  4    |     bar();
35; CHECK-SUCCINCT-NEXT:  5    | }
36; CHECK-SUCCINCT-NEXT:  6    |
37; CHECK-SUCCINCT-NEXT:  7    | void quack() {
38; CHECK-SUCCINCT-NEXT:  8 I  |   foo(4);
39; CHECK-SUCCINCT-NEXT:  9    | }
40; CHECK-SUCCINCT-NEXT: 10    |
41; CHECK-SUCCINCT-NEXT: 11    | void quack2() {
42; CHECK-SUCCINCT-NEXT: 12 I  |   foo(4);
43; CHECK-SUCCINCT-NEXT: 13    | }
44; CHECK-SUCCINCT-NEXT: 14    |
45
46