scop.c: extract out expr_collect_access
[pet.git] / tests / conditional_assignment2.scop
blobcbe30d5dc10ae8bc6407847f3a372ef03d60a032
1 start: 225
2 end: 507
3 context: '[N, M] -> {  : N >= 0 and M >= 0 and N <= 2147483647 and M <= 2147483647
4   }'
5 arrays:
6 - context: '[M, N] -> {  : N >= 0 and M >= 0 }'
7   extent: '[N, M] -> { in1[i0, i1] : i1 <= -1 + M and i1 >= 0 and i0 <= -1 + N and
8     i0 >= 0 }'
9   element_type: int
10   element_size: 4
11 - context: '{  :  }'
12   extent: '[N, M] -> { in2[] }'
13   value_bounds: '{ [i0] : i0 >= -1 and i0 <= 1 }'
14   element_type: int
15   element_size: 4
16 - context: '[N] -> {  : N >= 0 }'
17   extent: '[N, M] -> { A[i0, i1] : i0 >= 0 and i0 <= -1 + N and i1 >= 0 and i1 <=
18     9 }'
19   element_type: int
20   element_size: 4
21 - context: '[N] -> {  : N >= 0 }'
22   extent: '[N, M] -> { C[i0] : i0 <= -1 + N and i0 >= 0 }'
23   element_type: int
24   element_size: 4
25 - context: '{  :  }'
26   extent: '[N, M] -> { m[] }'
27   element_type: int
28   element_size: 4
29 statements:
30 - line: 21
31   domain: '[N, M] -> { S_0[] }'
32   schedule: '{ S_0[] -> [0] }'
33   body:
34     type: binary
35     operation: =
36     arguments:
37     - type: access
38       relation: '[N, M] -> { S_0[] -> in2[] }'
39       index: '[N, M] -> { S_0[] -> in2[] }'
40       reference: __pet_ref_0
41       read: 0
42       write: 1
43     - type: call
44       name: g2
45 - line: 23
46   domain: '[N, M] -> { S_1[i] : i <= -1 + N and i >= 0 }'
47   schedule: '[N] -> { S_1[i] -> [1, i, 0] }'
48   body:
49     type: binary
50     operation: =
51     arguments:
52     - type: access
53       relation: '[N, M] -> { S_1[i] -> m[] }'
54       index: '[N, M] -> { S_1[i] -> m[] }'
55       reference: __pet_ref_1
56       read: 0
57       write: 1
58     - type: binary
59       operation: +
60       arguments:
61       - type: access
62         relation: '[N, M] -> { S_1[i] -> [i] }'
63         index: '[N, M] -> { S_1[i] -> [(i)] }'
64         reference: __pet_ref_2
65         read: 1
66         write: 0
67       - type: access
68         relation: '[N, M] -> { S_1[i] -> [1] }'
69         index: '[N, M] -> { S_1[i] -> [(1)] }'
70         reference: __pet_ref_3
71         read: 1
72         write: 0
73 - line: 25
74   domain: '[N, M] -> { S_2[i, j] : j <= -1 + M and j >= 0 and i <= -1 + N and i >=
75     0 }'
76   schedule: '[M, N] -> { S_2[i, j] -> [1, i, 1, j] }'
77   body:
78     type: binary
79     operation: =
80     arguments:
81     - type: access
82       relation: '[N, M] -> { S_2[i, j] -> m[] }'
83       index: '[N, M] -> { S_2[i, j] -> m[] }'
84       reference: __pet_ref_4
85       read: 0
86       write: 1
87     - type: call
88       name: g
89       arguments:
90       - type: call
91         name: h
92         arguments:
93         - type: access
94           relation: '[N, M] -> { S_2[i, j] -> m[] }'
95           index: '[N, M] -> { S_2[i, j] -> m[] }'
96           reference: __pet_ref_5
97           read: 1
98           write: 0
99       - type: access
100         relation: '[N, M] -> { S_2[i, j] -> in1[i, j] }'
101         index: '[N, M] -> { S_2[i, j] -> in1[(i), (j)] }'
102         reference: __pet_ref_6
103         read: 1
104         write: 0
105 - line: 26
106   domain: '[N, M] -> { S_3[i] : i <= -1 + N and i >= 0 }'
107   schedule: '[N] -> { S_3[i] -> [1, i, 2] }'
108   body:
109     type: call
110     name: compute_row
111     arguments:
112     - type: call
113       name: h
114       arguments:
115       - type: access
116         relation: '[N, M] -> { S_3[i] -> m[] }'
117         index: '[N, M] -> { S_3[i] -> m[] }'
118         reference: __pet_ref_7
119         read: 1
120         write: 0
121     - type: access
122       relation: '[N, M] -> { S_3[i] -> A[i, o1] }'
123       index: '[N, M] -> { S_3[i] -> A[(i)] }'
124       reference: __pet_ref_8
125       read: 0
126       write: 1
127 - line: 28
128   domain: '[N, M] -> { S_4[] }'
129   schedule: '{ S_4[] -> [2] }'
130   body:
131     type: binary
132     operation: =
133     arguments:
134     - type: access
135       relation: '[N, M] -> { S_4[] -> A[5, 6] }'
136       index: '[N, M] -> { S_4[] -> A[(5), (6)] }'
137       reference: __pet_ref_9
138       read: 0
139       write: 1
140     - type: access
141       relation: '[N, M] -> { S_4[] -> [0] }'
142       index: '[N, M] -> { S_4[] -> [(0)] }'
143       reference: __pet_ref_10
144       read: 1
145       write: 0
146 - line: 30
147   domain: '[N, M] -> { S_5[i] : i <= -1 + N and i >= 0 }'
148   schedule: '[N] -> { S_5[i] -> [3, i] }'
149   body:
150     type: binary
151     operation: =
152     arguments:
153     - type: access
154       relation: '[N, M] -> { S_5[i] -> C[i] }'
155       index: '[N, M] -> { S_5[i] -> C[(i)] }'
156       reference: __pet_ref_11
157       read: 0
158       write: 1
159     - type: ternary
160       arguments:
161       - type: access
162         relation: '[N, M] -> { [S_5[i] -> [i1]] -> [1] : i1 >= -i and i1 <= -1 + N
163           - i; [S_5[-1 + N] -> [1]] -> [0]; [S_5[0] -> [-1]] -> [0] }'
164         index: '[N, M] -> { [S_5[i] -> [i1]] -> [((1) : i1 >= -i and i1 <= -1 + N
165           - i; (0) : i = -1 + N and i1 = 1; (0) : i = 0 and i1 = -1)] }'
166         reference: __pet_ref_13
167         read: 1
168         write: 0
169         arguments:
170         - type: access
171           relation: '[N, M] -> { S_5[i] -> in2[] }'
172           index: '[N, M] -> { S_5[i] -> in2[] }'
173           reference: __pet_ref_12
174           read: 1
175           write: 0
176       - type: call
177         name: f
178         arguments:
179         - type: access
180           relation: '[N, M] -> { [S_5[i] -> [i1]] -> A[i + i1, o1] : i1 >= -i and
181             i1 <= -1 + N - i }'
182           index: '[N, M] -> { [S_5[i] -> [i1]] -> A[((i + i1) : i1 >= -i)] }'
183           reference: __pet_ref_15
184           read: 1
185           write: 0
186           arguments:
187           - type: access
188             relation: '[N, M] -> { S_5[i] -> in2[] }'
189             index: '[N, M] -> { S_5[i] -> in2[] }'
190             reference: __pet_ref_14
191             read: 1
192             write: 0
193       - type: access
194         relation: '[N, M] -> { [S_5[-1 + N] -> [1]] -> [0]; [S_5[0] -> [-1]] -> [0]
195           }'
196         index: '[N, M] -> { [S_5[i] -> [i1]] -> [(0)] }'
197         reference: __pet_ref_17
198         read: 1
199         write: 0
200         arguments:
201         - type: access
202           relation: '[N, M] -> { S_5[i] -> in2[] }'
203           index: '[N, M] -> { S_5[i] -> in2[] }'
204           reference: __pet_ref_16
205           read: 1
206           write: 0