Force late canonicalizing of function types read from abixml
This is the first patch of a series which aims at fixing:
Bug 19024 - abidw --abidiff fails and aborts when run against r300_dri.so
The issue reported in that bug is the manifestation of several
problems that different patches in the series address on a case by
case basis.
Suffice it to say abidw --abidiff on my X220 laptop was taking more
than 40 minutes, and north of 11GB or ram. An rather than yielding
the empty set, it was emitting lots of false postives!
The patchset thus applies a series of optimizations to reduce the time
and memory taken, so that I can at least debug the issues that prevent
abidw --abidiff from yielding the empty set, as it should. Then, with
those optimizations applied, I came up with a series of fixes.
With the series applies, abidw --abidiff now takes less than 8 minutes
and around of 4.8GB of ram.
The first seven patches are those fixes. The next five patches are
the time and size optimization that allowed me to work on the first
fixes. The thirteenth patch applies some needed modification (both
fixes and improvements) to abidw --abidiff itself. The last patch
carries the necessary adjustments to the regression tests output.
Here are the short titles of the patches of the set, including this one:
Force late canonicalizing of function types read from abixml
Fix strip_typedef issues
Do not compare access specs for member types & functions
Fix "is-anonymous" abixml property impact on some tests
Fix const-ness of a function parameter
Handle aliased function decls when comparing decls in general
Make canonicalization non sensitive to struct-ness of subtypes
Set the corpus of all ABI artifact reads from abixml
Implement fast type lookup in a corpus
Accelerate a slow path in hash_type_or_decl()
A series of small speed optimizations here and there
Allow only one definition of a given type per corpus in abixml
Make abidw --abidiff not show definitely harmless changes
Adjust tests for the patchset
We do not add the r300_dri.so library to the repository because of the
time it still takes to complete.
And now, here is the cover letter for this first patch.
When reading the abixml format, sometimes, function types can be
early-canonicalized. This can be wrong especially is the function
type has sub-types that are not canonicalized yet.
So this patch forces those to be late-canonicalized.
* src/abg-reader.cc (build_function_type): Late-canonicalize
function types.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>