Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 14 | pmbaty | 1 | #ifndef ISL_AST_H |
| 2 | #define ISL_AST_H |
||
| 3 | |||
| 4 | #include <isl/ctx.h> |
||
| 5 | #include <isl/ast_type.h> |
||
| 6 | #include <isl/id_type.h> |
||
| 7 | #include <isl/id_to_ast_expr.h> |
||
| 8 | #include <isl/val_type.h> |
||
| 9 | #include <isl/list.h> |
||
| 10 | #include <isl/printer.h> |
||
| 11 | |||
| 12 | #if defined(__cplusplus) |
||
| 13 | extern "C" { |
||
| 14 | #endif |
||
| 15 | |||
| 16 | isl_stat isl_options_set_ast_iterator_type(isl_ctx *ctx, const char *val); |
||
| 17 | const char *isl_options_get_ast_iterator_type(isl_ctx *ctx); |
||
| 18 | |||
| 19 | isl_stat isl_options_set_ast_always_print_block(isl_ctx *ctx, int val); |
||
| 20 | int isl_options_get_ast_always_print_block(isl_ctx *ctx); |
||
| 21 | |||
| 22 | isl_stat isl_options_set_ast_print_outermost_block(isl_ctx *ctx, int val); |
||
| 23 | int isl_options_get_ast_print_outermost_block(isl_ctx *ctx); |
||
| 24 | |||
| 25 | __isl_give isl_ast_expr *isl_ast_expr_from_val(__isl_take isl_val *v); |
||
| 26 | __isl_give isl_ast_expr *isl_ast_expr_from_id(__isl_take isl_id *id); |
||
| 27 | __isl_give isl_ast_expr *isl_ast_expr_neg(__isl_take isl_ast_expr *expr); |
||
| 28 | __isl_give isl_ast_expr *isl_ast_expr_add(__isl_take isl_ast_expr *expr1, |
||
| 29 | __isl_take isl_ast_expr *expr2); |
||
| 30 | __isl_give isl_ast_expr *isl_ast_expr_sub(__isl_take isl_ast_expr *expr1, |
||
| 31 | __isl_take isl_ast_expr *expr2); |
||
| 32 | __isl_give isl_ast_expr *isl_ast_expr_mul(__isl_take isl_ast_expr *expr1, |
||
| 33 | __isl_take isl_ast_expr *expr2); |
||
| 34 | __isl_give isl_ast_expr *isl_ast_expr_div(__isl_take isl_ast_expr *expr1, |
||
| 35 | __isl_take isl_ast_expr *expr2); |
||
| 36 | __isl_give isl_ast_expr *isl_ast_expr_pdiv_q(__isl_take isl_ast_expr *expr1, |
||
| 37 | __isl_take isl_ast_expr *expr2); |
||
| 38 | __isl_give isl_ast_expr *isl_ast_expr_pdiv_r(__isl_take isl_ast_expr *expr1, |
||
| 39 | __isl_take isl_ast_expr *expr2); |
||
| 40 | __isl_give isl_ast_expr *isl_ast_expr_and(__isl_take isl_ast_expr *expr1, |
||
| 41 | __isl_take isl_ast_expr *expr2); |
||
| 42 | __isl_give isl_ast_expr *isl_ast_expr_and_then(__isl_take isl_ast_expr *expr1, |
||
| 43 | __isl_take isl_ast_expr *expr2); |
||
| 44 | __isl_give isl_ast_expr *isl_ast_expr_or(__isl_take isl_ast_expr *expr1, |
||
| 45 | __isl_take isl_ast_expr *expr2); |
||
| 46 | __isl_give isl_ast_expr *isl_ast_expr_or_else(__isl_take isl_ast_expr *expr1, |
||
| 47 | __isl_take isl_ast_expr *expr2); |
||
| 48 | __isl_give isl_ast_expr *isl_ast_expr_le(__isl_take isl_ast_expr *expr1, |
||
| 49 | __isl_take isl_ast_expr *expr2); |
||
| 50 | __isl_give isl_ast_expr *isl_ast_expr_lt(__isl_take isl_ast_expr *expr1, |
||
| 51 | __isl_take isl_ast_expr *expr2); |
||
| 52 | __isl_give isl_ast_expr *isl_ast_expr_ge(__isl_take isl_ast_expr *expr1, |
||
| 53 | __isl_take isl_ast_expr *expr2); |
||
| 54 | __isl_give isl_ast_expr *isl_ast_expr_gt(__isl_take isl_ast_expr *expr1, |
||
| 55 | __isl_take isl_ast_expr *expr2); |
||
| 56 | __isl_give isl_ast_expr *isl_ast_expr_eq(__isl_take isl_ast_expr *expr1, |
||
| 57 | __isl_take isl_ast_expr *expr2); |
||
| 58 | __isl_give isl_ast_expr *isl_ast_expr_access(__isl_take isl_ast_expr *array, |
||
| 59 | __isl_take isl_ast_expr_list *indices); |
||
| 60 | __isl_give isl_ast_expr *isl_ast_expr_call(__isl_take isl_ast_expr *function, |
||
| 61 | __isl_take isl_ast_expr_list *arguments); |
||
| 62 | __isl_give isl_ast_expr *isl_ast_expr_address_of(__isl_take isl_ast_expr *expr); |
||
| 63 | |||
| 64 | __isl_give isl_ast_expr *isl_ast_expr_copy(__isl_keep isl_ast_expr *expr); |
||
| 65 | __isl_null isl_ast_expr *isl_ast_expr_free(__isl_take isl_ast_expr *expr); |
||
| 66 | |||
| 67 | isl_ctx *isl_ast_expr_get_ctx(__isl_keep isl_ast_expr *expr); |
||
| 68 | __isl_subclass(isl_ast_expr) |
||
| 69 | enum isl_ast_expr_type isl_ast_expr_get_type(__isl_keep isl_ast_expr *expr); |
||
| 70 | __isl_export |
||
| 71 | __isl_give isl_val *isl_ast_expr_int_get_val(__isl_keep isl_ast_expr *expr); |
||
| 72 | __isl_give isl_val *isl_ast_expr_get_val(__isl_keep isl_ast_expr *expr); |
||
| 73 | __isl_export |
||
| 74 | __isl_give isl_id *isl_ast_expr_id_get_id(__isl_keep isl_ast_expr *expr); |
||
| 75 | __isl_give isl_id *isl_ast_expr_get_id(__isl_keep isl_ast_expr *expr); |
||
| 76 | |||
| 77 | __isl_subclass(isl_ast_expr_op) |
||
| 78 | enum isl_ast_expr_op_type isl_ast_expr_op_get_type( |
||
| 79 | __isl_keep isl_ast_expr *expr); |
||
| 80 | enum isl_ast_expr_op_type isl_ast_expr_get_op_type( |
||
| 81 | __isl_keep isl_ast_expr *expr); |
||
| 82 | __isl_export |
||
| 83 | isl_size isl_ast_expr_op_get_n_arg(__isl_keep isl_ast_expr *expr); |
||
| 84 | isl_size isl_ast_expr_get_op_n_arg(__isl_keep isl_ast_expr *expr); |
||
| 85 | __isl_export |
||
| 86 | __isl_give isl_ast_expr *isl_ast_expr_op_get_arg(__isl_keep isl_ast_expr *expr, |
||
| 87 | int pos); |
||
| 88 | __isl_give isl_ast_expr *isl_ast_expr_get_op_arg(__isl_keep isl_ast_expr *expr, |
||
| 89 | int pos); |
||
| 90 | __isl_give isl_ast_expr *isl_ast_expr_set_op_arg(__isl_take isl_ast_expr *expr, |
||
| 91 | int pos, __isl_take isl_ast_expr *arg); |
||
| 92 | |||
| 93 | isl_bool isl_ast_expr_is_equal(__isl_keep isl_ast_expr *expr1, |
||
| 94 | __isl_keep isl_ast_expr *expr2); |
||
| 95 | |||
| 96 | __isl_give isl_ast_expr *isl_ast_expr_substitute_ids( |
||
| 97 | __isl_take isl_ast_expr *expr, __isl_take isl_id_to_ast_expr *id2expr); |
||
| 98 | |||
| 99 | __isl_give isl_printer *isl_printer_print_ast_expr(__isl_take isl_printer *p, |
||
| 100 | __isl_keep isl_ast_expr *expr); |
||
| 101 | void isl_ast_expr_dump(__isl_keep isl_ast_expr *expr); |
||
| 102 | __isl_give char *isl_ast_expr_to_str(__isl_keep isl_ast_expr *expr); |
||
| 103 | __isl_export |
||
| 104 | __isl_give char *isl_ast_expr_to_C_str(__isl_keep isl_ast_expr *expr); |
||
| 105 | |||
| 106 | __isl_give isl_ast_node *isl_ast_node_alloc_user(__isl_take isl_ast_expr *expr); |
||
| 107 | __isl_give isl_ast_node *isl_ast_node_copy(__isl_keep isl_ast_node *node); |
||
| 108 | __isl_null isl_ast_node *isl_ast_node_free(__isl_take isl_ast_node *node); |
||
| 109 | |||
| 110 | isl_ctx *isl_ast_node_get_ctx(__isl_keep isl_ast_node *node); |
||
| 111 | __isl_subclass(isl_ast_node) |
||
| 112 | enum isl_ast_node_type isl_ast_node_get_type(__isl_keep isl_ast_node *node); |
||
| 113 | |||
| 114 | __isl_give isl_ast_node *isl_ast_node_set_annotation( |
||
| 115 | __isl_take isl_ast_node *node, __isl_take isl_id *annotation); |
||
| 116 | __isl_give isl_id *isl_ast_node_get_annotation(__isl_keep isl_ast_node *node); |
||
| 117 | |||
| 118 | __isl_export |
||
| 119 | __isl_give isl_ast_expr *isl_ast_node_for_get_iterator( |
||
| 120 | __isl_keep isl_ast_node *node); |
||
| 121 | __isl_export |
||
| 122 | __isl_give isl_ast_expr *isl_ast_node_for_get_init( |
||
| 123 | __isl_keep isl_ast_node *node); |
||
| 124 | __isl_export |
||
| 125 | __isl_give isl_ast_expr *isl_ast_node_for_get_cond( |
||
| 126 | __isl_keep isl_ast_node *node); |
||
| 127 | __isl_export |
||
| 128 | __isl_give isl_ast_expr *isl_ast_node_for_get_inc( |
||
| 129 | __isl_keep isl_ast_node *node); |
||
| 130 | __isl_export |
||
| 131 | __isl_give isl_ast_node *isl_ast_node_for_get_body( |
||
| 132 | __isl_keep isl_ast_node *node); |
||
| 133 | __isl_export |
||
| 134 | isl_bool isl_ast_node_for_is_degenerate(__isl_keep isl_ast_node *node); |
||
| 135 | |||
| 136 | __isl_export |
||
| 137 | __isl_give isl_ast_expr *isl_ast_node_if_get_cond( |
||
| 138 | __isl_keep isl_ast_node *node); |
||
| 139 | __isl_export |
||
| 140 | __isl_give isl_ast_node *isl_ast_node_if_get_then_node( |
||
| 141 | __isl_keep isl_ast_node *node); |
||
| 142 | __isl_give isl_ast_node *isl_ast_node_if_get_then( |
||
| 143 | __isl_keep isl_ast_node *node); |
||
| 144 | __isl_export |
||
| 145 | isl_bool isl_ast_node_if_has_else_node(__isl_keep isl_ast_node *node); |
||
| 146 | isl_bool isl_ast_node_if_has_else(__isl_keep isl_ast_node *node); |
||
| 147 | __isl_export |
||
| 148 | __isl_give isl_ast_node *isl_ast_node_if_get_else_node( |
||
| 149 | __isl_keep isl_ast_node *node); |
||
| 150 | __isl_give isl_ast_node *isl_ast_node_if_get_else( |
||
| 151 | __isl_keep isl_ast_node *node); |
||
| 152 | |||
| 153 | __isl_export |
||
| 154 | __isl_give isl_ast_node_list *isl_ast_node_block_get_children( |
||
| 155 | __isl_keep isl_ast_node *node); |
||
| 156 | |||
| 157 | __isl_export |
||
| 158 | __isl_give isl_id *isl_ast_node_mark_get_id(__isl_keep isl_ast_node *node); |
||
| 159 | __isl_export |
||
| 160 | __isl_give isl_ast_node *isl_ast_node_mark_get_node( |
||
| 161 | __isl_keep isl_ast_node *node); |
||
| 162 | |||
| 163 | __isl_export |
||
| 164 | __isl_give isl_ast_expr *isl_ast_node_user_get_expr( |
||
| 165 | __isl_keep isl_ast_node *node); |
||
| 166 | |||
| 167 | isl_stat isl_ast_node_foreach_descendant_top_down( |
||
| 168 | __isl_keep isl_ast_node *node, |
||
| 169 | isl_bool (*fn)(__isl_keep isl_ast_node *node, void *user), void *user); |
||
| 170 | |||
| 171 | __isl_give isl_printer *isl_printer_print_ast_node(__isl_take isl_printer *p, |
||
| 172 | __isl_keep isl_ast_node *node); |
||
| 173 | void isl_ast_node_dump(__isl_keep isl_ast_node *node); |
||
| 174 | __isl_give char *isl_ast_node_to_str(__isl_keep isl_ast_node *node); |
||
| 175 | |||
| 176 | __isl_give isl_ast_print_options *isl_ast_print_options_alloc(isl_ctx *ctx); |
||
| 177 | __isl_give isl_ast_print_options *isl_ast_print_options_copy( |
||
| 178 | __isl_keep isl_ast_print_options *options); |
||
| 179 | __isl_null isl_ast_print_options *isl_ast_print_options_free( |
||
| 180 | __isl_take isl_ast_print_options *options); |
||
| 181 | isl_ctx *isl_ast_print_options_get_ctx( |
||
| 182 | __isl_keep isl_ast_print_options *options); |
||
| 183 | |||
| 184 | __isl_give isl_ast_print_options *isl_ast_print_options_set_print_user( |
||
| 185 | __isl_take isl_ast_print_options *options, |
||
| 186 | __isl_give isl_printer *(*print_user)(__isl_take isl_printer *p, |
||
| 187 | __isl_take isl_ast_print_options *options, |
||
| 188 | __isl_keep isl_ast_node *node, void *user), |
||
| 189 | void *user); |
||
| 190 | __isl_give isl_ast_print_options *isl_ast_print_options_set_print_for( |
||
| 191 | __isl_take isl_ast_print_options *options, |
||
| 192 | __isl_give isl_printer *(*print_for)(__isl_take isl_printer *p, |
||
| 193 | __isl_take isl_ast_print_options *options, |
||
| 194 | __isl_keep isl_ast_node *node, void *user), |
||
| 195 | void *user); |
||
| 196 | |||
| 197 | isl_stat isl_options_set_ast_print_macro_once(isl_ctx *ctx, int val); |
||
| 198 | int isl_options_get_ast_print_macro_once(isl_ctx *ctx); |
||
| 199 | |||
| 200 | isl_stat isl_ast_expr_foreach_ast_expr_op_type(__isl_keep isl_ast_expr *expr, |
||
| 201 | isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user); |
||
| 202 | isl_stat isl_ast_expr_foreach_ast_op_type(__isl_keep isl_ast_expr *expr, |
||
| 203 | isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user); |
||
| 204 | isl_stat isl_ast_node_foreach_ast_expr_op_type(__isl_keep isl_ast_node *node, |
||
| 205 | isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user); |
||
| 206 | isl_stat isl_ast_node_foreach_ast_op_type(__isl_keep isl_ast_node *node, |
||
| 207 | isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user); |
||
| 208 | __isl_give isl_printer *isl_ast_expr_op_type_set_print_name( |
||
| 209 | __isl_take isl_printer *p, enum isl_ast_expr_op_type type, |
||
| 210 | __isl_keep const char *name); |
||
| 211 | __isl_give isl_printer *isl_ast_op_type_set_print_name( |
||
| 212 | __isl_take isl_printer *p, enum isl_ast_expr_op_type type, |
||
| 213 | __isl_keep const char *name); |
||
| 214 | __isl_give isl_printer *isl_ast_expr_op_type_print_macro( |
||
| 215 | enum isl_ast_expr_op_type type, __isl_take isl_printer *p); |
||
| 216 | __isl_give isl_printer *isl_ast_op_type_print_macro( |
||
| 217 | enum isl_ast_expr_op_type type, __isl_take isl_printer *p); |
||
| 218 | __isl_give isl_printer *isl_ast_expr_print_macros( |
||
| 219 | __isl_keep isl_ast_expr *expr, __isl_take isl_printer *p); |
||
| 220 | __isl_give isl_printer *isl_ast_node_print_macros( |
||
| 221 | __isl_keep isl_ast_node *node, __isl_take isl_printer *p); |
||
| 222 | __isl_give isl_printer *isl_ast_node_print(__isl_keep isl_ast_node *node, |
||
| 223 | __isl_take isl_printer *p, |
||
| 224 | __isl_take isl_ast_print_options *options); |
||
| 225 | __isl_give isl_printer *isl_ast_node_for_print(__isl_keep isl_ast_node *node, |
||
| 226 | __isl_take isl_printer *p, |
||
| 227 | __isl_take isl_ast_print_options *options); |
||
| 228 | __isl_give isl_printer *isl_ast_node_if_print(__isl_keep isl_ast_node *node, |
||
| 229 | __isl_take isl_printer *p, |
||
| 230 | __isl_take isl_ast_print_options *options); |
||
| 231 | |||
| 232 | __isl_export |
||
| 233 | __isl_give char *isl_ast_node_to_C_str(__isl_keep isl_ast_node *node); |
||
| 234 | |||
| 235 | ISL_DECLARE_LIST_FN(ast_expr) |
||
| 236 | ISL_DECLARE_EXPORTED_LIST_FN(ast_node) |
||
| 237 | |||
| 238 | #if defined(__cplusplus) |
||
| 239 | } |
||
| 240 | #endif |
||
| 241 | |||
| 242 | #endif |