[PATCH] Add gimple subclasses for every gimple code (was Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3))

Alec Teal a.teal@warwick.ac.uk
Fri Nov 8 00:07:00 GMT 2013


Hello

On 06/11/13 15:32, Michael Matz wrote:
> Hi,
>
> On Tue, 5 Nov 2013, David Malcolm wrote:
>
>> Here's a followup patch which ensures that every gimple code has its own
>> subclass, by adding empty subclasses derived from the GSS_-based
>> subclasses as appropriate (I don't bother for gimple codes that already
>> have their own subclass due to having their own GSS layout).  I also
>> copied the comments from gimple.def into gimple.h, so that Doxygen picks
>> up on the descriptions and uses them to describe each subclass.
> I don't like that.  The empty classes are just useless, they imply a
> structure that isn't really there, some of the separate gimple codes are
> basically selectors of specific subtypes of a generic concept, without
> additional data or methods; creating a type for those is confusing.
>
> Generally I don't like complicating the type system without good reasons
> (as in actually also making use of the complicated types).  The fewer
> types the better IMO.
How would you do this? The types are different even if there is no 
actual difference, much like there are different gimple codes in the 
first place.
He is trying to create a bijection between what we did have and what we 
now have so nothing breaks.
>
>
> Ciao,
> Michael.



More information about the Gcc-patches mailing list