diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 9ac9b67..49b7bc6 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -109,7 +109,7 @@ value_max (mpz_t res, mpz_t v1, mpz_t v2) /* This flag is set when an error occurred during the translation of CLAST to Gimple. */ -static bool gloog_error; +static bool graphite_regenerate_error; /* Verifies properties that GRAPHITE should maintain during translation. */ @@ -363,7 +363,7 @@ max_precision_type (tree type1, tree type2) if (precision > BITS_PER_WORD) { - gloog_error = true; + graphite_regenerate_error = true; return integer_type_node; } @@ -373,7 +373,7 @@ max_precision_type (tree type1, tree type2) if (!type) { - gloog_error = true; + graphite_regenerate_error = true; return integer_type_node; } @@ -456,7 +456,7 @@ clast_to_gcc_expression (tree type, struct clast_expr *e, ivs_params_p ip) if (!POINTER_TYPE_P (type)) return fold_build2 (MULT_EXPR, type, cst, name); - gloog_error = true; + graphite_regenerate_error = true; return cst; } } @@ -535,7 +535,7 @@ type_for_interval (mpz_t bound_one, mpz_t bound_two) if (precision > BITS_PER_WORD) { - gloog_error = true; + graphite_regenerate_error = true; return integer_type_node; } @@ -558,7 +558,7 @@ type_for_interval (mpz_t bound_one, mpz_t bound_two) if (!type) { - gloog_error = true; + graphite_regenerate_error = true; return integer_type_node; } @@ -1112,7 +1112,7 @@ translate_clast_user (struct clast_user_stmt *stmt, edge next_e, build_iv_mapping (iv_map, stmt, ip); next_e = copy_bb_and_scalar_dependences (GBB_BB (gbb), ip->region, - next_e, iv_map, &gloog_error); + next_e, iv_map, &graphite_regenerate_error); iv_map.release (); new_bb = next_e->src; @@ -1488,7 +1488,7 @@ build_cloog_union_domain (scop_p scop, int nb_scattering_dims) return union_domain; } -/* Return the options that will be used in GLOOG. */ +/* Return the options that will be used in graphite_regenerate_ast_cloog. */ static CloogOptions * set_cloog_options (void) @@ -1503,7 +1503,7 @@ set_cloog_options (void) /* Enable complex equality spreading: removes dummy statements (assignments) in the generated code which repeats the substitution equations for statements. This is useless for - GLooG. */ + graphite_regenerate_ast_cloog. */ options->esp = 1; /* Silence CLooG to avoid failing tests due to debug output to stderr. */ @@ -1663,7 +1663,7 @@ debug_generated_program (scop_p scop) */ bool -gloog (scop_p scop, bb_pbb_htab_type bb_pbb_mapping) +graphite_regenerate_ast_cloog (scop_p scop, bb_pbb_htab_type bb_pbb_mapping) { auto_vec newivs; loop_p context_loop; @@ -1674,7 +1674,7 @@ gloog (scop_p scop, bb_pbb_htab_type bb_pbb_mapping) struct ivs_params ip; timevar_push (TV_GRAPHITE_CODE_GEN); - gloog_error = false; + graphite_regenerate_error = false; params_index.create (10); @@ -1714,7 +1714,7 @@ gloog (scop_p scop, bb_pbb_htab_type bb_pbb_mapping) recompute_all_dominators (); graphite_verify (); - if (gloog_error) + if (graphite_regenerate_error) set_ifsese_condition (if_region, integer_zero_node); free (if_region->true_region); @@ -1739,6 +1739,6 @@ gloog (scop_p scop, bb_pbb_htab_type bb_pbb_mapping) num_no_dependency); } - return !gloog_error; + return !graphite_regenerate_error; } #endif diff --git a/gcc/graphite-clast-to-gimple.h b/gcc/graphite-clast-to-gimple.h index fc5a679..615cae8 100644 --- a/gcc/graphite-clast-to-gimple.h +++ b/gcc/graphite-clast-to-gimple.h @@ -21,6 +21,8 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_GRAPHITE_CLAST_TO_GIMPLE_H #define GCC_GRAPHITE_CLAST_TO_GIMPLE_H +#include "graphite-htab.h" + extern CloogState *cloog_state; /* Data structure for CLooG program representation. */ @@ -30,14 +32,7 @@ struct cloog_prog_clast { struct clast_stmt *stmt; }; -/* Stores BB's related PBB. */ - -struct bb_pbb_def -{ - basic_block bb; - poly_bb_p pbb; -}; - +extern bool graphite_regenerate_ast_cloog (scop_p, bb_pbb_htab_type); extern void debug_clast_stmt (struct clast_stmt *); extern void print_clast_stmt (FILE *, struct clast_stmt *); diff --git a/gcc/graphite-htab.h b/gcc/graphite-htab.h index d67dd0c..9f31fac 100644 --- a/gcc/graphite-htab.h +++ b/gcc/graphite-htab.h @@ -22,7 +22,14 @@ along with GCC; see the file COPYING3. If not see #define GCC_GRAPHITE_HTAB_H #include "hash-table.h" -#include "graphite-clast-to-gimple.h" + +/* Stores BB's related PBB. */ + +struct bb_pbb_def +{ + basic_block bb; + poly_bb_p pbb; +}; /* Hashtable helpers. */ @@ -52,7 +59,6 @@ bb_pbb_hasher::equal (const value_type *bp1, const compare_type *bp2) typedef hash_table bb_pbb_htab_type; -extern bool gloog (scop_p, bb_pbb_htab_type); poly_bb_p find_pbb_via_hash (bb_pbb_htab_type, basic_block); bool loop_is_parallel_p (loop_p, bb_pbb_htab_type, int); scop_p get_loop_body_pbbs (loop_p, bb_pbb_htab_type, vec *); diff --git a/gcc/graphite.c b/gcc/graphite.c index 2e1f439..28909ca 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -301,7 +301,7 @@ graphite_transform_loops (void) if (POLY_SCOP_P (scop) && apply_poly_transforms (scop) - && gloog (scop, bb_pbb_mapping)) + && graphite_regenerate_ast_cloog (scop, bb_pbb_mapping)) need_cfg_cleanup_p = true; }