This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Convert __builtin_expect to __glibc_(un)likely throughout elf/.
- From: Zack Weinberg <zackw at panix dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Andreas Schwab <schwab at suse dot de>
- Date: Tue, 12 Jun 2018 10:05:03 -0400
- Subject: Re: [PATCH] Convert __builtin_expect to __glibc_(un)likely throughout elf/.
- References: <20180602220831.25016-1-zackw@panix.com> <alpine.DEB.2.20.1806041431080.15212@digraph.polyomino.org.uk> <CAKCAbMiFoQvCGXh+=kik3Pyg+Tj1kDp9jiCu_d9BFBKs6LWhkw@mail.gmail.com>
On Mon, Jun 4, 2018 at 11:33 AM, Zack Weinberg <zackw@panix.com> wrote:
> On Mon, Jun 4, 2018 at 10:36 AM, Joseph Myers <joseph@codesourcery.com> wrote:
>> On Sat, 2 Jun 2018, Zack Weinberg wrote:
>>
>>> I would appreciate someone checking over this patch very carefully
>>> indeed. In a whole bunch of places, __builtin_expect was used in a
>>> way that did not map mechanically to the newer convention. The test
>>> suite caught one mistake; I'm not confident I didn't make any more.
>>
>> I think this means there is a case for splitting this patch up into a part
>> that doesn't change installed stripped shared libraries (on one platform -
>> so at least the sense of comparisons etc. is unchanged on that platform
>> after the patch, even if likely/unlikely could be wrong sometimes without
>> being detected by such a comparison of installed stripped shared
>> libraries), and a part that does (presumably because the mapping isn't
>> purely mechanical so compiler IR changes enough to result in different
>> code generated), with the latter needing more careful review that no
>> semantics have changed.
>
> I do not have time to do that in this release cycle. I think my scanf
> patches are much more important and I intend to devote what little
> time I do have for glibc hacking to them.
I have pushed this patch as the branch
zack/elf-builtin-expect-conversion. I will not be working on it any
more for the foreseeable future but anyone is welcome to pick up the
ball.
zw