This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] builtins.c: Fix PR tree-optimization/15738.
- 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, roger at eyesopen dot com
- Date: Tue, 01 Jun 2004 22:12:15 -0600
- Subject: Re: [patch] builtins.c: Fix PR tree-optimization/15738.
- Organization: Red Hat, Inc
- References: <20040601.010705.32350989.kazu@cs.umass.edu>
- Reply-to: law at redhat dot com
On Mon, 2004-05-31 at 23:07, Kazu Hirata wrote:
>
> 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
>
> PR tree-optimization/15738.
> * builtins.c (fold_builtin_strchr): Transform
> strrchr (s, '\0') to strchr (s, '\0').
Shouldn't we try to put all the simplification/optimization stuff
into fold_builtin_strchr, then have expand_builtin_strchr and
expand_builtin_strrchr call the folder to simplify/optimize the call?
That would avoid a lot of duplication.
[ And yes, that applies to most of the fold_builtin_XXX stuff I
added a while back. Let's start with fixing the simple ones ;-) ]
jeff