[tuples] [patches] small bug fix

Diego Novillo dnovillo@google.com
Wed Mar 5 16:08:00 GMT 2008


On Wed, Mar 5, 2008 at 10:40, Rafael Espindola <espindola@google.com> wrote:
> This patch fixes a small bug in phinodes.
>
>  OK if tests are OK?
>
>  2008-03-05  Rafael Espindola  <espindola@google.com>
>
>    *  tree-phinodes.c (allocate_phi_node): Skip empty vectors in free_phinodes.

Actually, I have a slight preference for:


Index: tree-phinodes.c
===================================================================
--- tree-phinodes.c     (revision 132865)
+++ tree-phinodes.c     (working copy)
@@ -146,6 +146,8 @@ allocate_phi_node (size_t len)
     {
       free_phinode_count--;
       phi = VEC_pop (gimple, free_phinodes[bucket]);
+      if (VEC_empty (free_phinodes[bucket]))
+       VEC_free (free_phinodes[bucket]);
 #ifdef GATHER_STATISTICS
       phi_nodes_reused++;
 #endif


Does that fix your regression?


Thanks.  Diego.



More information about the Gcc-patches mailing list