tree-into-ssa.c (update_ssa): Ensure that the operand cache is up-to-date.
authorKazu Hirata <kazu@cs.umass.edu>
Fri, 27 May 2005 11:55:36 +0000 (11:55 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 27 May 2005 11:55:36 +0000 (11:55 +0000)
* tree-into-ssa.c (update_ssa): Ensure that the operand cache
is up-to-date.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Call
update_stmt_if_modified before calling update_ssa.

From-SVN: r100250

gcc/ChangeLog
gcc/tree-into-ssa.c
gcc/tree-ssa-dom.c

index ea4ee9668e0d8e8a9acbdfa488838d6cec2e93a0..4c67cabe312a4194947f7013643902f16f1096e2 100644 (file)
@@ -1,3 +1,10 @@
+2005-05-27  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-into-ssa.c (update_ssa): Ensure that the operand cache
+       is up-to-date.
+       * tree-ssa-dom.c (tree_ssa_dominator_optimize): Call
+       update_stmt_if_modified before calling update_ssa.
+
 2005-05-27  Ralf Corsepius  <ralf.corsepius@rtems.org>
 
        * config/rs6000/t-rtems: Remove roe multilib variant.
index 03561bacf3c07c4cca5fe70103c3c4587e111fcf..e7ff242ce27f9deaedc120a5cb44c9be78cd9620 100644 (file)
@@ -2679,6 +2679,10 @@ update_ssa (unsigned update_flags)
       for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
        {
          tree stmt = bsi_stmt (si);
+         /* We are going to use the operand cache API, such as
+            SET_USE, SET_DEF, and FOR_EACH_IMM_USE_FAST.  The operand
+            cache for each statement should be up-to-date.  */
+         gcc_assert (!stmt_modified_p (stmt));
          REWRITE_THIS_STMT (stmt) = 0;
          REGISTER_DEFS_IN_THIS_STMT (stmt) = 0;
        }
index 278d27a9c7a88412623fdd15e5f1e461ed6cdee8..cb4abcf35d32b3d52caf043206b733a18f2d7747 100644 (file)
@@ -423,15 +423,6 @@ tree_ssa_dominator_optimize (void)
       /* Recursively walk the dominator tree optimizing statements.  */
       walk_dominator_tree (&walk_data, ENTRY_BLOCK_PTR);
 
-      /* If we exposed any new variables, go ahead and put them into
-        SSA form now, before we handle jump threading.  This simplifies
-        interactions between rewriting of _DECL nodes into SSA form
-        and rewriting SSA_NAME nodes into SSA form after block
-        duplication and CFG manipulation.  */
-      update_ssa (TODO_update_ssa);
-
-      free_all_edge_infos ();
-
       {
        block_stmt_iterator bsi;
        basic_block bb;
@@ -444,6 +435,15 @@ tree_ssa_dominator_optimize (void)
          }
       }
 
+      /* If we exposed any new variables, go ahead and put them into
+        SSA form now, before we handle jump threading.  This simplifies
+        interactions between rewriting of _DECL nodes into SSA form
+        and rewriting SSA_NAME nodes into SSA form after block
+        duplication and CFG manipulation.  */
+      update_ssa (TODO_update_ssa);
+
+      free_all_edge_infos ();
+
       /* Thread jumps, creating duplicate blocks as needed.  */
       cfg_altered |= thread_through_all_blocks ();