ce6513e Avoid stripping typedefs too much

Authored and Committed by Dodji Seketeli 8 years ago
1 file changed. 25 lines added. 3 lines removed.
    Avoid stripping typedefs too much
    
    strip_typedef re-constructs entire type trees and canonicalize them.
    Calling it a lot on very deep and recursive trees can be costly.
    
    Unfortunately, categorization of changes uses strip_typedef quite a
    bit to determine if the two types that are different are still
    compatible.  When used on changesets generating from comparing two
    Linux Kernels, it makes changes categorization dominate CPU usage
    profiles.
    
    This patch avoids using strip_typedef to determine if two types are
    compatible and thus speeds up type categorization of changes involving
    lots of deep and recursive type trees.
    
    	* src/abg-ir.cc (types_are_compatible)
    	(is_compatible_with_class_type): Do not strip typedefs.  Just get
    	their leaf types.
    
    Signed-off-by: Dodji Seketeli <dodji@redhat.com>
    
        
file modified
+25 -3