binutils-gdb/gdb/dwarf2
Tom Tromey 4444f40757 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.
2021-03-06 09:17:28 -07:00
..
abbrev.c Micro-optimize abbrev reading and storage 2021-03-06 09:17:28 -07:00
abbrev.h Micro-optimize abbrev reading and storage 2021-03-06 09:17:28 -07:00
attribute.c [gdb/symtab] Handle DW_AT_decl_file with form DW_FORM_implicit_const 2021-02-24 23:58:42 +01:00
attribute.h [gdb/symtab] Handle DW_AT_decl_file with form DW_FORM_implicit_const 2021-02-24 23:58:42 +01:00
comp-unit.c
comp-unit.h
die.h
dwz.c
dwz.h
expr.c
expr.h
frame-tailcall.c
frame-tailcall.h
frame.c
frame.h
index-cache.c
index-cache.h
index-common.c
index-common.h
index-write.c
index-write.h
leb.c
leb.h
line-header.c
line-header.h
loc.c
loc.h
macro.c
macro.h
read.c Micro-optimize abbrev reading and storage 2021-03-06 09:17:28 -07:00
read.h gdb/dwarf: create and destroy dwarf2_per_bfd's CUs-to-expand queue 2021-02-23 13:37:44 -05:00
section.c
section.h
stringify.c
stringify.h