Inline abbrev lookup
Profiling showed that calls to abbrev_table::lookup_abbrev were "too
visible". As these are just forwarding calls to the hash table, this
patch inlines the lookup. Also, htab_find_with_hash is used, avoiding
another call.
The run previous to this had times of (see the first patch in the
series for an explanation):
gdb 1.69
libxul 2.02
Ada 2.52
This patch improves the times to:
gdb 1.64
libxul 1.99
Ada 2.47
gdb/ChangeLog
2020-05-27 Tom Tromey <tromey@adacore.com>
* dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
Use htab_find_with_hash.
<add_abbrev>: Remove "abbrev_number" parameter.
* dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
"abbrev_number" parameter. Use htab_find_slot_with_hash.
(hash_abbrev): Add comment.
(abbrev_table::lookup_abbrev): Move to header file.
(abbrev_table::read): Update.