aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-scop-detection.c
diff options
context:
space:
mode:
authorAditya Kumar <aditya.k7@samsung.com>2015-10-21 18:53:17 +0000
committerSebastian Pop <spop@gcc.gnu.org>2015-10-21 18:53:17 +0000
commitd37fc3aa4aae5adf437a4d0b6370dc24759e5689 (patch)
tree2a6ac8f76533dbd71d00df9defb594532599932a /gcc/graphite-scop-detection.c
parent3d27a3235ad17658334b6ffc8abb0bb0dbd49f47 (diff)
downloadgcc-d37fc3aa4aae5adf437a4d0b6370dc24759e5689.zip
gcc-d37fc3aa4aae5adf437a4d0b6370dc24759e5689.tar.gz
gcc-d37fc3aa4aae5adf437a4d0b6370dc24759e5689.tar.bz2
Refactoring sese.h and graphite-poly.h
Rename scop->region to scop->scop_info Removed conversion constructors for sese_l and dr_info. Removed macros. No functional changed intended. Passes regtest and bootstrap. gcc/ChangeLog: 2015-19-10 Aditya Kumar <aditya.k7@samsung.com> * graphite-poly.h (struct dr_info): Removed conversion constructor. (struct scop): Renamed scop::region to scop::scop_info (scop_set_region): Same. (SCOP_REGION): Removed (SCOP_CONTEXT): Removed. (POLY_SCOP_P): Removed. * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_user): Rename scop->region to scop->scop_info. (add_parameters_to_ivs_params): Same. (graphite_regenerate_ast_isl): Same. * graphite-poly.c (new_scop): Same. (free_scop): Same. (print_scop_params): Same. * graphite-scop-detection.c (scop_detection::remove_subscops): Same. (scop_detection::remove_intersecting_scops): Use pointer to sese_l. (dot_all_scops_1): Rename scop->region to scop->scop_info. (scop_detection::nb_pbbs_in_loops): Same. (find_scop_parameters): Same. (try_generate_gimple_bb): Same. (gather_bbs::before_dom_children): Same. (gather_bbs::after_dom_children): Same. (build_scops): Same. * graphite-sese-to-poly.c (build_scop_scattering): Same. (extract_affine_chrec): Same. (extract_affine): Same. (set_scop_parameter_dim): Same. (build_loop_iteration_domains): Same. (create_pw_aff_from_tree): Same. (add_param_constraints): Same. (build_scop_iteration_domain): Same. (build_scop_drs): Same. (analyze_drs_in_stmts): Same. (insert_out_of_ssa_copy_on_edge): Same. (rewrite_close_phi_out_of_ssa):Same. (rewrite_reductions_out_of_ssa):Same. (handle_scalar_deps_crossing_scop_limits):Same. (rewrite_cross_bb_scalar_deps):Same. (rewrite_cross_bb_scalar_deps_out_of_ssa):Same. (build_poly_scop):Same. (build_alias_set): Use pointer to dr_info. * graphite.c (print_graphite_scop_statistics): (graphite_transform_loops): * sese.h (struct sese_l): Remove conversion constructor. From-SVN: r229135
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r--gcc/graphite-scop-detection.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 6c0987d..3ce4ff1 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -491,7 +491,7 @@ private:
vec<sese_l> scops;
};
-sese_l scop_detection::invalid_sese (0);
+sese_l scop_detection::invalid_sese (NULL, NULL);
/* Return an sese_l around the LOOP. */
@@ -888,13 +888,13 @@ void
scop_detection::remove_subscops (sese_l s1)
{
int j;
- sese_l s2 (0);
+ sese_l *s2;
FOR_EACH_VEC_ELT_REVERSE (scops, j, s2)
{
- if (subsumes (s1, s2))
+ if (subsumes (s1, *s2))
{
DEBUG_PRINT (dp << "\nRemoving sub-SCoP";
- print_sese (dump_file, s2));
+ print_sese (dump_file, *s2));
scops.unordered_remove (j);
}
}
@@ -923,13 +923,13 @@ void
scop_detection::remove_intersecting_scops (sese_l s1)
{
int j;
- sese_l s2 (0);
+ sese_l *s2;
FOR_EACH_VEC_ELT_REVERSE (scops, j, s2)
{
- if (intersects (s1, s2))
+ if (intersects (s1, *s2))
{
DEBUG_PRINT (dp << "\nRemoving intersecting SCoP";
- print_sese (dump_file, s2); dp << "Intersects with:";
+ print_sese (dump_file, *s2); dp << "Intersects with:";
print_sese (dump_file, s1));
scops.unordered_remove (j);
}
@@ -1273,7 +1273,7 @@ dot_all_scops_1 (FILE *file, vec<scop_p> scops)
/* Select color for SCoP. */
FOR_EACH_VEC_ELT (scops, i, scop)
{
- sese_l region = scop->region->region;
+ sese_l region = scop->scop_info->region;
if (bb_in_sese_p (bb, region) || (region.exit->dest == bb)
|| (region.entry->dest == bb))
{
@@ -1482,7 +1482,7 @@ scop_detection::nb_pbbs_in_loops (scop_p scop)
int res = 0;
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
- if (loop_in_sese_p (gbb_loop (PBB_BLACK_BOX (pbb)), scop->region->region))
+ if (loop_in_sese_p (gbb_loop (PBB_BLACK_BOX (pbb)), scop->scop_info->region))
res++;
return res;
@@ -1623,7 +1623,7 @@ static void
find_scop_parameters (scop_p scop)
{
unsigned i;
- sese_info_p region = scop->region;
+ sese_info_p region = scop->scop_info;
struct loop *loop;
/* Find the parameters used in the loop bounds. */
@@ -1655,7 +1655,7 @@ try_generate_gimple_bb (scop_p scop, basic_block bb)
{
vec<data_reference_p> drs;
drs.create (5);
- sese_l region = scop->region->region;
+ sese_l region = scop->scop_info->region;
loop_p nest = outermost_loop_in_sese (region, bb);
loop_p loop = bb->loop_father;
@@ -1700,7 +1700,7 @@ gather_bbs::gather_bbs (cdi_direction direction, scop_p scop)
void
gather_bbs::before_dom_children (basic_block bb)
{
- if (!bb_in_sese_p (bb, scop->region->region))
+ if (!bb_in_sese_p (bb, scop->scop_info->region))
return;
gcond *stmt = single_pred_cond_non_loop_exit (bb);
@@ -1717,7 +1717,7 @@ gather_bbs::before_dom_children (basic_block bb)
cases.safe_push (NULL);
}
- scop->region->bbs.safe_push (bb);
+ scop->scop_info->bbs.safe_push (bb);
gimple_poly_bb_p gbb = try_generate_gimple_bb (scop, bb);
GBB_CONDITIONS (gbb) = conditions.copy ();
@@ -1733,7 +1733,7 @@ gather_bbs::before_dom_children (basic_block bb)
void
gather_bbs::after_dom_children (basic_block bb)
{
- if (!bb_in_sese_p (bb, scop->region->region))
+ if (!bb_in_sese_p (bb, scop->scop_info->region))
return;
if (single_pred_cond_non_loop_exit (bb))
@@ -1760,10 +1760,10 @@ build_scops (vec<scop_p> *scops)
/* Now create scops from the lightweight SESEs. */
vec<sese_l> scops_l = sb.get_scops ();
int i;
- sese_l s (0);
+ sese_l *s;
FOR_EACH_VEC_ELT (scops_l, i, s)
{
- scop_p scop = new_scop (s.entry, s.exit);
+ scop_p scop = new_scop (s->entry, s->exit);
/* Record all basic blocks and their conditions in REGION. */
gather_bbs (CDI_DOMINATORS, scop).walk (cfun->cfg->x_entry_block_ptr);
@@ -1777,7 +1777,7 @@ build_scops (vec<scop_p> *scops)
continue;
}
- build_sese_loop_nests (scop->region);
+ build_sese_loop_nests (scop->scop_info);
find_scop_parameters (scop);
graphite_dim_t max_dim = PARAM_VALUE (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS);