diff options
author | Aditya Kumar <aditya.k7@samsung.com> | 2015-10-07 19:25:35 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2015-10-07 19:25:35 +0000 |
commit | b0b5710cf676de537bc97b912218dd20d2cc36cd (patch) | |
tree | b6c490b95437aad607c9450aa3273e12269a95b6 /gcc/graphite-isl-ast-to-gimple.c | |
parent | b759335b16ebc8d6640778df53c18fe11ca7083a (diff) | |
download | gcc-b0b5710cf676de537bc97b912218dd20d2cc36cd.zip gcc-b0b5710cf676de537bc97b912218dd20d2cc36cd.tar.gz gcc-b0b5710cf676de537bc97b912218dd20d2cc36cd.tar.bz2 |
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.
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r228581
Diffstat (limited to 'gcc/graphite-isl-ast-to-gimple.c')
-rw-r--r-- | gcc/graphite-isl-ast-to-gimple.c | 4 |
1 files changed, 2 insertions, 2 deletions
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. */ |