aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-06 09:16:59 -0700
committerTom Tromey <tom@tromey.com>2021-03-06 09:17:28 -0700
commit4444f40757a242015973237627283a910f5d9654 (patch)
tree2eff136ada394093d03b997cd3c69069e8c36466 /sim/m32c
parent8c0546e928b557f10cb5aba2a91f3ecee660029d (diff)
downloadbinutils-4444f40757a242015973237627283a910f5d9654.zip
binutils-4444f40757a242015973237627283a910f5d9654.tar.gz
binutils-4444f40757a242015973237627283a910f5d9654.tar.bz2
Micro-optimize abbrev reading and storage
Currently, and abbrev_info points to a separately allocated array of attr_abbrev objects. This array is constructed in a temporary vector, then copied to the abbrev table's obstack. This patch changes abbrev_info to use the struct hack to store the objects directly, and changes abbrev_table::read to avoid an extra copy when allocating, using the "growing objects" capability of obstacks. This saves a bit of space, and also perhaps a little time. 2021-03-06 Tom Tromey <tom@tromey.com> * dwarf2/read.c (read_attribute): Make 'abbrev' const. * dwarf2/abbrev.c (abbrev_table::alloc_abbrev): Remove. (abbrev_table::read): Update. * dwarf2/abbrev.h (struct attr_abbrev): Move earlier. (struct abbrev_info): Reformat. <attrs>: Now an array. (struct abbrev_table) <alloc_abbrev>: Remove.
Diffstat (limited to 'sim/m32c')
0 files changed, 0 insertions, 0 deletions