This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch adds an inlined fast path for the common case of a single-byte LEB128 number. This provides significant speed-ups for DWARF processing (mostly for the as-yet-unsubmitted changes to generate the .gdb-index section). In my testing, read_unsigned_LEB_128() accounted for more than 5% of the link time when generating a gdb index; with this change, the LEB128 routines are negligible, resulting in a 5% improvement. This should also improve line number lookup and ODR detection. I've also added new unit tests for the LEB128 readers. Tested on x86_64. OK? -cary 2012-01-24 Cary Coutant <ccoutant@google.com> * int_encoding.cc (read_unsigned_LEB_128): Replaced with inline definition and ... (read_unsigned_LEB_128_x): ... this new function. (read_signed_LEB_128): Replaced with inline definition and ... (read_signed_LEB_128_x): ... this new function. * int_encoding.h (read_unsigned_LEB_128_x): New function. (read_unsigned_LEB_128): Add inline definition. (read_signed_LEB_128_x): New function. (read_signed_LEB_128): Add inline definition. * testsuite/Makefile.am (leb128_unittest): New unit test. * testsuite/Makefile.in: Regenerate. * testsuite/leb128_unittest.cc: New unit test.
Attachment:
gold-fast-leb128-patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |