This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tuples] [patches] small bug fix


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]