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: Calculate TYPE_CANONICAL only for types that can be accessed in memory


> > +  /* No need for canonical types of functions and methods; those are never
> > +     accessed as memory locations.  */
> > +  if (TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE)
> > +    return;
> 
> Just occured to me that it might make sense to remove the
> FUNCTION/METHOD_TYPE case in useless_type_conversion_p (I wonder
> in which cases we enter up in that path...).

Yes, I think that is unreachable (it was used only by that ignored code path in
ipa-symtab.c) and I also had patch for it somewhere.  Will look it up at
afternoon (I am teaching at morning).
I think useless_type_conversion_p should also just work on types that do have
memory representation.

Honza


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