e083531 Apply ODR-based type comparison optimization to function types

Authored and Committed by Dodji Seketeli 8 years ago
1 file changed. 37 lines added. 4 lines removed.
    Apply ODR-based type comparison optimization to function types
    
    Inside a given ABI corpus, during type canonicalization, function
    types are compared structurally (member-wise).  Note that on the other
    hand, class, enums and basic types are compared using an ODR-based
    optimization: only their type names are compared.
    
    This makes function types comparison be *super slow* for ABI corpora
    with a lot of function types.
    
    This patch fixes that by enabling the ODR-based comparison
    optimization for function types too, during type canonicalization.
    
    	* src/abg-ir.cc (type_eligible_for_odr_based_comparison):
    	Factorize this out of type_base::get_canonical_type_for.  Also,
    	add function types to the set of types to use the ODR-based
    	comparison optimization on.
    	(type_base::get_canonical_type_for): Use the new
    	type_eligible_for_odr_based_comparison function.
    
    Signed-off-by: Dodji Seketeli <dodji@redhat.com>
    
        
file modified
+37 -4