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][C/Ada] Streamline range type building and hashing


On Fri, 10 Sep 2010, Eric Botcazou wrote:

> > Eric - is the Ada part ok?
> 
> Sure.
> 
> > What's the reason Ada has lang_hooks.types.hash_types false (I'm just
> > curious, it's the only one)?
> 
> Because you can have as many "integer" types as you want in Ada by means of 
> type derivation:
> 
>   type Another_Int is new Integer;
>   type Yet_Another_Int is new Integer;
> 
> Another_Int and Yet_Another_Int aren't compatible.  See the big comment 
> starting on line 4728 in gcc-interface/decl.c for a detailed explanation of 
> the strategy implemented for derived types.

Hm, but I presume both INTEGER_TYPEs would have different TYPE_NAME
(which means they don't go through build_nonstandard_integer type)?
Remember that the standard C integer types which are named do not
go through type_hash_canon either.  From what I understand is that
the hashing is applied to anonymous types only.
 
> This causes some problems with vectorization, as the vectorizer implicitly 
> assumes that vector types are hashed.

I can't think of what would be the problem here off-hand, but certainly
TBAA might also be unhappy about this.

Richard.


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