pet_scop_embed: take mapping from virtual to real iterator
[pet.git] / scop.h
blob9db84297de0e50c19ae0ad2ff3237d1cf6342368
1 #ifndef PET_SCOP_H
2 #define PET_SCOP_H
4 #include <pet.h>
6 #include <isl/id.h>
8 #if defined(__cplusplus)
9 extern "C" {
10 #endif
12 const char *pet_type_str(enum pet_expr_type type);
13 enum pet_expr_type pet_str_type(const char *str);
15 enum pet_op_type pet_str_op(const char *str);
17 struct pet_expr *pet_expr_from_access(__isl_take isl_map *access);
18 struct pet_expr *pet_expr_new_unary(isl_ctx *ctx, enum pet_op_type op,
19 struct pet_expr *arg);
20 struct pet_expr *pet_expr_new_binary(isl_ctx *ctx, enum pet_op_type op,
21 struct pet_expr *lhs, struct pet_expr *rhs);
22 struct pet_expr *pet_expr_new_ternary(isl_ctx *ctx, struct pet_expr *cond,
23 struct pet_expr *lhs, struct pet_expr *rhs);
24 struct pet_expr *pet_expr_new_call(isl_ctx *ctx, const char *name,
25 unsigned n_arg);
26 struct pet_expr *pet_expr_new_double(isl_ctx *ctx, double d);
27 void pet_expr_dump(struct pet_expr *expr);
28 void *pet_expr_free(struct pet_expr *expr);
30 int pet_expr_is_affine(struct pet_expr *expr);
31 int pet_expr_is_equal(struct pet_expr *expr1, struct pet_expr *expr2);
32 struct pet_expr *pet_expr_restrict(struct pet_expr *expr,
33 __isl_take isl_set *cond);
35 struct pet_stmt *pet_stmt_from_pet_expr(isl_ctx *ctx, int line,
36 __isl_take isl_id *label, int id, struct pet_expr *expr);
37 void pet_stmt_dump(struct pet_stmt *stmt);
38 void *pet_stmt_free(struct pet_stmt *stmt);
40 void pet_array_dump(struct pet_array *array);
41 void *pet_array_free(struct pet_array *array);
43 struct pet_stmt *pet_stmt_prefix(struct pet_stmt *stmt, int pos);
45 struct pet_scop *pet_scop_from_pet_stmt(isl_ctx *ctx, struct pet_stmt *stmt);
46 struct pet_scop *pet_scop_empty(isl_ctx *ctx);
47 struct pet_scop *pet_scop_add(isl_ctx *ctx, struct pet_scop *scop1,
48 struct pet_scop *scop2);
50 int pet_scop_is_equal(struct pet_scop *scop1, struct pet_scop *scop2);
52 struct pet_scop *pet_scop_prefix(struct pet_scop *scop, int pos);
53 struct pet_scop *pet_scop_embed(struct pet_scop *scop, __isl_take isl_set *dom,
54 __isl_take isl_map *sched, __isl_take isl_map *iv_map,
55 __isl_take isl_id *id);
56 struct pet_scop *pet_scop_restrict(struct pet_scop *scop,
57 __isl_take isl_set *cond);
58 struct pet_scop *pet_scop_restrict_context(struct pet_scop *scop,
59 __isl_take isl_set *context);
60 struct pet_scop *pet_scop_reset_context(struct pet_scop *scop);
61 struct pet_scop *pet_scop_filter(struct pet_scop *scop,
62 __isl_take isl_map *test, int satisfied);
64 struct pet_scop *pet_scop_detect_parameter_accesses(struct pet_scop *scop);
66 struct pet_scop *pet_scop_gist(struct pet_scop *scop,
67 __isl_keep isl_union_map *value_bounds);
69 struct pet_scop *pet_scop_anonymize(struct pet_scop *scop);
71 struct pet_expr *pet_expr_foreach_access(struct pet_expr *expr,
72 __isl_give isl_map *(*fn)(__isl_take isl_map *access, void *user),
73 void *user);
75 int pet_scop_writes(struct pet_scop *scop, __isl_keep isl_id *id);
77 #if defined(__cplusplus)
79 #endif
81 #endif