scop.c: extract out expr_collect_access
[pet.git] / tests / data_dependent.scop
blob615b545c512dea699c26e9e88f64a8dbee89aa6b
1 start: 274
2 end: 498
3 context: '[N, M] -> {  : M >= 10 and M <= 1000 and N >= 10 and N <= 1000 }'
4 arrays:
5 - context: '[M, N] -> {  : N >= 0 and M >= 0 }'
6   extent: '[N, M] -> { in1[i0, i1] : i1 <= -1 + M and i1 >= 0 and i0 <= -1 + N and
7     i0 >= 0 }'
8   element_type: int
9   element_size: 4
10 - context: '[N] -> {  : N >= 0 }'
11   extent: '[N, M] -> { in2[i0] : i0 <= -1 + N and i0 >= 0 }'
12   value_bounds: '{ [i0] : i0 >= -1 and i0 <= 1 }'
13   element_type: int
14   element_size: 4
15 - context: '[N] -> {  : N >= 0 }'
16   extent: '[N, M] -> { A[i0, i1] : i0 >= 0 and i0 <= -1 + N and i1 >= 0 and i1 <=
17     9 }'
18   element_type: int
19   element_size: 4
20 - context: '[N] -> {  : N >= 0 }'
21   extent: '[N, M] -> { C[i0] : i0 <= -1 + N and i0 >= 0 }'
22   element_type: int
23   element_size: 4
24 - context: '{  :  }'
25   extent: '[N, M] -> { m[] }'
26   element_type: int
27   element_size: 4
28 statements:
29 - line: 23
30   domain: '[N, M] -> { S_0[i] : i <= -1 + N and i >= 0 }'
31   schedule: '[N] -> { S_0[i] -> [0, i, 0] }'
32   body:
33     type: binary
34     operation: =
35     arguments:
36     - type: access
37       relation: '[N, M] -> { S_0[i] -> m[] }'
38       index: '[N, M] -> { S_0[i] -> m[] }'
39       reference: __pet_ref_0
40       read: 0
41       write: 1
42     - type: binary
43       operation: +
44       arguments:
45       - type: access
46         relation: '[N, M] -> { S_0[i] -> [i] }'
47         index: '[N, M] -> { S_0[i] -> [(i)] }'
48         reference: __pet_ref_1
49         read: 1
50         write: 0
51       - type: access
52         relation: '[N, M] -> { S_0[i] -> [1] }'
53         index: '[N, M] -> { S_0[i] -> [(1)] }'
54         reference: __pet_ref_2
55         read: 1
56         write: 0
57 - line: 25
58   domain: '[N, M] -> { S_1[i, j] : j <= -1 + M and j >= 0 and i <= -1 + N and i >=
59     0 }'
60   schedule: '[M, N] -> { S_1[i, j] -> [0, i, 1, j] }'
61   body:
62     type: binary
63     operation: =
64     arguments:
65     - type: access
66       relation: '[N, M] -> { S_1[i, j] -> m[] }'
67       index: '[N, M] -> { S_1[i, j] -> m[] }'
68       reference: __pet_ref_3
69       read: 0
70       write: 1
71     - type: call
72       name: g
73       arguments:
74       - type: call
75         name: h
76         arguments:
77         - type: access
78           relation: '[N, M] -> { S_1[i, j] -> m[] }'
79           index: '[N, M] -> { S_1[i, j] -> m[] }'
80           reference: __pet_ref_4
81           read: 1
82           write: 0
83       - type: access
84         relation: '[N, M] -> { S_1[i, j] -> in1[i, j] }'
85         index: '[N, M] -> { S_1[i, j] -> in1[(i), (j)] }'
86         reference: __pet_ref_5
87         read: 1
88         write: 0
89 - line: 26
90   domain: '[N, M] -> { S_2[i] : i <= -1 + N and i >= 0 }'
91   schedule: '[N] -> { S_2[i] -> [0, i, 2] }'
92   body:
93     type: call
94     name: compute_row
95     arguments:
96     - type: call
97       name: h
98       arguments:
99       - type: access
100         relation: '[N, M] -> { S_2[i] -> m[] }'
101         index: '[N, M] -> { S_2[i] -> m[] }'
102         reference: __pet_ref_6
103         read: 1
104         write: 0
105     - type: access
106       relation: '[N, M] -> { S_2[i] -> A[i, o1] }'
107       index: '[N, M] -> { S_2[i] -> A[(i)] }'
108       reference: __pet_ref_7
109       read: 0
110       write: 1
111 - line: 28
112   domain: '[N, M] -> { S_3[] }'
113   schedule: '{ S_3[] -> [1] }'
114   body:
115     type: binary
116     operation: =
117     arguments:
118     - type: access
119       relation: '[N, M] -> { S_3[] -> A[5, 6] }'
120       index: '[N, M] -> { S_3[] -> A[(5), (6)] }'
121       reference: __pet_ref_8
122       read: 0
123       write: 1
124     - type: access
125       relation: '[N, M] -> { S_3[] -> [0] }'
126       index: '[N, M] -> { S_3[] -> [(0)] }'
127       reference: __pet_ref_9
128       read: 1
129       write: 0
130 - line: 30
131   domain: '[N, M] -> { S_4[i] : i <= -3 + N and i >= 0 }'
132   schedule: '[N] -> { S_4[i] -> [2, i] }'
133   body:
134     type: binary
135     operation: =
136     arguments:
137     - type: access
138       relation: '[N, M] -> { S_4[i] -> C[i] }'
139       index: '[N, M] -> { S_4[i] -> C[(i)] }'
140       reference: __pet_ref_10
141       read: 0
142       write: 1
143     - type: call
144       name: f
145       arguments:
146       - type: access
147         relation: '[N, M] -> { [S_4[i] -> [i1]] -> A[1 + i + i1, o1] }'
148         index: '[N, M] -> { [S_4[i] -> [i1]] -> A[(1 + i + i1)] }'
149         reference: __pet_ref_12
150         read: 1
151         write: 0
152         arguments:
153         - type: access
154           relation: '[N, M] -> { S_4[i] -> in2[i] }'
155           index: '[N, M] -> { S_4[i] -> in2[(i)] }'
156           reference: __pet_ref_11
157           read: 1
158           write: 0