tree-ssa-sink.c (nearest_common_dominator_of_uses): Factor out common code.
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 2 May 2005 16:57:53 +0000 (16:57 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 2 May 2005 16:57:53 +0000 (16:57 +0000)
* tree-ssa-sink.c (nearest_common_dominator_of_uses): Factor
out common code.

From-SVN: r99105

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

index 4a3b56e49ef332175c2d984a1ec88111b178374c..641754b9cda62bb0566c33ee777513d2a114b16f 100644 (file)
@@ -5,6 +5,9 @@
        Use VEC instead of VARRAY.
        (equiv_free): New.
 
+       * tree-ssa-sink.c (nearest_common_dominator_of_uses): Factor
+       out common code.
+
 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
 
         * c-common.c (resolve_overloaded_builtin): Forward to target
index 7751c4a8d7e07970370a0ef3b60cf8af9bef9b4f..8041686f1edf1ae58b2fd1e331539c698d82ae89 100644 (file)
@@ -238,31 +238,25 @@ nearest_common_dominator_of_uses (tree stmt)
         {
          tree usestmt = USE_STMT (use_p);
          basic_block useblock;
+
          if (TREE_CODE (usestmt) == PHI_NODE)
            {
              int idx = PHI_ARG_INDEX_FROM_USE (use_p);
 
              useblock = PHI_ARG_EDGE (usestmt, idx)->src;
-             /* Short circuit. Nothing dominates the entry block.  */
-             if (useblock == ENTRY_BLOCK_PTR)
-               {
-                 BITMAP_FREE (blocks);
-                 return NULL;
-               }
-             bitmap_set_bit (blocks, useblock->index);
            }
          else
            {
              useblock = bb_for_stmt (usestmt);
+           }
 
-             /* Short circuit. Nothing dominates the entry block.  */
-             if (useblock == ENTRY_BLOCK_PTR)
-               {
-                 BITMAP_FREE (blocks);
-                 return NULL;
-               }
-             bitmap_set_bit (blocks, useblock->index);
+         /* Short circuit. Nothing dominates the entry block.  */
+         if (useblock == ENTRY_BLOCK_PTR)
+           {
+             BITMAP_FREE (blocks);
+             return NULL;
            }
+         bitmap_set_bit (blocks, useblock->index);
        }
     }
   commondom = BASIC_BLOCK (bitmap_first_set_bit (blocks));