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: DJ Delorie <dj at redhat dot com>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, dj at redhat dot com
- Date: Tue, 30 Jul 2002 20:52:18 -0400
- Subject: Re: [PATCH] don't bzero->memset if cfun is memset
- References: <69740000.1026495080@warlock.codesourcery.com>
> It sounds to me like, rather than your original patch, we should
> attack this root problem; make it so that "bzero" can be open-coded
> efficiently, but without accidentally becoming memset in the
> process.
Ok, I'm back from vacation and I've looked at this some more. It's
not a trivial change because clear_storage() has no mechanism to
signal a failure, nor any way for callers to indicate that it should
fail if it needs to call a library function, or to select which
library function should be used.
I'm willing to do the legwork if someone else chooses a new design for
how these functions (expand_builtin_{memset,bzero} and clear_storage)
interact.