コード例 #1
0
ファイル: isl_ast_gen.cpp プロジェクト: jleben/stream-lang
void print_isl_ast_options(const isl::context & ctx_cpp)
{
    isl_ctx * ctx = ctx_cpp.get();

    cout << "-- ISL PH AST options: --" << endl;

    printf("atomic upper bound = %d\n",
           isl_options_get_ast_build_atomic_upper_bound(ctx));
    printf("prefer pdiv = %d\n",
           isl_options_get_ast_build_prefer_pdiv(ctx));
    printf("detect min max = %d\n",
           isl_options_get_ast_build_detect_min_max(ctx));
    printf("explot nested bound = %d\n",
           isl_options_get_ast_build_exploit_nested_bounds(ctx));
    int sep_bounds =
            isl_options_get_ast_build_separation_bounds(ctx);
    printf("separation bounds = %s\n",
           sep_bounds == ISL_AST_BUILD_SEPARATION_BOUNDS_IMPLICIT ?
               "implicit" : "explicit");
    printf("group coscheduled = %d\n",
           isl_options_get_ast_build_group_coscheduled(ctx));
    printf("scale strides = %d\n",
           isl_options_get_ast_build_scale_strides(ctx));
    printf("allow else = %d\n",
           isl_options_get_ast_build_allow_else(ctx));
    printf("allow or = %d\n", isl_options_get_ast_build_allow_or(ctx));
}
コード例 #2
0
ファイル: isl_ast_graft.c プロジェクト: abduld/isl
/* For each graft in "list",
 * insert an if node around graft->node testing the condition encoded
 * in graft->guard, assuming graft->guard involves any conditions.
 *
 * We keep track of a list of generated if nodes that can be extended
 * without changing the order of the elements in "list".
 * If the guard of a graft is a subset of either the guard or its complement
 * of one of those if nodes, then the node
 * of the new graft is inserted into the then or else branch of the last graft
 * and the current graft is discarded.
 * The guard of the node is then simplified based on the conditions
 * enforced at that then or else branch.
 * Otherwise, the current graft is appended to the list.
 *
 * We only construct else branches if allowed by the user.
 */
static __isl_give isl_ast_graft_list *insert_pending_guard_nodes(
	__isl_take isl_ast_graft_list *list,
	__isl_keep isl_ast_build *build)
{
	int i, j, n, n_if;
	int allow_else;
	isl_ctx *ctx;
	isl_ast_graft_list *res;
	struct isl_if_node *if_node = NULL;

	if (!build || !list)
		return isl_ast_graft_list_free(list);

	ctx = isl_ast_build_get_ctx(build);
	n = isl_ast_graft_list_n_ast_graft(list);

	allow_else = isl_options_get_ast_build_allow_else(ctx);

	n_if = 0;
	if (n > 1) {
		if_node = isl_alloc_array(ctx, struct isl_if_node, n - 1);
		if (!if_node)
			return isl_ast_graft_list_free(list);
	}