This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Do not compute alias sets for types that don't need them
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 27 May 2015 07:44:10 +0200
- Subject: Re: Do not compute alias sets for types that don't need them
- Authentication-results: sourceware.org; auth=none
- References: <20150522121552 dot GC91616 at kam dot mff dot cuni dot cz> <alpine dot LSU dot 2 dot 11 dot 1505221513350 dot 30088 at zhemvz dot fhfr dot qr> <20150522133356 dot GD75713 at kam dot mff dot cuni dot cz> <alpine dot LSU dot 2 dot 11 dot 1505260948300 dot 30088 at zhemvz dot fhfr dot qr> <20150527052213 dot GA88897 at kam dot mff dot cuni dot cz>
> > >
> > > I am not sure if TYPE_MAIN_VARIANT is really needed here. What I know is that
> > > complete types may have incomplete variants.
> >
> > How can that be? TYPE_FIELDS is shared across variants and all variants
> > should be layed out.
>
> Because TYPE_FILEDS are not always shared across variants. For example
> gfc_nonrestricted_type builds variants of types that have their own TYPE_FIELDS
> lists whose types are variants of the original TYPE_FIELDs. C++ FE used to do
> the same for member pointers, but I noticed that last stage1 with early version
> of type verifier and as far as I can remember Jason changed that.
And also I am positive that we do have incomplete variants of complete types in
IL. Those seem to happen for C++ templates. I can dig more into reason for
these appearing.
We also also get wrong self-referring builtin types. This we discussed in
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00562.html gcov_info_type still
fails the type verifier because we produce variant that has TYPE_SIZE but no
TYPE_FIELDS. It does not happen on mainline only becuase we moved verify_type
into dwarf2out and that type never gets into debug info. I don't see how to
fix this other way than by my original patch in the thread above - upon
completing builtin type we should copy its fields from main variant at the same
time we copy size. FEs are doing that.
Honza
>
> Honza