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]

Re: patch to clean out savestring, copystr, mybzero and mybcopy


 > From: Jeffrey A Law <law@hurl.cygnus.com>
 >
 >   > BTW:  A few years ago, we did go though gdb and "ansi-fy" the string
 >   > function calls.
 > 
 > Yup.  We should probably set a date and just do it for gcc too.   The more   
 > gcc is brought into line with the rest of the tools in this area, the better.
 > jeff
 
        FYI here are stats on the number of calls to bcopy/bzero/bcmp:
bcopy: 237
bzero: 396
bcmp: 46

	I'd bet that most of the bzero calls are xmalloc/bzero pairs
which could be replaced with xcalloc. 

        If you want to consider index/rindex too, here they are:
index: 107
rindex: 44
        
        That's 830 function call sites to update (and visually verify.)

What's the reason bcopy etc aren't optimized along with the mem* ones?

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Icon CMT Corp.


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