+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>
Aditya Kumar <aditya.k7@samsung.com>
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:
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)
{
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);
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;
}
/* 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;
/* 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;
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)
/* 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. */
/* 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;
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);
/* 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));
/* 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;
{
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;
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)
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;
{
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;
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))
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);
{
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 ();
#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);
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;
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;
calculate_dominance_info (CDI_POST_DOMINATORS);
}
-typedef struct gimple_bb
+typedef struct gimple_poly_bb
{
basic_block bb;
struct poly_bb *pbb;
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
/* 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;
}
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);
/* 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);