diff mbox

Rename gimple_bb to gimple_poly_bb

Message ID 1443731767-26868-1-git-send-email-hiraditya@msn.com
State New
Headers show

Commit Message

Aditya K Oct. 1, 2015, 8:36 p.m. UTC
From: hiraditya <hiraditya@msn.com>

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  <hiraditya@msn.com>
	    Sebastian Pop  <s.pop@samsung.com>
        * 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.


---
 gcc/graphite-isl-ast-to-gimple.c |  6 +++---
 gcc/graphite-poly.c              |  6 +++---
 gcc/graphite-poly.h              |  6 +++---
 gcc/graphite-sese-to-poly.c      | 30 +++++++++++++++---------------
 gcc/graphite-sese-to-poly.h      |  4 ++--
 gcc/sese.c                       |  5 +++--
 gcc/sese.h                       | 10 +++++-----
 7 files changed, 34 insertions(+), 33 deletions(-)

Comments

Tobias Grosser Oct. 1, 2015, 9:45 p.m. UTC | #1
On 10/01/2015 10:36 PM, Aditya Kumar wrote:
> From: hiraditya <hiraditya@msn.com>
>
> 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.

LGTM

Tobias
diff mbox

Patch

diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index 4bdeca0..18342d0 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<tree> that maps each loop id to a possible
      chrec, we could consider using a map<int, tree> that maps loop ids to the
      corresponding tree expressions.  */
-  void build_iv_mapping (vec<tree> iv_map, gimple_bb_p gbb,
+  void build_iv_mapping (vec<tree> 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<tree> iv_map, gimple_bb_p gbb,
+build_iv_mapping (vec<tree> 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<tree> 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 d439758..f70a542 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 b2dbd36..fd59d6f 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 26f75e9..65d3c9b 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<data_reference_p> 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<data_reference_p> 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<data_reference_p> 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));
@@ -303,7 +303,7 @@  outermost_loop_in_sese_1 (sese region, basic_block bb)
 /* 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<data_reference_p> drs;
@@ -552,7 +552,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;
 
@@ -567,7 +567,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)
@@ -902,7 +902,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;
@@ -1159,7 +1159,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;
@@ -1255,7 +1255,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))
@@ -1926,7 +1926,7 @@  static void
 analyze_drs_in_stmts (scop_p scop, basic_block bb, vec<gimple *> stmts)
 {
   loop_p nest;
-  gimple_bb_p gbb;
+  gimple_poly_bb_p gbb;
   gimple *stmt;
   int i;
   sese region = SCOP_REGION (scop);
@@ -2008,8 +2008,8 @@  new_pbb_from_pbb (scop_p scop, poly_bb_p pbb, basic_block bb)
 {
   vec<data_reference_p> 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 b639308..25d9a09 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 ed45410..9391031 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -667,7 +667,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;
@@ -726,7 +726,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 1a26fa8..0b2db8d 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<gimple *> conditions;
   vec<gimple *> condition_cases;
   vec<data_reference_p> 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);