[PATCH] Canonical types (1/3)

Mike Stump mrs@apple.com
Tue Nov 28 19:33:00 GMT 2006


On Nov 28, 2006, at 10:14 AM, Richard Kenner wrote:
>> It seems to me that all the frontends should use these fields.
>> Hopefully we can use it as a lever to eliminate the  
>> types_compatible_p
>> langhook.
>
> They can certainly "use" them but are there any front ends besides
> C and C++ where they'd *gain* anything from there: where two types are
> to be considered identical even though they are different tree nodes.

Java and Ada I suspect as the only ones that might, depends upon the  
nature of the code and depends on wether those front ends build  
duplicates or go out of their way to not do this.  If they don't build  
duplicates or if they just don't exercise comptypes much, there'd be  
no benefit.

One way to tell would be to grab the hairiest meta-programming style  
code or the hairiest templatized code and compile with -Q and then see  
how much time is spent in comptypes.  If it always seems to be 1% or  
less, there might not be much benefit to it.



More information about the Gcc-patches mailing list