This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] don't bzero->memset if cfun is memset
- From: Roger Sayle <roger at eyesopen dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: <mark at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 11 Jul 2002 21:24:24 -0600 (MDT)
- Subject: Re: [PATCH] don't bzero->memset if cfun is memset
On Thu, 11 Jul 2002, DJ Delorie wrote:
> > Indeed, converting "bzero" into memset in a GCC extension.
>
> Not so, according to this comment in builtins.c:
Is too! This code is never reached when "-ansi" is specified.
The definition of BUILT_IN_BZERO in builtins.def specifies
NONANSI_P as true, which is passed to builtin_function_2 in
c-common.c, which contains a !(nonansi_p && flag_nonansi_builtin)
test. So the predefined DECL is never created nor inserted into
the symbol table, so the code you quote in builtins.c is never
called.
And you can call me a dutchman if it isn't so :>
Admittedly, the comment in the source code about only converting
it to a memset if its expanded inline might be wildly inaccurate...
Roger
--