tree-ssa-forwprop.c (substitute_single_use_vars): Remove duplicate code.
authorKazu Hirata <kazu@cs.umass.edu>
Fri, 26 Nov 2004 01:25:14 +0000 (01:25 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 26 Nov 2004 01:25:14 +0000 (01:25 +0000)
* tree-ssa-forwprop.c (substitute_single_use_vars): Remove
duplicate code.

From-SVN: r91316

gcc/ChangeLog
gcc/tree-ssa-forwprop.c

index 1eaf99a2b9521a438407876fb380ff9bab898547..de1aaa9677d04326be37eba2101de8a9a42e778b 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-ssa-forwprop.c (substitute_single_use_vars): Remove
+       duplicate code.
+
 2004-11-25  Andrew Pinski <pinskia@physics.uc.edu>
 
        * bitmap.h (BITMAP_XMALLOC): Use BITMAP_ALLOC and not
index cbf1fdec578407cc7308f0dc96cdb47cb6f8cb1e..b13894e42fc1c1f433749a260b936077507b6d06 100644 (file)
@@ -329,7 +329,6 @@ substitute_single_use_vars (varray_type *cond_worklist,
       tree def = SSA_NAME_DEF_STMT (test_var);
       dataflow_t df;
       int j, num_uses, propagated_uses;
-      block_stmt_iterator bsi;
 
       VARRAY_POP (vars_worklist);
 
@@ -466,16 +465,10 @@ substitute_single_use_vars (varray_type *cond_worklist,
         Unfortunately, we have to find the defining statement in
         whatever block it might be in.  */
       if (num_uses && num_uses == propagated_uses)
-       for (bsi = bsi_start (bb_for_stmt (def));
-            !bsi_end_p (bsi);
-            bsi_next (&bsi))
-         {
-           if (def == bsi_stmt (bsi))
-             {
-               bsi_remove (&bsi);
-               break;
-             }
-         }
+       {
+         block_stmt_iterator bsi = bsi_for_stmt (def);
+         bsi_remove (&bsi);
+       }
     }
 }