This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH v2] Add strcmp, strncmp, memcmp inline implementation.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 25 May 2015 10:57:47 +0200
- Subject: Re: [RFC PATCH v2] Add strcmp, strncmp, memcmp inline implementation.
- Authentication-results: sourceware.org; auth=none
- References: <20150525015826 dot GA29445 at domone> <20150525081156 dot GA10661 at domone> <CA+=Sn1k5YrnGy-zt-0mmwuGM62Yyn+6ToxiySy9D5OWBVnRJyg at mail dot gmail dot com>
On Mon, May 25, 2015 at 04:23:52PM +0800, Andrew Pinski wrote:
> On Mon, May 25, 2015 at 4:11 PM, OndÅej BÃlka <neleai@seznam.cz> wrote:
> > Sorry for noise,
> >
> > I wanted to ask if one needs to surround strlen with
> > __builtin_constant_p to avoid runtime overhead, and when I read patch I
> > realized that I by mistake included older partial patch. What I intended
> > is here, please ignore previous one. I know that it had bug when you
> > have string literal with zero in middle.
> >
> > So do I need that to be safe? And other comments?
>
>
> Yes what will it take to get this into GCC instead of adding one more
> hack to glibc for this?
> Sorry but I feel like this would be better in GCC than doing this in glibc.
>
Sorry but it goes both ways. I could also argue why you should add one
more hack to gcc? See.
Try to convince me. My argument is easier maintainability. Try write a
gcc patch and post it. Then compare these side-by-side how are they easy
to read (I am not big fan of lisp).
Also if you want to rewrite this to gcc you are welcome. You will have
lot of work to do.