summaryrefslogtreecommitdiff
path: root/gcc/graphite-poly.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-07 19:25:35 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-07 19:25:35 +0000
commit0e526381351bdc1a865fe56435b07ec1bb87c38c (patch)
treeb6c490b95437aad607c9450aa3273e12269a95b6 /gcc/graphite-poly.c
parent27093f49c4ed1ae8c696601f8260550f0d55ca1c (diff)
downloadgcc-0e526381351bdc1a865fe56435b07ec1bb87c38c.tar.gz
gather bbs and conditions in a single walk through dominators
Clean up the function to build scop's basic blocks and the function that gathers the conditions under which a basic block is executed. We remove one traversal of the dominator tree. This refactoring was triggered by the need of a vec<bb> of all the basic blocks in a region. We will use that vector in a patch that removes the out-of-ssa translation of scalar dependences: we will iterate through the basic blocks of a region to record scalar dependences crossing bbs or going out of the region. The patch passes bootstrap and regtest on x86_64-linux. 2015-10-06 Aditya Kumar <aditya.k7@samsung.com> Sebastian Pop <s.pop@samsung.com> * graphite-dependences.c (scop_get_dependences): Do not use SCOP_BBS. * graphite-isl-ast-to-gimple.c (get_max_schedule_dimensions): Same. (generate_isl_schedule): Same. * graphite-optimize-isl.c (scop_get_domains): Same. (apply_schedule_map_to_scop): Same. * graphite-poly.c (print_iteration_domains): Same. (remove_gbbs_in_scop): Same. (new_scop): Same. (free_scop): Same. (print_scop): Same. * graphite-poly.h (struct scop): Rename bbs to pbbs. (SCOP_BBS): Remove. * graphite-scop-detection.c (compare_bb_depths): Remove. (graphite_sort_dominated_info): Remove. (try_generate_gimple_bb): Move out of scop_detection. (all_non_dominated_preds_marked_p): Remove. (build_scop_bbs_1): Remove. (build_scop_bbs): Remove. (nb_pbbs_in_loops): Do not use SCOP_BBS. (find_scop_parameters): Same. (sese_dom_walker): Rename gather_bbs. (before_dom_children): Call try_generate_gimple_bb and collect gbb and pbb. (build_scops): Call gather_bbs. * graphite-sese-to-poly.c (build_scop_scattering): Do not use SCOP_BBS. (add_conditions_to_constraints): Same. (build_scop_iteration_domain): Same. (build_scop_drs): Same. (new_pbb_from_pbb): Same. * sese.c (new_sese_info): Create bbs. * sese.h (struct sese_info_t): Add bbs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-poly.c')
-rw-r--r--gcc/graphite-poly.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 39e7aa4e581..84ecee09c37 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -87,7 +87,7 @@ print_iteration_domains (FILE *file, scop_p scop, int verbosity)
int i;
poly_bb_p pbb;
- FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb)
+ FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
print_iteration_domain (file, pbb, verbosity);
}
@@ -294,7 +294,7 @@ remove_gbbs_in_scop (scop_p scop)
int i;
poly_bb_p pbb;
- FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb)
+ FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
free_gimple_poly_bb (PBB_BLACK_BOX (pbb));
}
@@ -320,7 +320,7 @@ new_scop (edge entry, edge exit)
scop->must_waw_no_source = NULL;
scop->may_waw_no_source = NULL;
scop_set_region (scop, region);
- SCOP_BBS (scop).create (3);
+ scop->pbbs.create (3);
POLY_SCOP_P (scop) = false;
scop->drs.create (3);
@@ -338,10 +338,10 @@ free_scop (scop_p scop)
remove_gbbs_in_scop (scop);
free_sese_info (SCOP_REGION (scop));
- FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb)
+ FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
free_poly_bb (pbb);
- SCOP_BBS (scop).release ();
+ scop->pbbs.release ();
isl_set_free (scop->param_context);
isl_union_map_free (scop->must_raw);
@@ -625,9 +625,9 @@ print_scop (FILE *file, scop_p scop, int verbosity)
if (verbosity > 0)
fprintf (file, "# Number of statements\n");
- fprintf (file, "%d\n", SCOP_BBS (scop).length ());
+ fprintf (file, "%d\n", scop->pbbs.length ());
- FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb)
+ FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
print_pbb (file, pbb, verbosity);
fprintf (file, "#)\n");