From: Richard Biener <rguenther@suse.de>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc@gcc.gnu.org, jason@redhat.com
Subject: Re: TYPE_BINFO and canonical types at LTO
Date: Tue, 18 Feb 2014 10:42:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.11.1402181140550.1593@zhemvz.fhfr.qr> (raw)
In-Reply-To: <alpine.LSU.2.11.1402180943190.1593@zhemvz.fhfr.qr>
On Tue, 18 Feb 2014, Richard Biener wrote:
> On Mon, 17 Feb 2014, Jan Hubicka wrote:
>
> > >
> > > Yeah, ok. But we treat those types (B and C) TBAA equivalent because
> > > structurally they are the same ;) Luckily C has a "proper" field
> > > for its base (proper means that offset and size are correct as well
> > > as the type). It indeed has DECL_ARTIFICIAL set and yes, we treat
> > > those as "real" fields when doing the structural comparison.
> >
> > Yep, the difference is that depending if C or D win, we will end up walking the
> > BINFO or not. So we should not depend on the BINFo walk for correctness.
> > >
> > > More interesting is of course when we can re-use tail-padding in
> > > one but not the other (works as expected - not merged).
> >
> > Yep.
> > >
> > > struct A { A (); short x; bool a;};
> > > struct C:A { bool b; };
> > > struct B {struct A a; bool b;};
> > > struct C *p2;
> > > struct B *p1;
> > > int
> > > t()
> > > {
> > > p1->a.a = 2;
> > > return p2->a;
> > > }
> > >
> > > > Yes, zero sized classes are those having no fields (but other stuff,
> > > > type decls, bases etc.)
> > >
> > > Yeah, but TBAA obviously doesn't care about type decls and bases.
> >
> > So I guess the conclussion is that the BINFO walk in alias.c is pointless?
>
> Yes. But as I said - I remember being there and proposing to remove
> it. Some N > 5 years ago or so and it was either rejected or it didn't
> work out ;)
Btw, a bootstrap & regtest worked fine with removing that loop
(not that this proves anything).
Richard.
next prev parent reply other threads:[~2014-02-18 10:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 0:48 Jan Hubicka
2014-02-14 8:06 ` Jason Merrill
2014-02-14 8:42 ` Richard Biener
2014-02-14 16:52 ` Jan Hubicka
2014-02-14 23:22 ` Jan Hubicka
2014-02-15 10:10 ` Richard Biener
2014-02-20 20:49 ` Jason Merrill
2014-02-15 10:03 ` Richard Biener
2014-02-16 23:55 ` Jan Hubicka
2014-02-17 11:36 ` Richard Biener
2014-02-17 20:55 ` Jan Hubicka
2014-02-18 8:51 ` Richard Biener
2014-02-18 10:42 ` Richard Biener [this message]
2014-02-18 19:02 ` Jan Hubicka
2014-02-19 12:16 ` Richard Biener
2014-02-19 19:19 ` Jan Hubicka
2014-02-20 11:28 ` Richard Biener
2014-02-20 20:57 ` Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.11.1402181140550.1593@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).