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


>>>>> "DJ" == DJ Delorie <dj@redhat.com> writes:

 DJ> If the user is creating a function called memset and calls bzero
 DJ> within it, I can't see how gcc could think they want bzero to be
 DJ> replaced with a call to memset - it's nonsensical and will always
 DJ> result in recursion.  IMHO, in this context the optimization is
 DJ> simply not valid.

That seems to me the key point.  Would it be a reasonable fix simply
to have gcc generate libcalls to bzero rather than to memset when it's
trying to optimize calls to bzero?  That way there wouldn't be any
surprise. 

	  paul


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