induction variable of for loop should be considered a parameter inside the loop
[pet.git] / scop.h
blobfcab645c661b4bbbf01571fe2caecd2d7eeb5c08
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_equal(struct pet_expr *expr1, struct pet_expr *expr2);
31 struct pet_expr *pet_expr_restrict(struct pet_expr *expr,
32 __isl_take isl_set *cond);
34 struct pet_stmt *pet_stmt_from_pet_expr(isl_ctx *ctx, int line,
35 __isl_take isl_id *label, int id, struct pet_expr *expr);
36 void pet_stmt_dump(struct pet_stmt *stmt);
37 void *pet_stmt_free(struct pet_stmt *stmt);
39 void pet_array_dump(struct pet_array *array);
40 void *pet_array_free(struct pet_array *array);
42 struct pet_stmt *pet_stmt_prefix(struct pet_stmt *stmt, int pos);
44 struct pet_scop *pet_scop_from_pet_stmt(isl_ctx *ctx, struct pet_stmt *stmt);
45 struct pet_scop *pet_scop_empty(isl_ctx *ctx);
46 struct pet_scop *pet_scop_add(isl_ctx *ctx, struct pet_scop *scop1,
47 struct pet_scop *scop2);
49 int pet_scop_is_equal(struct pet_scop *scop1, struct pet_scop *scop2);
51 struct pet_scop *pet_scop_prefix(struct pet_scop *scop, int pos);
52 struct pet_scop *pet_scop_embed(struct pet_scop *scop, __isl_take isl_set *dom,
53 __isl_take isl_map *sched, __isl_take isl_id *id);
54 struct pet_scop *pet_scop_restrict(struct pet_scop *scop,
55 __isl_take isl_set *cond);
56 struct pet_scop *pet_scop_filter(struct pet_scop *scop,
57 __isl_take isl_map *test, int satisfied);
59 struct pet_scop *pet_scop_detect_parameter_accesses(struct pet_scop *scop);
61 #if defined(__cplusplus)
63 #endif
65 #endif