libabigail/include
Dodji Seketeli 12b80d0770 Speed up access to the definition of a class declaration-only type
While emitting an abixml output for a corpus_group representing the
KMI of a Linux kernel tree, profiling shows that during comparison of
class types, calling class_decl::get_definition_of_declaration is a
hotspot.  Especially, the fact the function returns a shared pointer
that has to be "handled" shows up in the profile.

This patch introduces a
class_decl::get_naked_definition_of_declaration that returns a
pointer.  Not a shared pointer.

The patch then uses that get_naked_definition_of_declaration function
in the comparison code for class_decl.

The patch also uses get_naked_canonical_type instead of
get_canonical_type when comparing a bunch of other types.

This makes things a little bit faster when compiled without
optimization between 2% and 5%.

	* include/abg-ir.h
	(class_or_union::get_naked_definition_of_declaration): Declare a
	new member function.
	(class_decl::get_naked_definition_of_declaration): Likewise.
	* src/abg-ir.cc ({type_decl, qualified_type_def,
	array_type_def, enum_type_decl}::operator==): Use the
	get_naked_canonical_type and get_naked.
	(class_or_union::priv::naked_definition_of_declaration_): Define
	new data member.
	(class_or_union::priv::priv): Adjust to initialize the new data
	member.
	(class_or_union::get_naked_definition_of_declaration): Define new
	member function.
	({class_or_union, class_decl}::operator==): Use the new
	get_naked_definition_of_declaration instead of
	get_definition_of_declaration.
	(equals): In the overload for class_or_union, do the same.
	(class_decl::get_naked_definition_of_declaration): Define new
	member function.
	(hash_type_or_decl): Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-05-10 11:49:57 +02:00
..
abg-comp-filter.h Very light speed improvements 2016-11-29 17:08:19 +01:00
abg-comparison.h Don't consider changes to basic types as being redundant 2017-05-10 11:44:17 +02:00
abg-config.h Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-corpus.h Update copyright year on a bunch of files 2017-01-05 12:51:49 +01:00
abg-diff-utils.h cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-dwarf-reader.h Support Linux Kernel binaries 2017-01-06 12:35:22 +01:00
abg-fwd.h Remove useless overloads of is_type 2017-05-10 11:39:19 +02:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Support empty properties in INI files 2016-11-10 14:09:51 +01:00
abg-interned-str.h Cleanup namespace importing in abg-interned-str.h 2016-10-10 12:57:47 +02:00
abg-ir.h Speed up access to the definition of a class declaration-only type 2017-05-10 11:49:57 +02:00
abg-libxml-utils.h Bug 20970 - Add a --annotate option to abidw 2017-01-24 15:41:37 +01:00
abg-libzip-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-reader.h Drop suppressed ABI artifacts from the IR 2016-09-21 18:35:08 +02:00
abg-sptr-utils.h Setup per-corpus type maps indexed by type names 2016-11-29 16:16:43 +01:00
abg-suppression.h Support Linux Kernel ABI whitelist files 2017-01-06 12:41:57 +01:00
abg-tools-utils.h Support Linux Kernel ABI whitelist files 2017-01-06 12:41:57 +01:00
abg-traverse.h Canonicalize types either early or late after TU reading 2015-02-18 21:32:37 +01:00
abg-version.h.in Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-viz-common.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-dot.h cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-viz-svg.h cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-workers.h Several fixes and enhancements to abigail::workers 2017-02-27 09:48:08 +01:00
abg-writer.h Bug 20970 - Add a --annotate option to abidw 2017-01-24 15:41:37 +01:00
Makefile.am Split suppression engine off of abg-comparison.{cc,h} 2016-05-08 12:29:57 +02:00