diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 20:24:16 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 20:24:16 +0000 |
commit | 5d2603f9a1c78108366305b6e9f3f47a4e4a5a0f (patch) | |
tree | d0cb67f308415d8102e0a5fbb919071f3a5e86cd /gcc/graphite.c | |
parent | 189cea6884a7dc3567fe8cc5d985984fac15e852 (diff) | |
download | gcc-5d2603f9a1c78108366305b6e9f3f47a4e4a5a0f.tar.gz |
Detect commutative reductions in all the scops before rewriting out of SSA all the other scalar dependences.
2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
(rewrite_reductions_out_of_ssa): Same.
(rewrite_commutative_reductions_out_of_ssa): Same.
(build_poly_scop): Do not call these functions.
* graphite-sese-to-poly.h (build_poly_scop): Declared.
(rewrite_reductions_out_of_ssa): Declared.
(rewrite_commutative_reductions_out_of_ssa): Declared.
* graphite.c (graphite_transform_loops): Call on every scop
rewrite_commutative_reductions_out_of_ssa before calling
rewrite_reductions_out_of_ssa and build_scop_bbs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163116 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite.c')
-rw-r--r-- | gcc/graphite.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c index 2933d21571c..bd47cf7039d 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -253,6 +253,7 @@ graphite_transform_loops (void) bool need_cfg_cleanup_p = false; VEC (scop_p, heap) *scops = NULL; htab_t bb_pbb_mapping; + sbitmap reductions; if (!graphite_initialize ()) return; @@ -266,6 +267,19 @@ graphite_transform_loops (void) } bb_pbb_mapping = htab_create (10, bb_pbb_map_hash, eq_bb_pbb_map, free); + reductions = sbitmap_alloc (last_basic_block * 2); + sbitmap_zero (reductions); + + for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++) + rewrite_commutative_reductions_out_of_ssa (SCOP_REGION (scop), reductions); + + for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++) + { + rewrite_reductions_out_of_ssa (scop); + build_scop_bbs (scop, reductions); + } + + sbitmap_free (reductions); for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++) build_poly_scop (scop); |