diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 20:24:30 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-11 20:24:30 +0000 |
commit | 88a551f165ada66781b7378e78055faed2e9c3fa (patch) | |
tree | 98a0719b68d9049543d31152f1c35e66b84f84f1 /gcc/graphite-sese-to-poly.c | |
parent | 39a34dd8a8a8cd103161362f9a9f7086e557ac28 (diff) | |
download | gcc-88a551f165ada66781b7378e78055faed2e9c3fa.tar.gz |
Also rewrite out of SSA scalar dependences going outside the SCoP region.
2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
* graphite-clast-to-gimple.c (gloog): Remove call to
sese_adjust_liveout_phis.
* graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
(rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
rewrite_phi_out_of_ssa.
* sese.c (get_vdef_before_sese): Removed.
(sese_adjust_vphi): Removed.
(sese_adjust_liveout_phis): Removed.
* sese.h (sese_adjust_liveout_phis): Removed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163118 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-sese-to-poly.c')
-rw-r--r-- | gcc/graphite-sese-to-poly.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 2897cd66de3..8baf379a5a1 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -2326,7 +2326,8 @@ scev_analyzable_p (tree def, sese region) loop_p loop = loop_containing_stmt (stmt); tree scev = scalar_evolution_in_region (region, loop, def); - return !chrec_contains_undetermined (scev); + return !chrec_contains_undetermined (scev) + && TREE_CODE (scev) != SSA_NAME; } /* Rewrite the scalar dependence of DEF used in USE_STMT with a memory @@ -2380,9 +2381,13 @@ rewrite_cross_bb_scalar_deps (sese region, gimple_stmt_iterator *gsi) def_bb = gimple_bb (stmt); FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def) - if (def_bb != gimple_bb (use_stmt) - && gimple_code (use_stmt) != GIMPLE_PHI - && !is_gimple_debug (use_stmt)) + if (gimple_code (use_stmt) == GIMPLE_PHI) + { + gimple_stmt_iterator si = gsi_for_stmt (use_stmt); + rewrite_phi_out_of_ssa (&si); + } + else if (def_bb != gimple_bb (use_stmt) + && !is_gimple_debug (use_stmt)) { if (!zero_dim_array) { |