Canonical type nodes, or, comptypes considered harmful

Dale Johannesen dalej@apple.com
Tue Nov 7 20:32:00 GMT 2006


On Nov 7, 2006, at 11:47 AM, Douglas Gregor wrote:

> I just read Nathan's discussion [1] on changing GCC's type system  
> to use canonical type nodes, where the comparison between two types  
> requires only a pointer comparison. Right now, we use "comptypes",  
> which typically needs to do deep structural checks to determine if  
> two types are equivalent, because we often clone _TYPE nodes.

One difficulty is that compatibility of types in C is not transitive,  
especially when you're compiling more than one translation unit at a  
time.
See the thread "IMA vs tree-ssa" in Feb-Mar 2004.  Geoff Keating and  
Joseph Myers give good examples.



More information about the Gcc mailing list