Commit 65ef70d6 by Aditya Kumar Committed by Sebastian Pop

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  <hiraditya@msn.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.

From-SVN: r228358
parent 6652875f
2015-10-01 Aditya Kumar <aditya.k7@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.
2015-10-01 Sebastian Pop <s.pop@samsung.com> 2015-10-01 Sebastian Pop <s.pop@samsung.com>
Aditya Kumar <aditya.k7@samsung.com> Aditya Kumar <aditya.k7@samsung.com>
...@@ -259,7 +259,7 @@ class translate_isl_ast_to_gimple ...@@ -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 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 chrec, we could consider using a map<int, tree> that maps loop ids to the
corresponding tree expressions. */ 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, __isl_keep isl_ast_expr *user_expr, ivs_params &ip,
sese region); sese region);
private: private:
...@@ -739,7 +739,7 @@ translate_isl_ast_node_for (loop_p context_loop, __isl_keep isl_ast_node *node, ...@@ -739,7 +739,7 @@ translate_isl_ast_node_for (loop_p context_loop, __isl_keep isl_ast_node *node,
void void
translate_isl_ast_to_gimple:: 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, __isl_keep isl_ast_expr *user_expr, ivs_params &ip,
sese region) sese region)
{ {
...@@ -775,7 +775,7 @@ translate_isl_ast_node_user (__isl_keep isl_ast_node *node, ...@@ -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); isl_id *name_id = isl_ast_expr_get_id (name_expr);
poly_bb_p pbb = (poly_bb_p) isl_id_get_user (name_id); poly_bb_p pbb = (poly_bb_p) isl_id_get_user (name_id);
gcc_assert (pbb); gcc_assert (pbb);
gimple_bb_p gbb = PBB_BLACK_BOX (pbb); gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb);
vec<tree> iv_map; vec<tree> iv_map;
isl_ast_expr_free (name_expr); isl_ast_expr_free (name_expr);
isl_id_free (name_id); isl_id_free (name_id);
......
...@@ -180,7 +180,7 @@ new_poly_bb (scop_p scop, void *black_box) ...@@ -180,7 +180,7 @@ new_poly_bb (scop_p scop, void *black_box)
pbb_set_black_box (pbb, black_box); pbb_set_black_box (pbb, black_box);
PBB_DRS (pbb).create (3); PBB_DRS (pbb).create (3);
PBB_IS_REDUCTION (pbb) = false; PBB_IS_REDUCTION (pbb) = false;
GBB_PBB ((gimple_bb_p) black_box) = pbb; GBB_PBB ((gimple_poly_bb_p) black_box) = pbb;
return pbb; return pbb;
} }
...@@ -324,7 +324,7 @@ print_pbb_domain (FILE *file, poly_bb_p pbb, int verbosity ATTRIBUTE_UNUSED) ...@@ -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. */ /* Dump the cases of a graphite basic block GBB on FILE. */
static void static void
dump_gbb_cases (FILE *file, gimple_bb_p gbb) dump_gbb_cases (FILE *file, gimple_poly_bb_p gbb)
{ {
int i; int i;
gimple *stmt; gimple *stmt;
...@@ -351,7 +351,7 @@ dump_gbb_cases (FILE *file, gimple_bb_p gbb) ...@@ -351,7 +351,7 @@ dump_gbb_cases (FILE *file, gimple_bb_p gbb)
/* Dump conditions of a graphite basic block GBB on FILE. */ /* Dump conditions of a graphite basic block GBB on FILE. */
static void static void
dump_gbb_conditions (FILE *file, gimple_bb_p gbb) dump_gbb_conditions (FILE *file, gimple_poly_bb_p gbb)
{ {
int i; int i;
gimple *stmt; gimple *stmt;
......
...@@ -277,7 +277,7 @@ struct poly_bb ...@@ -277,7 +277,7 @@ struct poly_bb
bool is_reduction; 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_SCOP(PBB) (PBB->scop)
#define PBB_DRS(PBB) (PBB->drs) #define PBB_DRS(PBB) (PBB->drs)
#define PBB_IS_REDUCTION(PBB) (PBB->is_reduction) #define PBB_IS_REDUCTION(PBB) (PBB->is_reduction)
...@@ -319,10 +319,10 @@ extern void debug_gmp_value (mpz_t); ...@@ -319,10 +319,10 @@ extern void debug_gmp_value (mpz_t);
/* Returns a gimple_bb from BB. */ /* Returns a gimple_bb from BB. */
static inline gimple_bb_p static inline gimple_poly_bb_p
gbb_from_bb (basic_block bb) 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. */ /* The poly_bb of the BB. */
......
...@@ -198,12 +198,12 @@ reduction_phi_p (sese region, gphi_iterator *psi) ...@@ -198,12 +198,12 @@ reduction_phi_p (sese region, gphi_iterator *psi)
/* Store the GRAPHITE representation of BB. */ /* 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) 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; bb->aux = gbb;
GBB_BB (gbb) = bb; GBB_BB (gbb) = bb;
GBB_DATA_REFS (gbb) = drs; GBB_DATA_REFS (gbb) = drs;
...@@ -217,12 +217,12 @@ static void ...@@ -217,12 +217,12 @@ static void
free_data_refs_aux (vec<data_reference_p> datarefs) free_data_refs_aux (vec<data_reference_p> datarefs)
{ {
unsigned int i; unsigned int i;
struct data_reference *dr; data_reference_p dr;
FOR_EACH_VEC_ELT (datarefs, i, dr) FOR_EACH_VEC_ELT (datarefs, i, dr)
if (dr->aux) 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); free (bap->alias_set);
...@@ -233,7 +233,7 @@ free_data_refs_aux (vec<data_reference_p> datarefs) ...@@ -233,7 +233,7 @@ free_data_refs_aux (vec<data_reference_p> datarefs)
/* Frees GBB. */ /* Frees GBB. */
static void 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_aux (GBB_DATA_REFS (gbb));
free_data_refs (GBB_DATA_REFS (gbb)); free_data_refs (GBB_DATA_REFS (gbb));
...@@ -277,7 +277,7 @@ free_scops (vec<scop_p> scops) ...@@ -277,7 +277,7 @@ free_scops (vec<scop_p> scops)
/* Generates a polyhedral black box only if the bb contains interesting /* Generates a polyhedral black box only if the bb contains interesting
information. */ information. */
static gimple_bb_p static gimple_poly_bb_p
try_generate_gimple_bb (scop_p scop, basic_block bb) try_generate_gimple_bb (scop_p scop, basic_block bb)
{ {
vec<data_reference_p> drs; vec<data_reference_p> drs;
...@@ -526,7 +526,7 @@ build_scop_scattering (scop_p scop) ...@@ -526,7 +526,7 @@ build_scop_scattering (scop_p scop)
{ {
int i; int i;
poly_bb_p pbb; 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_space *dc = isl_set_get_space (scop->context);
isl_aff *static_sched; isl_aff *static_sched;
...@@ -541,7 +541,7 @@ build_scop_scattering (scop_p scop) ...@@ -541,7 +541,7 @@ build_scop_scattering (scop_p scop)
FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb) 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; int prefix;
if (previous_gbb) if (previous_gbb)
...@@ -876,7 +876,7 @@ scan_tree_for_params (sese s, tree e) ...@@ -876,7 +876,7 @@ scan_tree_for_params (sese s, tree e)
access functions, conditions and loop bounds. */ access functions, conditions and loop bounds. */
static void 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; int i;
unsigned j; unsigned j;
...@@ -1133,7 +1133,7 @@ add_conditions_to_domain (poly_bb_p pbb) ...@@ -1133,7 +1133,7 @@ add_conditions_to_domain (poly_bb_p pbb)
{ {
unsigned int i; unsigned int i;
gimple *stmt; 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 ()) if (GBB_CONDITIONS (gbb).is_empty ())
return; return;
...@@ -1229,7 +1229,7 @@ sese_dom_walker::sese_dom_walker (cdi_direction direction, sese region) ...@@ -1229,7 +1229,7 @@ sese_dom_walker::sese_dom_walker (cdi_direction direction, sese region)
void void
sese_dom_walker::before_dom_children (basic_block bb) sese_dom_walker::before_dom_children (basic_block bb)
{ {
gimple_bb_p gbb; gimple_poly_bb_p gbb;
gcond *stmt; gcond *stmt;
if (!bb_in_sese_p (bb, m_region)) if (!bb_in_sese_p (bb, m_region))
...@@ -1900,7 +1900,7 @@ static void ...@@ -1900,7 +1900,7 @@ static void
analyze_drs_in_stmts (scop_p scop, basic_block bb, vec<gimple *> stmts) analyze_drs_in_stmts (scop_p scop, basic_block bb, vec<gimple *> stmts)
{ {
loop_p nest; loop_p nest;
gimple_bb_p gbb; gimple_poly_bb_p gbb;
gimple *stmt; gimple *stmt;
int i; int i;
sese region = SCOP_REGION (scop); sese region = SCOP_REGION (scop);
...@@ -1982,8 +1982,8 @@ new_pbb_from_pbb (scop_p scop, poly_bb_p pbb, basic_block bb) ...@@ -1982,8 +1982,8 @@ new_pbb_from_pbb (scop_p scop, poly_bb_p pbb, basic_block bb)
{ {
vec<data_reference_p> drs; vec<data_reference_p> drs;
drs.create (3); drs.create (3);
gimple_bb_p gbb = PBB_BLACK_BOX (pbb); gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb);
gimple_bb_p gbb1 = new_gimple_bb (bb, drs); gimple_poly_bb_p gbb1 = new_gimple_bb (bb, drs);
poly_bb_p pbb1 = new_poly_bb (scop, gbb1); poly_bb_p pbb1 = new_poly_bb (scop, gbb1);
int index, n = SCOP_BBS (scop).length (); int index, n = SCOP_BBS (scop).length ();
......
...@@ -21,11 +21,11 @@ along with GCC; see the file COPYING3. If not see ...@@ -21,11 +21,11 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_GRAPHITE_SESE_TO_POLY_H #ifndef GCC_GRAPHITE_SESE_TO_POLY_H
#define 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 base_obj_set;
int *alias_set; int *alias_set;
}; } *base_alias_pair_p;
void build_poly_scop (scop_p); void build_poly_scop (scop_p);
......
...@@ -693,7 +693,7 @@ if_region_set_false_region (ifsese if_region, sese region) ...@@ -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)); memcpy (loop_exit, *((struct loop_exit **) slot), sizeof (struct loop_exit));
current_loops->exits->clear_slot (slot); 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, slot = current_loops->exits->find_slot_with_hash (false_edge, hash,
INSERT); INSERT);
loop_exit->e = false_edge; loop_exit->e = false_edge;
...@@ -752,7 +752,8 @@ move_sese_in_condition (sese region) ...@@ -752,7 +752,8 @@ move_sese_in_condition (sese region)
ifsese if_region; ifsese if_region;
SESE_ENTRY (region) = single_succ_edge (pred_block); 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); if_region_set_false_region (if_region, region);
return if_region; return if_region;
......
...@@ -263,7 +263,7 @@ recompute_all_dominators (void) ...@@ -263,7 +263,7 @@ recompute_all_dominators (void)
calculate_dominance_info (CDI_POST_DOMINATORS); calculate_dominance_info (CDI_POST_DOMINATORS);
} }
typedef struct gimple_bb typedef struct gimple_poly_bb
{ {
basic_block bb; basic_block bb;
struct poly_bb *pbb; struct poly_bb *pbb;
...@@ -291,7 +291,7 @@ typedef struct gimple_bb ...@@ -291,7 +291,7 @@ typedef struct gimple_bb
vec<gimple *> conditions; vec<gimple *> conditions;
vec<gimple *> condition_cases; vec<gimple *> condition_cases;
vec<data_reference_p> data_refs; vec<data_reference_p> data_refs;
} *gimple_bb_p; } *gimple_poly_bb_p;
#define GBB_BB(GBB) (GBB)->bb #define GBB_BB(GBB) (GBB)->bb
#define GBB_PBB(GBB) (GBB)->pbb #define GBB_PBB(GBB) (GBB)->pbb
...@@ -302,7 +302,7 @@ typedef struct gimple_bb ...@@ -302,7 +302,7 @@ typedef struct gimple_bb
/* Return the innermost loop that contains the basic block GBB. */ /* Return the innermost loop that contains the basic block GBB. */
static inline struct loop * static inline struct loop *
gbb_loop (struct gimple_bb *gbb) gbb_loop (gimple_poly_bb_p gbb)
{ {
return GBB_BB (gbb)->loop_father; return GBB_BB (gbb)->loop_father;
} }
...@@ -311,7 +311,7 @@ gbb_loop (struct gimple_bb *gbb) ...@@ -311,7 +311,7 @@ gbb_loop (struct gimple_bb *gbb)
If there is no corresponding gimple loop, we return NULL. */ If there is no corresponding gimple loop, we return NULL. */
static inline loop_p 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); loop_p loop = gbb_loop (gbb);
int depth = sese_loop_depth (region, loop); int depth = sese_loop_depth (region, loop);
...@@ -327,7 +327,7 @@ gbb_loop_at_index (gimple_bb_p gbb, sese region, int index) ...@@ -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. */ /* The number of common loops in REGION for GBB1 and GBB2. */
static inline int 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 l1 = gbb_loop (gbb1);
loop_p l2 = gbb_loop (gbb2); loop_p l2 = gbb_loop (gbb2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment