From 7da32a610cce235828260164135e0337d992cd66 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 3 Jul 2013 13:06:13 +0200 Subject: [PATCH] extract out isl/ast_type.h This is needed to avoid a circular dependence in the definition of isl_ast_expr_substitute_ids in the next commit. Signed-off-by: Sven Verdoolaege --- Makefile.am | 1 + include/isl/ast.h | 55 +--------------------------------------- include/isl/ast_type.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 54 deletions(-) create mode 100644 include/isl/ast_type.h diff --git a/Makefile.am b/Makefile.am index 96b09eea..b72c8354 100644 --- a/Makefile.am +++ b/Makefile.am @@ -198,6 +198,7 @@ pkginclude_HEADERS = \ include/isl/aff_type.h \ include/isl/arg.h \ include/isl/ast.h \ + include/isl/ast_type.h \ include/isl/ast_build.h \ include/isl/band.h \ include/isl/constraint.h \ diff --git a/include/isl/ast.h b/include/isl/ast.h index fa5d7b32..bebb2ebd 100644 --- a/include/isl/ast.h +++ b/include/isl/ast.h @@ -2,6 +2,7 @@ #define ISL_AST_H #include +#include #include #include #include @@ -11,60 +12,6 @@ extern "C" { #endif -struct isl_ast_expr; -typedef struct isl_ast_expr isl_ast_expr; - -struct isl_ast_node; -typedef struct isl_ast_node isl_ast_node; - -enum isl_ast_op_type { - isl_ast_op_error = -1, - isl_ast_op_and, - isl_ast_op_and_then, - isl_ast_op_or, - isl_ast_op_or_else, - isl_ast_op_max, - isl_ast_op_min, - isl_ast_op_minus, - isl_ast_op_add, - isl_ast_op_sub, - isl_ast_op_mul, - isl_ast_op_div, - isl_ast_op_fdiv_q, /* Round towards -infty */ - isl_ast_op_pdiv_q, /* Dividend is non-negative */ - isl_ast_op_pdiv_r, /* Dividend is non-negative */ - isl_ast_op_cond, - isl_ast_op_select, - isl_ast_op_eq, - isl_ast_op_le, - isl_ast_op_lt, - isl_ast_op_ge, - isl_ast_op_gt, - isl_ast_op_call, - isl_ast_op_access -}; - -enum isl_ast_expr_type { - isl_ast_expr_error = -1, - isl_ast_expr_op, - isl_ast_expr_id, - isl_ast_expr_int -}; - -enum isl_ast_node_type { - isl_ast_node_error = -1, - isl_ast_node_for = 1, - isl_ast_node_if, - isl_ast_node_block, - isl_ast_node_user -}; - -struct isl_ast_print_options; -typedef struct isl_ast_print_options isl_ast_print_options; - -ISL_DECLARE_LIST(ast_expr) -ISL_DECLARE_LIST(ast_node) - int isl_options_set_ast_iterator_type(isl_ctx *ctx, const char *val); const char *isl_options_get_ast_iterator_type(isl_ctx *ctx); diff --git a/include/isl/ast_type.h b/include/isl/ast_type.h new file mode 100644 index 00000000..47262887 --- /dev/null +++ b/include/isl/ast_type.h @@ -0,0 +1,68 @@ +#ifndef ISL_AST_TYPE_H +#define ISL_AST_TYPE_H + +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +struct isl_ast_expr; +typedef struct isl_ast_expr isl_ast_expr; + +struct isl_ast_node; +typedef struct isl_ast_node isl_ast_node; + +enum isl_ast_op_type { + isl_ast_op_error = -1, + isl_ast_op_and, + isl_ast_op_and_then, + isl_ast_op_or, + isl_ast_op_or_else, + isl_ast_op_max, + isl_ast_op_min, + isl_ast_op_minus, + isl_ast_op_add, + isl_ast_op_sub, + isl_ast_op_mul, + isl_ast_op_div, + isl_ast_op_fdiv_q, /* Round towards -infty */ + isl_ast_op_pdiv_q, /* Dividend is non-negative */ + isl_ast_op_pdiv_r, /* Dividend is non-negative */ + isl_ast_op_cond, + isl_ast_op_select, + isl_ast_op_eq, + isl_ast_op_le, + isl_ast_op_lt, + isl_ast_op_ge, + isl_ast_op_gt, + isl_ast_op_call, + isl_ast_op_access +}; + +enum isl_ast_expr_type { + isl_ast_expr_error = -1, + isl_ast_expr_op, + isl_ast_expr_id, + isl_ast_expr_int +}; + +enum isl_ast_node_type { + isl_ast_node_error = -1, + isl_ast_node_for = 1, + isl_ast_node_if, + isl_ast_node_block, + isl_ast_node_user +}; + +struct isl_ast_print_options; +typedef struct isl_ast_print_options isl_ast_print_options; + +ISL_DECLARE_LIST(ast_expr) +ISL_DECLARE_LIST(ast_node) + +#if defined(__cplusplus) +} +#endif + +#endif -- 2.11.4.GIT