This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to clean out savestring, copystr, mybzero and mybcopy
- To: bothner at cygnus dot com, law at cygnus dot com
- Subject: Re: patch to clean out savestring, copystr, mybzero and mybcopy
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Tue, 12 Jan 1999 10:58:01 -0500 (EST)
- Cc: egcs-patches at cygnus dot com
> 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.