]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/34683 (SSA rewriting in the loop unroller causes quadratic...
authorRichard Guenther <rguenther@suse.de>
Mon, 7 Jan 2008 14:49:36 +0000 (14:49 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 7 Jan 2008 14:49:36 +0000 (14:49 +0000)
2008-01-07  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/34683
* tree-ssa-sccvn.c (vuses_to_vec): Pre-allocate the vector of
VOPs of the needed size to save memory.  Use VEC_quick_push
to save compile-time.
(vdefs_to_vec): Likewise.

From-SVN: r131375

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

index 446b03b33ed3a80ec9769e70e8ea1b055d5f88ae..4ec6bff6fa5d7533092b1ca0a5272196490cf08c 100644 (file)
@@ -1,4 +1,13 @@
+2008-01-07  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/34683
+       * tree-ssa-sccvn.c (vuses_to_vec): Pre-allocate the vector of
+       VOPs of the needed size to save memory.  Use VEC_quick_push
+       to save compile-time.
+       (vdefs_to_vec): Likewise.
+
 2008-01-07  Sa Liu  <saliu@de.ibm.com>
+
        * config/spu/spu.md (divdf3): Genetate inline code for double division. 
        The implementation doesn't handle INF or NAN, therefore it only applies 
        when -ffinite-math-only is given.
index a14c2a749cf0bea147f7fc0687eca24c6821ea56..035c81120b8ae77ecec9e5a2f3da92d3b8c1b837 100644 (file)
@@ -389,8 +389,10 @@ vuses_to_vec (tree stmt, VEC (tree, gc) **result)
   if (!stmt)
     return;
 
+  *result = VEC_alloc (tree, gc, num_ssa_operands (stmt, SSA_OP_VIRTUAL_USES));
+
   FOR_EACH_SSA_TREE_OPERAND (vuse, stmt, iter, SSA_OP_VIRTUAL_USES)
-    VEC_safe_push (tree, gc, *result, vuse);
+    VEC_quick_push (tree, *result, vuse);
 
   if (VEC_length (tree, *result) > 1)
     sort_vuses (*result);
@@ -421,8 +423,10 @@ vdefs_to_vec (tree stmt, VEC (tree, gc) **result)
   if (!stmt)
     return;
 
+  *result = VEC_alloc (tree, gc, num_ssa_operands (stmt, SSA_OP_VIRTUAL_DEFS));
+
   FOR_EACH_SSA_TREE_OPERAND (vdef, stmt, iter, SSA_OP_VIRTUAL_DEFS)
-    VEC_safe_push (tree, gc, *result, vdef);
+    VEC_quick_push (tree, *result, vdef);
 
   if (VEC_length (tree, *result) > 1)
     sort_vuses (*result);