Very light speed improvements
When comparing of two kernel trees showed that for huge changesets
involving highly recursive types, leaf functions used by the
categorization code dominate the performance profile.
This patch introduces some changes that help gain around 30 seconds
(out of 14 minutes) on a non-optimized build, when comparing 4.7 nd
4.8 fedora kernels (between fedora 24 and 26).
* include/abg-comp-filter.h (has_harmless_name_change): Pass smart
pointers by reference.
* src/abg-comp-filter.cc (access_changed)
(function_name_changed_but_not_symbol)
(non_static_data_member_type_size_changed)
(static_data_member_type_size_changed, is_compatible_change)
(decl_name_changed, has_harmless_name_change): Pass smart
pointers by reference.
* include/abg-ir.h (decl_base::set_context_rel): Take a bare
pointer, not a smart pointer.
* src/abg-ir.cc (decl_base::priv::context_): Make this data member
be a naked pointer, not a smart pointer.
(decl_base::priv::priv): Initialize it.
(decl_base::priv::~priv): New constructor.
(decl_base::{get_context_rel, set_scope}): Adjust.
(class_decl::method_decl::{method_decl, set_scope}): Likewise.
(equals): In the overload for var_decl, compare the type of the
var first as that might be faster (to detect var_decls with
different types) in the general case where types are
canonicalized.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>