isl_tab_pip.c: set_minimum_pa: drop unused variable
[isl.git] / isl_schedule_tree.h
bloba5c5486c511008a90f29a44205d7f2ba0fbde5a3
1 #ifndef ISL_SCHEDLUE_TREE_H
2 #define ISL_SCHEDLUE_TREE_H
4 #include <isl_schedule_band.h>
5 #include <isl/schedule.h>
6 #include <isl/set.h>
7 #include <isl/union_set.h>
9 struct isl_schedule_tree;
10 typedef struct isl_schedule_tree isl_schedule_tree;
12 ISL_DECLARE_LIST(schedule_tree)
14 /* A schedule (sub)tree.
16 * The leaves of a tree are not explicitly represented inside
17 * the isl_schedule_tree. If a tree consists of only a leaf,
18 * then it is equal to the static object isl_schedule_tree_empty.
20 * ctx may be NULL if type is isl_schedule_node_leaf.
21 * In this case, ref has a negative value.
23 * The "band" field is valid when type is isl_schedule_node_band.
24 * The "domain" field is valid when type is isl_schedule_node_domain
25 * and introduces the statement instances scheduled by the tree.
26 * The "filter" field is valid when type is isl_schedule_node_filter
27 * and represents the statement instances selected by the node.
29 * The "children" field is valid for all types except
30 * isl_schedule_node_leaf. This field is NULL if there are
31 * no children (except for the implicit leaves).
33 struct isl_schedule_tree {
34 int ref;
35 isl_ctx *ctx;
36 enum isl_schedule_node_type type;
37 union {
38 isl_schedule_band *band;
39 isl_union_set *domain;
40 isl_union_set *filter;
42 isl_schedule_tree_list *children;
45 isl_ctx *isl_schedule_tree_get_ctx(__isl_keep isl_schedule_tree *tree);
46 enum isl_schedule_node_type isl_schedule_tree_get_type(
47 __isl_keep isl_schedule_tree *tree);
49 __isl_give isl_schedule_tree *isl_schedule_tree_leaf(isl_ctx *ctx);
50 int isl_schedule_tree_is_leaf(__isl_keep isl_schedule_tree *tree);
52 int isl_schedule_tree_plain_is_equal(__isl_keep isl_schedule_tree *tree1,
53 __isl_keep isl_schedule_tree *tree2);
55 __isl_give isl_schedule_tree *isl_schedule_tree_copy(
56 __isl_keep isl_schedule_tree *tree);
57 __isl_null isl_schedule_tree *isl_schedule_tree_free(
58 __isl_take isl_schedule_tree *tree);
60 __isl_give isl_schedule_tree *isl_schedule_tree_from_band(
61 __isl_take isl_schedule_band *band);
62 __isl_give isl_schedule_tree *isl_schedule_tree_from_domain(
63 __isl_take isl_union_set *domain);
64 __isl_give isl_schedule_tree *isl_schedule_tree_from_filter(
65 __isl_take isl_union_set *filter);
66 __isl_give isl_schedule_tree *isl_schedule_tree_from_children(
67 enum isl_schedule_node_type type,
68 __isl_take isl_schedule_tree_list *list);
69 __isl_give isl_schedule_tree *isl_schedule_tree_from_pair(
70 enum isl_schedule_node_type type, __isl_take isl_schedule_tree *tree1,
71 __isl_take isl_schedule_tree *tree2);
73 __isl_give isl_space *isl_schedule_tree_band_get_space(
74 __isl_keep isl_schedule_tree *tree);
75 __isl_give isl_multi_union_pw_aff *isl_schedule_tree_band_get_partial_schedule(
76 __isl_keep isl_schedule_tree *tree);
77 __isl_give isl_union_set *isl_schedule_tree_domain_get_domain(
78 __isl_keep isl_schedule_tree *tree);
79 __isl_give isl_schedule_tree *isl_schedule_tree_domain_set_domain(
80 __isl_take isl_schedule_tree *tree, __isl_take isl_union_set *domain);
81 __isl_give isl_union_set *isl_schedule_tree_filter_get_filter(
82 __isl_keep isl_schedule_tree *tree);
83 __isl_give isl_schedule_tree *isl_schedule_tree_filter_set_filter(
84 __isl_take isl_schedule_tree *tree, __isl_take isl_union_set *filter);
86 __isl_give isl_schedule_tree *isl_schedule_tree_first_schedule_descendant(
87 __isl_take isl_schedule_tree *tree, __isl_keep isl_schedule_tree *leaf);
88 __isl_give isl_union_map *isl_schedule_tree_get_subtree_schedule_union_map(
89 __isl_keep isl_schedule_tree *tree);
91 unsigned isl_schedule_tree_band_n_member(__isl_keep isl_schedule_tree *tree);
93 int isl_schedule_tree_band_member_get_coincident(
94 __isl_keep isl_schedule_tree *tree, int pos);
95 __isl_give isl_schedule_tree *isl_schedule_tree_band_member_set_coincident(
96 __isl_take isl_schedule_tree *tree, int pos, int coincident);
97 int isl_schedule_tree_band_get_permutable(__isl_keep isl_schedule_tree *tree);
98 __isl_give isl_schedule_tree *isl_schedule_tree_band_set_permutable(
99 __isl_take isl_schedule_tree *tree, int permutable);
101 int isl_schedule_tree_has_children(__isl_keep isl_schedule_tree *tree);
102 int isl_schedule_tree_n_children(__isl_keep isl_schedule_tree *tree);
103 __isl_give isl_schedule_tree *isl_schedule_tree_get_child(
104 __isl_keep isl_schedule_tree *tree, int pos);
106 __isl_give isl_schedule_tree *isl_schedule_tree_insert_band(
107 __isl_take isl_schedule_tree *tree, __isl_take isl_schedule_band *band);
108 __isl_give isl_schedule_tree *isl_schedule_tree_insert_domain(
109 __isl_take isl_schedule_tree *tree, __isl_take isl_union_set *domain);
110 __isl_give isl_schedule_tree *isl_schedule_tree_insert_filter(
111 __isl_take isl_schedule_tree *tree, __isl_take isl_union_set *filter);
112 __isl_give isl_schedule_tree *isl_schedule_tree_children_insert_filter(
113 __isl_take isl_schedule_tree *tree, __isl_take isl_union_set *filter);
115 __isl_give isl_schedule_tree *isl_schedule_tree_append_to_leaves(
116 __isl_take isl_schedule_tree *tree1,
117 __isl_take isl_schedule_tree *tree2);
119 __isl_give isl_schedule_tree *isl_schedule_tree_band_scale(
120 __isl_take isl_schedule_tree *tree, __isl_take isl_multi_val *mv);
121 __isl_give isl_schedule_tree *isl_schedule_tree_band_scale_down(
122 __isl_take isl_schedule_tree *tree, __isl_take isl_multi_val *mv);
123 __isl_give isl_schedule_tree *isl_schedule_tree_band_tile(
124 __isl_take isl_schedule_tree *tree, __isl_take isl_multi_val *sizes);
125 __isl_give isl_schedule_tree *isl_schedule_tree_band_split(
126 __isl_take isl_schedule_tree *tree, int pos);
127 __isl_give isl_schedule_tree *isl_schedule_tree_band_gist(
128 __isl_take isl_schedule_tree *tree, __isl_take isl_union_set *context);
130 __isl_give isl_schedule_tree *isl_schedule_tree_child(
131 __isl_take isl_schedule_tree *tree, int pos);
132 __isl_give isl_schedule_tree *isl_schedule_tree_reset_children(
133 __isl_take isl_schedule_tree *tree);
134 __isl_give isl_schedule_tree *isl_schedule_tree_drop_child(
135 __isl_take isl_schedule_tree *tree, int pos);
136 __isl_give isl_schedule_tree *isl_schedule_tree_replace_child(
137 __isl_take isl_schedule_tree *tree, int pos,
138 __isl_take isl_schedule_tree *new_child);
140 __isl_give isl_schedule_tree *isl_schedule_tree_reset_user(
141 __isl_take isl_schedule_tree *tree);
142 __isl_give isl_schedule_tree *isl_schedule_tree_align_params(
143 __isl_take isl_schedule_tree *tree, __isl_take isl_space *space);
144 __isl_give isl_schedule_tree *isl_schedule_tree_pullback_union_pw_multi_aff(
145 __isl_take isl_schedule_tree *tree,
146 __isl_take isl_union_pw_multi_aff *upma);
148 __isl_give isl_printer *isl_printer_print_schedule_tree(
149 __isl_take isl_printer *p, __isl_keep isl_schedule_tree *tree);
150 __isl_give isl_printer *isl_printer_print_schedule_tree_mark(
151 __isl_take isl_printer *p, __isl_keep isl_schedule_tree *tree,
152 int n_ancestor, int *child_pos);
154 #endif