From: Aditya Kumar Date: Thu, 1 Oct 2015 22:04:14 +0000 (+0000) Subject: Rename gimple_bb to gimple_poly_bb X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=65ef70d69574433ef8a0e26e31b8af7c0bbb65de;p=gcc.git Rename gimple_bb to gimple_poly_bb Renaming gimple_bb to gimple_poly_bb because there is a function gimple_bb by the same name in gimple.h. No functional change intended. Passes regtest and bootstrap. gcc/ChangeLog: 2015-10-01 Aditya Kumar * graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple): Renamed type from gimple_bb_p to gimple_poly_bb_p. (translate_isl_ast_node_user): Same. * graphite-poly.c (new_poly_bb): Same. * graphite-poly.h (gbb_from_bb): Same. * sese.h: Same. * graphite-sese-to-poly.c (new_gimple_bb): gimple_bb_p -> gimple_poly_bb_p (build_scop_scattering): Same. (find_params_in_bb): Same. (add_conditions_to_domain): Same. (sese_dom_walker::before_dom_children): Same. (analyze_drs_in_stmts): Same. (new_pbb_from_pbb): Same. (free_data_refs_aux): New pointer to type base_alias_pair. * graphite-sese-to-poly.h: Same. * sese.c (if_region_set_false_region): Fixed Indentation. (move_sese_in_condition): Same. From-SVN: r228358 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2bdec1ca4fa..4bd05f88d71 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,23 @@ +2015-10-01 Aditya Kumar + + * graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple): + Renamed type from gimple_bb_p to gimple_poly_bb_p. + (translate_isl_ast_node_user): Same. + * graphite-poly.c (new_poly_bb): Same. + * graphite-poly.h (gbb_from_bb): Same. + * sese.h: Same. + * graphite-sese-to-poly.c (new_gimple_bb): gimple_bb_p -> gimple_poly_bb_p + (build_scop_scattering): Same. + (find_params_in_bb): Same. + (add_conditions_to_domain): Same. + (sese_dom_walker::before_dom_children): Same. + (analyze_drs_in_stmts): Same. + (new_pbb_from_pbb): Same. + (free_data_refs_aux): New pointer to type base_alias_pair. + * graphite-sese-to-poly.h: Same. + * sese.c (if_region_set_false_region): Fixed Indentation. + (move_sese_in_condition): Same. + 2015-10-01 Sebastian Pop Aditya Kumar diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 4bdeca0d9ab..18342d02ecf 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -259,7 +259,7 @@ class translate_isl_ast_to_gimple FIXME: Instead of using a vec that maps each loop id to a possible chrec, we could consider using a map that maps loop ids to the corresponding tree expressions. */ - void build_iv_mapping (vec iv_map, gimple_bb_p gbb, + void build_iv_mapping (vec iv_map, gimple_poly_bb_p gbb, __isl_keep isl_ast_expr *user_expr, ivs_params &ip, sese region); private: @@ -739,7 +739,7 @@ translate_isl_ast_node_for (loop_p context_loop, __isl_keep isl_ast_node *node, void translate_isl_ast_to_gimple:: -build_iv_mapping (vec iv_map, gimple_bb_p gbb, +build_iv_mapping (vec iv_map, gimple_poly_bb_p gbb, __isl_keep isl_ast_expr *user_expr, ivs_params &ip, sese region) { @@ -775,7 +775,7 @@ translate_isl_ast_node_user (__isl_keep isl_ast_node *node, isl_id *name_id = isl_ast_expr_get_id (name_expr); poly_bb_p pbb = (poly_bb_p) isl_id_get_user (name_id); gcc_assert (pbb); - gimple_bb_p gbb = PBB_BLACK_BOX (pbb); + gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb); vec iv_map; isl_ast_expr_free (name_expr); isl_id_free (name_id); diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index d43975815de..f70a5420084 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -180,7 +180,7 @@ new_poly_bb (scop_p scop, void *black_box) pbb_set_black_box (pbb, black_box); PBB_DRS (pbb).create (3); PBB_IS_REDUCTION (pbb) = false; - GBB_PBB ((gimple_bb_p) black_box) = pbb; + GBB_PBB ((gimple_poly_bb_p) black_box) = pbb; return pbb; } @@ -324,7 +324,7 @@ print_pbb_domain (FILE *file, poly_bb_p pbb, int verbosity ATTRIBUTE_UNUSED) /* Dump the cases of a graphite basic block GBB on FILE. */ static void -dump_gbb_cases (FILE *file, gimple_bb_p gbb) +dump_gbb_cases (FILE *file, gimple_poly_bb_p gbb) { int i; gimple *stmt; @@ -351,7 +351,7 @@ dump_gbb_cases (FILE *file, gimple_bb_p gbb) /* Dump conditions of a graphite basic block GBB on FILE. */ static void -dump_gbb_conditions (FILE *file, gimple_bb_p gbb) +dump_gbb_conditions (FILE *file, gimple_poly_bb_p gbb) { int i; gimple *stmt; diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index b2dbd367bb9..fd59d6fd7ee 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -277,7 +277,7 @@ struct poly_bb bool is_reduction; }; -#define PBB_BLACK_BOX(PBB) ((gimple_bb_p) PBB->black_box) +#define PBB_BLACK_BOX(PBB) ((gimple_poly_bb_p) PBB->black_box) #define PBB_SCOP(PBB) (PBB->scop) #define PBB_DRS(PBB) (PBB->drs) #define PBB_IS_REDUCTION(PBB) (PBB->is_reduction) @@ -319,10 +319,10 @@ extern void debug_gmp_value (mpz_t); /* Returns a gimple_bb from BB. */ -static inline gimple_bb_p +static inline gimple_poly_bb_p gbb_from_bb (basic_block bb) { - return (gimple_bb_p) bb->aux; + return (gimple_poly_bb_p) bb->aux; } /* The poly_bb of the BB. */ diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 40b7d312bde..062cb3b2d18 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -198,12 +198,12 @@ reduction_phi_p (sese region, gphi_iterator *psi) /* Store the GRAPHITE representation of BB. */ -static gimple_bb_p +static gimple_poly_bb_p new_gimple_bb (basic_block bb, vec drs) { - struct gimple_bb *gbb; + gimple_poly_bb_p gbb; - gbb = XNEW (struct gimple_bb); + gbb = XNEW (struct gimple_poly_bb); bb->aux = gbb; GBB_BB (gbb) = bb; GBB_DATA_REFS (gbb) = drs; @@ -217,12 +217,12 @@ static void free_data_refs_aux (vec datarefs) { unsigned int i; - struct data_reference *dr; + data_reference_p dr; FOR_EACH_VEC_ELT (datarefs, i, dr) if (dr->aux) { - base_alias_pair *bap = (base_alias_pair *)(dr->aux); + base_alias_pair_p bap = (base_alias_pair_p)(dr->aux); free (bap->alias_set); @@ -233,7 +233,7 @@ free_data_refs_aux (vec datarefs) /* Frees GBB. */ static void -free_gimple_bb (struct gimple_bb *gbb) +free_gimple_bb (gimple_poly_bb_p gbb) { free_data_refs_aux (GBB_DATA_REFS (gbb)); free_data_refs (GBB_DATA_REFS (gbb)); @@ -277,7 +277,7 @@ free_scops (vec scops) /* Generates a polyhedral black box only if the bb contains interesting information. */ -static gimple_bb_p +static gimple_poly_bb_p try_generate_gimple_bb (scop_p scop, basic_block bb) { vec drs; @@ -526,7 +526,7 @@ build_scop_scattering (scop_p scop) { int i; poly_bb_p pbb; - gimple_bb_p previous_gbb = NULL; + gimple_poly_bb_p previous_gbb = NULL; isl_space *dc = isl_set_get_space (scop->context); isl_aff *static_sched; @@ -541,7 +541,7 @@ build_scop_scattering (scop_p scop) FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb) { - gimple_bb_p gbb = PBB_BLACK_BOX (pbb); + gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb); int prefix; if (previous_gbb) @@ -876,7 +876,7 @@ scan_tree_for_params (sese s, tree e) access functions, conditions and loop bounds. */ static void -find_params_in_bb (sese region, gimple_bb_p gbb) +find_params_in_bb (sese region, gimple_poly_bb_p gbb) { int i; unsigned j; @@ -1133,7 +1133,7 @@ add_conditions_to_domain (poly_bb_p pbb) { unsigned int i; gimple *stmt; - gimple_bb_p gbb = PBB_BLACK_BOX (pbb); + gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb); if (GBB_CONDITIONS (gbb).is_empty ()) return; @@ -1229,7 +1229,7 @@ sese_dom_walker::sese_dom_walker (cdi_direction direction, sese region) void sese_dom_walker::before_dom_children (basic_block bb) { - gimple_bb_p gbb; + gimple_poly_bb_p gbb; gcond *stmt; if (!bb_in_sese_p (bb, m_region)) @@ -1900,7 +1900,7 @@ static void analyze_drs_in_stmts (scop_p scop, basic_block bb, vec stmts) { loop_p nest; - gimple_bb_p gbb; + gimple_poly_bb_p gbb; gimple *stmt; int i; sese region = SCOP_REGION (scop); @@ -1982,8 +1982,8 @@ new_pbb_from_pbb (scop_p scop, poly_bb_p pbb, basic_block bb) { vec drs; drs.create (3); - gimple_bb_p gbb = PBB_BLACK_BOX (pbb); - gimple_bb_p gbb1 = new_gimple_bb (bb, drs); + gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb); + gimple_poly_bb_p gbb1 = new_gimple_bb (bb, drs); poly_bb_p pbb1 = new_poly_bb (scop, gbb1); int index, n = SCOP_BBS (scop).length (); diff --git a/gcc/graphite-sese-to-poly.h b/gcc/graphite-sese-to-poly.h index b6393081325..25d9a09270f 100644 --- a/gcc/graphite-sese-to-poly.h +++ b/gcc/graphite-sese-to-poly.h @@ -21,11 +21,11 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_GRAPHITE_SESE_TO_POLY_H #define GCC_GRAPHITE_SESE_TO_POLY_H -struct base_alias_pair +typedef struct base_alias_pair { int base_obj_set; int *alias_set; -}; +} *base_alias_pair_p; void build_poly_scop (scop_p); diff --git a/gcc/sese.c b/gcc/sese.c index 803f519c1f5..2c654bcb24c 100644 --- a/gcc/sese.c +++ b/gcc/sese.c @@ -693,7 +693,7 @@ if_region_set_false_region (ifsese if_region, sese region) memcpy (loop_exit, *((struct loop_exit **) slot), sizeof (struct loop_exit)); current_loops->exits->clear_slot (slot); - hashval_t hash = htab_hash_pointer (false_edge); + hashval_t hash = htab_hash_pointer (false_edge); slot = current_loops->exits->find_slot_with_hash (false_edge, hash, INSERT); loop_exit->e = false_edge; @@ -752,7 +752,8 @@ move_sese_in_condition (sese region) ifsese if_region; SESE_ENTRY (region) = single_succ_edge (pred_block); - if_region = create_if_region_on_edge (single_pred_edge (pred_block), integer_one_node); + if_region = create_if_region_on_edge (single_pred_edge (pred_block), + integer_one_node); if_region_set_false_region (if_region, region); return if_region; diff --git a/gcc/sese.h b/gcc/sese.h index 1a26fa836e7..0b2db8d0332 100644 --- a/gcc/sese.h +++ b/gcc/sese.h @@ -263,7 +263,7 @@ recompute_all_dominators (void) calculate_dominance_info (CDI_POST_DOMINATORS); } -typedef struct gimple_bb +typedef struct gimple_poly_bb { basic_block bb; struct poly_bb *pbb; @@ -291,7 +291,7 @@ typedef struct gimple_bb vec conditions; vec condition_cases; vec data_refs; -} *gimple_bb_p; +} *gimple_poly_bb_p; #define GBB_BB(GBB) (GBB)->bb #define GBB_PBB(GBB) (GBB)->pbb @@ -302,7 +302,7 @@ typedef struct gimple_bb /* Return the innermost loop that contains the basic block GBB. */ static inline struct loop * -gbb_loop (struct gimple_bb *gbb) +gbb_loop (gimple_poly_bb_p gbb) { return GBB_BB (gbb)->loop_father; } @@ -311,7 +311,7 @@ gbb_loop (struct gimple_bb *gbb) If there is no corresponding gimple loop, we return NULL. */ static inline loop_p -gbb_loop_at_index (gimple_bb_p gbb, sese region, int index) +gbb_loop_at_index (gimple_poly_bb_p gbb, sese region, int index) { loop_p loop = gbb_loop (gbb); int depth = sese_loop_depth (region, loop); @@ -327,7 +327,7 @@ gbb_loop_at_index (gimple_bb_p gbb, sese region, int index) /* The number of common loops in REGION for GBB1 and GBB2. */ static inline int -nb_common_loops (sese region, gimple_bb_p gbb1, gimple_bb_p gbb2) +nb_common_loops (sese region, gimple_poly_bb_p gbb1, gimple_poly_bb_p gbb2) { loop_p l1 = gbb_loop (gbb1); loop_p l2 = gbb_loop (gbb2);