This is the mail archive of the
mailing list for the GCC project.
Re: Calculate TYPE_CANONICAL only for types that can be accessed in memory
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 22 May 2015 14:04:01 +0200
- Subject: Re: Calculate TYPE_CANONICAL only for types that can be accessed in memory
- Authentication-results: sourceware.org; auth=none
- References: <20150521181437 dot GB8821 at kam dot mff dot cuni dot cz> <alpine dot LSU dot 2 dot 11 dot 1505221003410 dot 30088 at zhemvz dot fhfr dot qr>
> > + /* 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