aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2010-04-06 21:00:12 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-04-06 21:00:12 +0000
commit79d03cf81ba8c9c303a24e98e26ca0396355e0bd (patch)
tree238626b7ec25666429bb40b1facbaeea01601d27 /gcc
parenta3b9e73ca325765f7a9fa7b0a90083ce39f6f2dd (diff)
downloadgcc-79d03cf81ba8c9c303a24e98e26ca0396355e0bd.zip
gcc-79d03cf81ba8c9c303a24e98e26ca0396355e0bd.tar.gz
gcc-79d03cf81ba8c9c303a24e98e26ca0396355e0bd.tar.bz2
Add extra checks for places assuming one argument loop close SSA form.
2010-04-01 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that gimple_phi_num_args of the loop close SSA phi node is equal to 1. (detect_commutative_reduction): Same. From-SVN: r158025
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog.graphite18
-rw-r--r--gcc/graphite-sese-to-poly.c13
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 6ce22cb..09c9f9d 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,21 @@
+2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
+
+ Reverted this commit: as at this point the loop closed SSA form
+ is under a canonical form respecting the single argument condition.
+ * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
+ close phi nodes may have more than one argument.
+
+2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
+
+ * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
+ gimple_phi_num_args of the loop close SSA phi node is equal to 1.
+ (detect_commutative_reduction): Same.
+
+2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
+
+ * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
+ close phi nodes may have more than one argument.
+
2010-03-30 Richard Guenther <rguenther@suse.de>
Zdenek Dvorak <ook@ucw.cz>
Sebastian Pop <sebastian.pop@amd.com>
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 17fb5a2..4584fe9 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2183,6 +2183,9 @@ scalar_close_phi_node_p (gimple phi)
|| !is_gimple_reg (gimple_phi_result (phi)))
return false;
+ /* Note that loop close phi nodes should have a single argument
+ because we translated the representation into a canonical form
+ before Graphite: see canonicalize_loop_closed_ssa_form. */
return (gimple_phi_num_args (phi) == 1);
}
@@ -2200,6 +2203,11 @@ rewrite_close_phi_out_of_ssa (gimple_stmt_iterator *psi)
gimple stmt = gimple_build_assign (res, zero_dim_array);
tree arg = gimple_phi_arg_def (phi, 0);
+ /* Note that loop close phi nodes should have a single argument
+ because we translated the representation into a canonical form
+ before Graphite: see canonicalize_loop_closed_ssa_form. */
+ gcc_assert (gimple_phi_num_args (phi) == 1);
+
if (TREE_CODE (arg) == SSA_NAME
&& !SSA_NAME_IS_DEFAULT_DEF (arg))
insert_out_of_ssa_copy (zero_dim_array, arg);
@@ -2665,6 +2673,11 @@ detect_commutative_reduction (gimple stmt, VEC (gimple, heap) **in,
if (TREE_CODE (arg) != SSA_NAME)
return NULL;
+ /* Note that loop close phi nodes should have a single argument
+ because we translated the representation into a canonical form
+ before Graphite: see canonicalize_loop_closed_ssa_form. */
+ gcc_assert (gimple_phi_num_args (stmt) == 1);
+
def = SSA_NAME_DEF_STMT (arg);
loop_phi = detect_commutative_reduction (def, in, out);