From b0b5710cf676de537bc97b912218dd20d2cc36cd Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Wed, 7 Oct 2015 19:25:35 +0000 Subject: 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 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 Sebastian Pop * 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. Co-Authored-By: Sebastian Pop From-SVN: r228581 --- gcc/graphite-isl-ast-to-gimple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/graphite-isl-ast-to-gimple.c') diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index f4e7edf..2f2e2ba 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -940,7 +940,7 @@ int get_max_schedule_dimensions (scop_p scop) poly_bb_p pbb; int schedule_dims = 0; - FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb) + FOR_EACH_VEC_ELT (scop->pbbs, i, pbb) { int pbb_schedule_dims = isl_map_dim (pbb->transformed, isl_dim_out); if (pbb_schedule_dims > schedule_dims) @@ -987,7 +987,7 @@ generate_isl_schedule (scop_p scop) isl_union_map *schedule_isl = isl_union_map_empty (isl_set_get_space (scop->param_context)); - FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb) + FOR_EACH_VEC_ELT (scop->pbbs, i, pbb) { /* Dead code elimination: when the domain of a PBB is empty, don't generate code for the PBB. */ -- cgit v1.1