tree-into-ssa.c (find_idf): Use VEC_quick_push instead of VEC_safe_push.
authorKazu Hirata <kazu@gcc.gnu.org>
Fri, 18 Mar 2005 14:02:26 +0000 (14:02 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 18 Mar 2005 14:02:26 +0000 (14:02 +0000)
* tree-into-ssa.c (find_idf): Use VEC_quick_push instead of
VEC_safe_push.

From-SVN: r96684

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

index bdd94e44e37e74400c619a3ace025a0afd259406..a4a37854763e4b701bd6fda5bf8f073d0723e5f4 100644 (file)
@@ -1,4 +1,9 @@
-2005-03-01  Paolo Bonzini  <bonzini@gnu.org>
+2005-03-18  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-into-ssa.c (find_idf): Use VEC_quick_push instead of
+       VEC_safe_push.
+
+2005-03-18  Paolo Bonzini  <bonzini@gnu.org>
 
        * combine.c (gen_binary): Remove.
        (known_cond, simplify_shift_const, find_split_point,
index 8c58a457dac276a274e782db3501e52b8fec3403..37ad103c67f2b5c9196e34312fda75f41de3fbbd 100644 (file)
@@ -511,7 +511,11 @@ find_idf (bitmap def_blocks, bitmap *dfs)
 
   /* Seed the work list with all the blocks in DEF_BLOCKS.  */
   EXECUTE_IF_SET_IN_BITMAP (def_blocks, 0, bb_index, bi)
-    VEC_safe_push (int, work_stack, bb_index);
+    /* We use VEC_quick_push here for speed.  This is safe because we
+       know that the number of definition blocks is no greater than
+       the number of basic blocks, which is the initial capacity of
+       WORK_STACK.  */
+    VEC_quick_push (int, work_stack, bb_index);
 
   /* Pop a block off the worklist, add every block that appears in
      the original block's DF that we have not already processed to