ppcg.c: eliminate_dead_code: extract out computation of live out accesses
[ppcg.git] / schedule.h
blob5b8b4f8a63dbaf1e3a919729b999fcdc345431fc
1 #ifndef _SCHEDULE_H
2 #define _SCHEDULE_H
4 /* An access to an 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 */
8 struct gpu_stmt_access {
9 /* Access reads elements */
10 int read;
11 /* Access writes elements */
12 int write;
14 /* Index of the array reference group this reference belong to.
15 * -1 if no reference groups have been computed for the array.
17 int group;
19 /* Access relation */
20 isl_map *access;
21 /* The reference id of the corresponding pet_expr. */
22 isl_id *ref_id;
24 struct gpu_stmt_access *next;
27 struct gpu_stmt {
28 isl_id *id;
29 struct pet_stmt *stmt;
31 /* Number of tile dimensions. */
32 int tile_len;
33 /* Number of initial parallel loops among tile dimensions. */
34 int n_parallel;
36 /* Linked list of accesses. */
37 struct gpu_stmt_access *accesses;
40 __isl_give isl_map *project_out(__isl_take isl_space *dim,
41 int len, int first, int n);
42 __isl_give isl_map *projection(__isl_take isl_space *dim,
43 int src_len, int dst_len);
44 __isl_give isl_set *extend(__isl_take isl_set *set, int dst_len);
45 __isl_give isl_union_map *align_range(__isl_take isl_union_map *umap);
47 #endif