[PATCH] __builtin_expect cleanup for iconvdata/*.c
Florian Weimer
fweimer@redhat.com
Mon Sep 8 19:42:00 GMT 2014
As promised, this patch cleans up the __builtin_expect use in iconvdata/*.c.
I have compiled glibc with these patches and without, with a definition
#define __builtin_expect(a, b) (a)
in place. There were no object code differences (as shown by objdump -d
--reloc) in these builds.
When __builtin_expect is active, there are differences because the GCC
optimizers sometimes treat semantically equivalent __builtin_expect
annotations differently.
I tested these patches on Fedora 20, x86_64 (without the
__builtin_expect kludge), with no regression.
Writing meaningful ChangeLog entries is a bit of a challenge because
most of the changes are in a macro called BODY, and usually, there are
two such macros in each file. I would suggest to create ChangeLog
entries for each real function change (mostly gconv_init), and otherwise
list just the files with "Replace __builtin_expect.".
--
Florian Weimer / Red Hat Product Security
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Manual-part-of-iconvdata-__builtin_expect-cleanup.patch
Type: text/x-patch
Size: 12762 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140908/0ecce16b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Automated-part-of-the-iconvdata-__builtin_expect-cle.patch
Type: text/x-patch
Size: 89554 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140908/0ecce16b/attachment-0001.bin>
More information about the Libc-alpha
mailing list