OSDN Git Service

PR c++/41468
[pf3gnuchains/gcc-fork.git] / gcc / graphite-sese-to-poly.c
index d358137..5c004f4 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion of SESE regions to Polyhedra.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
    Contributed by Sebastian Pop <sebastian.pop@amd.com>.
 
 This file is part of GCC.
@@ -280,7 +280,6 @@ new_gimple_bb (basic_block bb, VEC (data_reference_p, heap) *drs)
   GBB_DATA_REFS (gbb) = drs;
   GBB_CONDITIONS (gbb) = NULL;
   GBB_CONDITION_CASES (gbb) = NULL;
-  GBB_CLOOG_IV_TYPES (gbb) = NULL;
 
   return gbb;
 }
@@ -308,9 +307,6 @@ free_data_refs_aux (VEC (data_reference_p, heap) *datarefs)
 static void
 free_gimple_bb (struct gimple_bb *gbb)
 {
-  if (GBB_CLOOG_IV_TYPES (gbb))
-    htab_delete (GBB_CLOOG_IV_TYPES (gbb));
-
   free_data_refs_aux (GBB_DATA_REFS (gbb));
   free_data_refs (GBB_DATA_REFS (gbb));
 
@@ -2183,6 +2179,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 +2199,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);
@@ -2402,8 +2406,7 @@ rewrite_reductions_out_of_ssa (scop_p scop)
 
   update_ssa (TODO_update_ssa);
 #ifdef ENABLE_CHECKING
-  verify_ssa (false);
-  verify_loop_closed_ssa ();
+  verify_loop_closed_ssa (true);
 #endif
 
   FOR_EACH_BB (bb)
@@ -2413,8 +2416,7 @@ rewrite_reductions_out_of_ssa (scop_p scop)
 
   update_ssa (TODO_update_ssa);
 #ifdef ENABLE_CHECKING
-  verify_ssa (false);
-  verify_loop_closed_ssa ();
+  verify_loop_closed_ssa (true);
 #endif
 }
 
@@ -2667,6 +2669,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);
 
@@ -2787,7 +2794,7 @@ translate_scalar_reduction_to_array (VEC (gimple, heap) *in,
 {
   unsigned int i;
   gimple loop_phi;
-  tree red;
+  tree red = NULL_TREE;
 
   for (i = 0; VEC_iterate (gimple, in, i, loop_phi); i++)
     {
@@ -2868,8 +2875,7 @@ rewrite_commutative_reductions_out_of_ssa (sese region, sbitmap reductions)
   gsi_commit_edge_inserts ();
   update_ssa (TODO_update_ssa);
 #ifdef ENABLE_CHECKING
-  verify_ssa (false);
-  verify_loop_closed_ssa ();
+  verify_loop_closed_ssa (true);
 #endif
 }