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: [patch] don't bzero->memset if cfun is memset


> I wouldn't object to removing the bzero->memset conversion; I think
> that would be cleaner than trying to avoid doing the conversion when
> it's inappropriate, and, as you say, I don't see where there's a lot
> of win in doing that conversion anyhow.

Actually, it's a bit more subtle than that.  There's code in
expand_builtin_bzero() to make sure that bzero is called if it's not
open coded.  It doesn't work, because expand_builtin_memcpy() calls
clear_storage() which emits a call to memset, so effectively it's
*always* "open coded" as far as expand_builtin_bzero() is concerned.

Perhaps clear_storage() needs a parameter that says if it should fail
if it requires a library function?


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