This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] tree-phinodes.c: Speed up remove_phi_arg_num.
- From: Jeffrey A Law <law at redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 01 Nov 2004 14:57:09 -0700
- Subject: Re: [patch] tree-phinodes.c: Speed up remove_phi_arg_num.
- Organization: Red Hat, Inc
- References: <20041029.223225.48801468.kazu@cs.umass.edu>
- Reply-to: law at redhat dot com
On Fri, 2004-10-29 at 22:32 -0400, Kazu Hirata wrote:
> Hi,
>
> Attached is a patch to speed up remove_phi_arg_num by removing
> unnecessary zeroing.
>
> Now that the garbage collector no longer scans the array of PHI
> arguments beyond num_args, we do not need to zero the PHI argument
> that's being removed.
>
> Note that all of these fields are properly set in add_phi_arg. In
> other words, add_phi_arg does not do things like leaving
> PHI_ARG_NONZERO as is, expecting it to be set to false in
> remove_phi_arg_num.
>
> Tested on i686-pc-linux-gnu. OK to apply?
>
> Kazu Hirata
>
> 2004-10-30 Kazu Hirata <kazu@cs.umass.edu>
>
> * tree-phinodes.c (remove_phi_arg_num): Do not zero the
> element that's being removed.
OK. I would recommend a short comment indicating why it is safe to
not clear the various structure elements.
jeff