scop_plus.cc: access_collect_arrays: use pet_expr_is_affine
[pet.git] / tests / quasi_affine.scop
blobed267556805c42b7d4984bc314f7a553b3fb11d9
1 start: 84
2 end: 218
3 context: '[N] -> {  : N <= 2147483647 and N >= 0 }'
4 arrays:
5 - context: '{  :  }'
6   extent: '[N] -> { in[] }'
7   element_type: int
8   element_size: 4
9 - context: '[N] -> {  : N >= 0 }'
10   extent: '[N] -> { A[i0] : i0 <= -1 + N and i0 >= 0 }'
11   element_type: int
12   element_size: 4
13 - context: '{  :  }'
14   extent: '[N] -> { out[] }'
15   element_type: int
16   element_size: 4
17 statements:
18 - line: 14
19   domain: '[N] -> { S_0[] }'
20   schedule: '{ S_0[] -> [0, 0] }'
21   body:
22     type: binary
23     operation: =
24     arguments:
25     - type: access
26       relation: '[N] -> { S_0[] -> A[0] }'
27       reference: __pet_ref_0
28       read: 0
29       write: 1
30     - type: access
31       relation: '[N] -> { S_0[] -> in[] }'
32       reference: __pet_ref_1
33       read: 1
34       write: 0
35 - line: 16
36   domain: '[N] -> { S_1[i] : i <= N and i >= 1 }'
37   schedule: '[N] -> { S_1[i] -> [0, 1, i, 0] }'
38   body:
39     type: binary
40     operation: =
41     arguments:
42     - type: access
43       relation: '[N] -> { S_1[i] -> A[i] }'
44       reference: __pet_ref_2
45       read: 0
46       write: 1
47     - type: call
48       name: f
49       arguments:
50       - type: call
51         name: g
52         arguments:
53         - type: access
54           relation: '[N] -> { S_1[i] -> A[o0] : 2o0 >= -1 + i and 2o0 <= i }'
55           reference: __pet_ref_3
56           read: 1
57           write: 0
58 - line: 18
59   domain: '[N] -> { S_2[] }'
60   schedule: '{ S_2[] -> [0, 2] }'
61   body:
62     type: binary
63     operation: =
64     arguments:
65     - type: access
66       relation: '[N] -> { S_2[] -> out[] }'
67       reference: __pet_ref_4
68       read: 0
69       write: 1
70     - type: call
71       name: g
72       arguments:
73       - type: access
74         relation: '[N] -> { S_2[] -> A[N] }'
75         reference: __pet_ref_5
76         read: 1
77         write: 0