scop.c: extract out expr_collect_access
[pet.git] / tests / quasi_affine.scop
blob91896b837a09e427989f170d1ddce39713ea576a
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       index: '[N] -> { S_0[] -> A[(0)] }'
28       reference: __pet_ref_0
29       read: 0
30       write: 1
31     - type: access
32       relation: '[N] -> { S_0[] -> in[] }'
33       index: '[N] -> { S_0[] -> in[] }'
34       reference: __pet_ref_1
35       read: 1
36       write: 0
37 - line: 16
38   domain: '[N] -> { S_1[i] : i <= N and i >= 1 }'
39   schedule: '[N] -> { S_1[i] -> [0, 1, i, 0] }'
40   body:
41     type: binary
42     operation: =
43     arguments:
44     - type: access
45       relation: '[N] -> { S_1[i] -> A[i] }'
46       index: '[N] -> { S_1[i] -> A[(i)] }'
47       reference: __pet_ref_2
48       read: 0
49       write: 1
50     - type: call
51       name: f
52       arguments:
53       - type: call
54         name: g
55         arguments:
56         - type: access
57           relation: '[N] -> { S_1[i] -> A[o0] : 2o0 >= -1 + i and 2o0 <= i }'
58           index: '[N] -> { S_1[i] -> A[(floor((i)/2))] }'
59           reference: __pet_ref_3
60           read: 1
61           write: 0
62 - line: 18
63   domain: '[N] -> { S_2[] }'
64   schedule: '{ S_2[] -> [0, 2] }'
65   body:
66     type: binary
67     operation: =
68     arguments:
69     - type: access
70       relation: '[N] -> { S_2[] -> out[] }'
71       index: '[N] -> { S_2[] -> out[] }'
72       reference: __pet_ref_4
73       read: 0
74       write: 1
75     - type: call
76       name: g
77       arguments:
78       - type: access
79         relation: '[N] -> { S_2[] -> A[N] }'
80         index: '[N] -> { S_2[] -> A[(N)] }'
81         reference: __pet_ref_5
82         read: 1
83         write: 0