Patchwork [10/12] Correctly handle SSA_NAME_IS_DEFAULT_DEF in rewrite_close_phi_out_of_ssa.

login
register
mail settings
Submitter Sebastian Pop
Date July 16, 2010, 7:04 a.m.
Message ID <1279263843-9149-11-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/59078/
State New
Headers show

Comments

Sebastian Pop - July 16, 2010, 7:04 a.m.
2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
	handle SSA_NAME_IS_DEFAULT_DEF.
---
 gcc/ChangeLog.graphite      |    5 +++++
 gcc/graphite-sese-to-poly.c |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

Patch

diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index f57ef7d..8230d31 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,10 @@ 
 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
+	handle SSA_NAME_IS_DEFAULT_DEF.
+
+2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* sese.c (rename_uses): Handl unconditionally gimple_debug statements.
 
 	* gcc.dg/graphite/pr42729.c: New.
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 3d02197..3d903d3 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2215,6 +2215,7 @@  rewrite_close_phi_out_of_ssa (gimple_stmt_iterator *psi)
   /* The phi node can be a non close phi node, when its argument is
      invariant, or when it is defined in the same loop as the phi node.  */
   if (is_gimple_min_invariant (arg)
+      || SSA_NAME_IS_DEFAULT_DEF (arg)
       || gimple_bb (SSA_NAME_DEF_STMT (arg))->loop_father == bb->loop_father)
     stmt = gimple_build_assign (res, arg);
   else
@@ -2223,8 +2224,7 @@  rewrite_close_phi_out_of_ssa (gimple_stmt_iterator *psi)
 
       stmt = gimple_build_assign (res, zero_dim_array);
 
-      if (TREE_CODE (arg) == SSA_NAME
-	  && !SSA_NAME_IS_DEFAULT_DEF (arg))
+      if (TREE_CODE (arg) == SSA_NAME)
 	insert_out_of_ssa_copy (zero_dim_array, arg, SSA_NAME_DEF_STMT (arg));
       else
 	insert_out_of_ssa_copy_on_edge (single_pred_edge (bb),