8 #if defined(__cplusplus)
12 /* Do we want to skip the rest of the current loop iteration (pet_skip_now)
13 * or subsequent loop iterations (pet_skip_later)?
15 enum pet_skip
{ pet_skip_now
= 0, pet_skip_later
= 1 };
17 const char *pet_type_str(enum pet_expr_type type
);
18 enum pet_expr_type
pet_str_type(const char *str
);
20 enum pet_op_type
pet_str_op(const char *str
);
22 struct pet_expr
*pet_expr_from_access(__isl_take isl_map
*access
);
23 struct pet_expr
*pet_expr_new_unary(isl_ctx
*ctx
, enum pet_op_type op
,
24 struct pet_expr
*arg
);
25 struct pet_expr
*pet_expr_new_binary(isl_ctx
*ctx
, enum pet_op_type op
,
26 struct pet_expr
*lhs
, struct pet_expr
*rhs
);
27 struct pet_expr
*pet_expr_new_ternary(isl_ctx
*ctx
, struct pet_expr
*cond
,
28 struct pet_expr
*lhs
, struct pet_expr
*rhs
);
29 struct pet_expr
*pet_expr_new_call(isl_ctx
*ctx
, const char *name
,
31 struct pet_expr
*pet_expr_new_double(isl_ctx
*ctx
, double d
);
32 void pet_expr_dump(struct pet_expr
*expr
);
33 void *pet_expr_free(struct pet_expr
*expr
);
35 int pet_expr_is_affine(struct pet_expr
*expr
);
36 int pet_expr_is_equal(struct pet_expr
*expr1
, struct pet_expr
*expr2
);
37 struct pet_expr
*pet_expr_restrict(struct pet_expr
*expr
,
38 __isl_take isl_set
*cond
);
40 struct pet_stmt
*pet_stmt_from_pet_expr(isl_ctx
*ctx
, int line
,
41 __isl_take isl_id
*label
, int id
, struct pet_expr
*expr
);
42 void pet_stmt_dump(struct pet_stmt
*stmt
);
43 void *pet_stmt_free(struct pet_stmt
*stmt
);
45 void pet_array_dump(struct pet_array
*array
);
46 void *pet_array_free(struct pet_array
*array
);
48 struct pet_stmt
*pet_stmt_prefix(struct pet_stmt
*stmt
, int pos
);
50 struct pet_scop
*pet_scop_from_pet_stmt(isl_ctx
*ctx
, struct pet_stmt
*stmt
);
51 struct pet_scop
*pet_scop_alloc(isl_ctx
*ctx
);
52 struct pet_scop
*pet_scop_empty(isl_ctx
*ctx
);
53 struct pet_scop
*pet_scop_add_seq(isl_ctx
*ctx
, struct pet_scop
*scop1
,
54 struct pet_scop
*scop2
);
55 struct pet_scop
*pet_scop_add_par(isl_ctx
*ctx
, struct pet_scop
*scop1
,
56 struct pet_scop
*scop2
);
58 int pet_scop_is_equal(struct pet_scop
*scop1
, struct pet_scop
*scop2
);
60 struct pet_scop
*pet_scop_prefix(struct pet_scop
*scop
, int pos
);
61 struct pet_scop
*pet_scop_embed(struct pet_scop
*scop
, __isl_take isl_set
*dom
,
62 __isl_take isl_map
*sched
, __isl_take isl_map
*iv_map
,
63 __isl_take isl_id
*id
);
64 struct pet_scop
*pet_scop_restrict(struct pet_scop
*scop
,
65 __isl_take isl_set
*cond
);
66 struct pet_scop
*pet_scop_restrict_context(struct pet_scop
*scop
,
67 __isl_take isl_set
*context
);
68 struct pet_scop
*pet_scop_reset_context(struct pet_scop
*scop
);
69 struct pet_expr
*pet_expr_filter(struct pet_expr
*expr
,
70 __isl_take isl_map
*test
, int satisfied
);
71 struct pet_scop
*pet_scop_filter(struct pet_scop
*scop
,
72 __isl_take isl_map
*test
, int satisfied
);
73 struct pet_scop
*pet_scop_merge_filters(struct pet_scop
*scop
);
75 struct pet_scop
*pet_scop_detect_parameter_accesses(struct pet_scop
*scop
);
77 struct pet_scop
*pet_scop_gist(struct pet_scop
*scop
,
78 __isl_keep isl_union_map
*value_bounds
);
80 struct pet_scop
*pet_scop_anonymize(struct pet_scop
*scop
);
82 struct pet_expr
*pet_expr_foreach_access(struct pet_expr
*expr
,
83 __isl_give isl_map
*(*fn
)(__isl_take isl_map
*access
, void *user
),
86 int pet_scop_writes(struct pet_scop
*scop
, __isl_keep isl_id
*id
);
88 int pet_scop_has_skip(struct pet_scop
*scop
, enum pet_skip type
);
89 int pet_scop_has_affine_skip(struct pet_scop
*scop
, enum pet_skip type
);
90 int pet_scop_has_universal_skip(struct pet_scop
*scop
, enum pet_skip type
);
91 int pet_scop_has_var_skip(struct pet_scop
*scop
, enum pet_skip type
);
92 struct pet_scop
*pet_scop_set_skip(struct pet_scop
*scop
,
93 enum pet_skip type
, __isl_take isl_set
*skip
);
94 __isl_give isl_set
*pet_scop_get_skip(struct pet_scop
*scop
,
96 __isl_give isl_map
*pet_scop_get_skip_map(struct pet_scop
*scop
,
98 struct pet_expr
*pet_scop_get_skip_expr(struct pet_scop
*scop
,
100 void pet_scop_reset_skip(struct pet_scop
*scop
, enum pet_skip type
);
102 #if defined(__cplusplus)