This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] make LABEL_DECL has its own rtx field for its associated CODE_LABEL


On Tue, Apr 05, 2011 at 05:55:33PM +0200, Michael Matz wrote:
> I have a preference in having just one DECL_RTL field for conceptual 
> reasons:
> 
> Most DECLs are actually objects (there are some prominent exceptions, but 
> those always would be better described with something like NAMED_ENTITY, 
> if we had something like that, namespaces and translation_unit would 
> qualify).  All these have a RTL representation, so one field for them 
> seems appropriate.  That some of those don't have a size (either because 
> size makes no sense or is always available via type size) hints towards a 
> problem in the inheritance.  I would think it should look like so:
> 
> decl_common {}  # no size, no rtl, no align, no pt_uid
> decl_with_rtl : decl_common {
>   # add rtl, align, pt_uid
> }
> decl_with_size : decl_with_rtl {
>   # add size, size_unit
> }
> 
> Then decl_common can still be used for 
> imported_decl/namespace/translation_unit; objects 
> are at least decl_with_rtl, and some objects will be decl_with_size.

This is what I was heading for, but I hadn't fully worked out how to
switch around the inheritance structure.  Thanks!

Consider this patch dropped, then; I'll work towards something like the
above instead.

-Nathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]