use schedule tree directly during dependence analysis
[ppcg.git] / schedule.h
blob6f8ada37ad02a5a5a2f00a871b4626fc28426f7b
1 #ifndef _SCHEDULE_H
2 #define _SCHEDULE_H
4 /* An access to an outer array element or an iterator.
5 * Accesses to iterators have an access relation that maps to an unnamed space.
6 * An access may be both read and write.
7 * If the access relation is empty, then the output dimension may
8 * not be equal to the dimension of the corresponding array.
9 */
10 struct gpu_stmt_access {
11 /* Access reads elements */
12 int read;
13 /* Access writes elements */
14 int write;
15 /* All writes are definite writes. */
16 int exact_write;
17 /* The number of index expressions specified in the access. */
18 int n_index;
20 /* Index of the array reference group this reference belong to.
21 * -1 if no reference groups have been computed for the array.
23 int group;
25 /* May access relation */
26 isl_map *access;
27 /* May access relation with as domain a mapping from iteration domain
28 * to a reference identifier.
30 isl_map *tagged_access;
31 /* The reference id of the corresponding pet_expr. */
32 isl_id *ref_id;
34 struct gpu_stmt_access *next;
37 struct gpu_stmt {
38 isl_id *id;
39 struct pet_stmt *stmt;
41 /* Number of tile dimensions. */
42 int tile_len;
43 /* Number of initial parallel loops among tile dimensions. */
44 int n_parallel;
46 /* Linked list of accesses. */
47 struct gpu_stmt_access *accesses;
50 __isl_give isl_map *project_out(__isl_take isl_space *dim,
51 int len, int first, int n);
52 __isl_give isl_map *projection(__isl_take isl_space *dim,
53 int src_len, int dst_len);
54 __isl_give isl_set *extend(__isl_take isl_set *set, int dst_len);
55 __isl_give isl_union_map *align_range(__isl_take isl_union_map *umap);
57 #endif