mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-16 05:26:55 +00:00
During canonicalization of a type T, when T is structurally compared to an already canonicalized type C, it can happen that non-canonicalized sub-types of T are structurally compared again and again to canonicalized sub-types of C. This patch introduces a new optimization or those cases: on-the-fly type canonicalized. That means, if a not-yet-canonicalized sub-type S of the type T being canonicalized structurally compares equal to a canonicalized sub-type, then the canonical type of S is said to be the canonical type of the canonicalized sub-type. So sub-type S is canonicalized, on-the-fly, during canonicalization of type T. This considerably speeds up the canonicalization process while doing "abidiff vmlinux vmlinux". It goes from taking forever to taking 45 seconds on a non-optimized build. * include/abg-ir.h (environment::do_on_the_fly_canonicalization): Declare new member functions. ({type_base, function_type}::priv_): Make this public so that static non-member functions defined in abg-ir.cc can access it. * src/abg-ir.cc (environment::priv::do_on_the_fly_canonicalization_): New data member. (environment::priv::priv): Initialize it. (environment::do_on_the_fly_canonicalization): Define new member functions. (type_base::get_canonical_type_for): Trigger on-the-fly canonicalization during comparison of the type being canonicalized and an already canonicalized type. (types_are_being_compared, maybe_propagate_canonical_type): Define new static functions. (equals): In overloads for class_decl and function_type, call maybe_propagate_canonical_type when the two types compare equal. * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Adjust. * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
test-abicompat | ||
test-abidiff | ||
test-abidiff-exit | ||
test-alt-dwarf-file | ||
test-core-diff | ||
test-default-supprs | ||
test-diff-dwarf | ||
test-diff-dwarf-abixml | ||
test-diff-filter | ||
test-diff-pkg | ||
test-diff-suppr | ||
test-fedabipkgdiff | ||
test-lookup-syms | ||
test-read-dwarf | ||
test-read-write | ||
test-types-stability | ||
test-write-read-archive | ||
Makefile.am |