pet_array: explicitly keep track of whether array is innermost
[pet.git] / scop.h
blob4171a19c5634778c85c9cfd753a1c0ffe1cb6ee3
1 #ifndef PET_SCOP_H
2 #define PET_SCOP_H
4 #include <pet.h>
6 #include <isl/aff.h>
7 #include <isl/id.h>
9 #if defined(__cplusplus)
10 extern "C" {
11 #endif
13 /* Do we want to skip the rest of the current loop iteration (pet_skip_now)
14 * or subsequent loop iterations (pet_skip_later)?
16 enum pet_skip { pet_skip_now = 0, pet_skip_later = 1 };
18 struct pet_stmt *pet_stmt_from_pet_tree(__isl_take isl_set *domain,
19 int id, __isl_take pet_tree *tree);
20 void pet_stmt_dump(struct pet_stmt *stmt);
21 void *pet_stmt_free(struct pet_stmt *stmt);
23 int pet_stmt_is_assume(struct pet_stmt *stmt);
24 isl_bool pet_stmt_is_affine_assume(struct pet_stmt *stmt);
25 __isl_give isl_set *pet_stmt_assume_get_affine_condition(struct pet_stmt *stmt);
27 struct pet_type *pet_type_alloc(isl_ctx *ctx, const char *name,
28 const char *definition);
29 struct pet_type *pet_type_free(struct pet_type *type);
31 void pet_array_dump(struct pet_array *array);
32 struct pet_array *pet_array_free(struct pet_array *array);
34 void *pet_implication_free(struct pet_implication *implication);
35 void *pet_independence_free(struct pet_independence *independence);
37 struct pet_scop *pet_scop_from_pet_stmt(__isl_take isl_space *space,
38 struct pet_stmt *stmt);
39 struct pet_scop *pet_scop_alloc(isl_ctx *ctx);
40 struct pet_scop *pet_scop_empty(__isl_take isl_space *space);
41 struct pet_scop *pet_scop_add_seq(isl_ctx *ctx, struct pet_scop *scop1,
42 struct pet_scop *scop2);
43 struct pet_scop *pet_scop_add_par(isl_ctx *ctx, struct pet_scop *scop1,
44 struct pet_scop *scop2);
46 int pet_scop_is_equal(struct pet_scop *scop1, struct pet_scop *scop2);
48 struct pet_scop *pet_scop_intersect_domain_prefix(struct pet_scop *scop,
49 __isl_take isl_set *domain);
50 struct pet_scop *pet_scop_embed(struct pet_scop *scop, __isl_take isl_set *dom,
51 __isl_take isl_multi_aff *sched);
52 struct pet_scop *pet_scop_restrict(struct pet_scop *scop,
53 __isl_take isl_set *cond);
54 struct pet_scop *pet_scop_restrict_context(struct pet_scop *scop,
55 __isl_take isl_set *context);
56 struct pet_scop *pet_scop_reset_context(struct pet_scop *scop);
57 struct pet_scop *pet_scop_filter(struct pet_scop *scop,
58 __isl_take isl_multi_pw_aff *test, int satisfied);
59 struct pet_scop *pet_scop_merge_filters(struct pet_scop *scop);
60 struct pet_scop *pet_scop_add_implication(struct pet_scop *scop,
61 __isl_take isl_map *map, int satisfied);
62 struct pet_scop *pet_scop_set_independent(struct pet_scop *scop,
63 __isl_keep isl_set *domain, __isl_take isl_union_set *local, int sign);
65 struct pet_scop *pet_scop_gist(struct pet_scop *scop,
66 __isl_keep isl_union_map *value_bounds);
68 struct pet_scop *pet_scop_add_ref_ids(struct pet_scop *scop);
69 struct pet_scop *pet_scop_anonymize(struct pet_scop *scop);
71 int pet_scop_has_skip(struct pet_scop *scop, enum pet_skip type);
72 int pet_scop_has_affine_skip(struct pet_scop *scop, enum pet_skip type);
73 int pet_scop_has_universal_skip(struct pet_scop *scop, enum pet_skip type);
74 int pet_scop_has_var_skip(struct pet_scop *scop, enum pet_skip type);
75 struct pet_scop *pet_scop_set_skip(struct pet_scop *scop,
76 enum pet_skip type, __isl_take isl_multi_pw_aff *skip);
77 __isl_give isl_multi_pw_aff *pet_scop_get_skip(struct pet_scop *scop,
78 enum pet_skip type);
79 __isl_give isl_set *pet_scop_get_affine_skip_domain(struct pet_scop *scop,
80 enum pet_skip type);
81 __isl_give isl_id *pet_scop_get_skip_id(struct pet_scop *scop,
82 enum pet_skip type);
83 __isl_give pet_expr *pet_scop_get_skip_expr(struct pet_scop *scop,
84 enum pet_skip type);
85 void pet_scop_reset_skip(struct pet_scop *scop, enum pet_skip type);
86 struct pet_scop *pet_scop_reset_skips(struct pet_scop *scop);
88 struct pet_scop *pet_scop_add_array(struct pet_scop *scop,
89 struct pet_array *array);
90 __isl_give isl_multi_pw_aff *pet_create_test_index(__isl_take isl_space *space,
91 int test_nr);
92 struct pet_scop *pet_scop_add_boolean_array(struct pet_scop *scop,
93 __isl_take isl_set *domain, __isl_take isl_multi_pw_aff *index,
94 int int_size);
96 struct pet_scop *pet_scop_update_start_end(struct pet_scop *scop,
97 unsigned start, unsigned end);
98 struct pet_scop *pet_scop_update_start_end_from_loc(struct pet_scop *scop,
99 __isl_keep pet_loc *loc);
100 struct pet_scop *pet_scop_set_loc(struct pet_scop *scop,
101 __isl_take pet_loc *loc);
102 struct pet_scop *pet_scop_set_input_file(struct pet_scop *scop, FILE *input);
104 #if defined(__cplusplus)
106 #endif
108 #endif