From: Jan Hubicka <hubicka@ucw.cz>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: jason@redhat.com, jakub@redhat.com, rguenther@suse.de,
mjambor@suse.cz, gcc-patches@gcc.gnu.org
Subject: Re: PR ipa/59775 (get_binfo_at_offset not handling virtual inheritance well)
Date: Wed, 15 Jan 2014 21:27:00 -0000 [thread overview]
Message-ID: <20140115212723.GA13469@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20140115212158.GA13885@kam.mff.cuni.cz>
> Hi,
> this patch fixes ICE in ipa-devirt that is caused by get_binfo_at_offset
> reporting NULL for a valid query. This is because how virtual inheritance
> is represented.
>
> Here we have chain A<-B<-C where A is a virtual base. We look for A within
> C that is there at offset 64. On this query get_binfo_at_offset walks
> fields of C and it finds A, it matches it and it looks for BINFO. The
> catch is that BINFO represents only direct bases and A is not direct base.
> Conseuqentely it returns NULL. In the past this only prevented us from
> devirtualizing here, now we ICE, since ipa-devirt depends on fact that
> it can resolve all possible queries. get_binfo_at_offset needs to make a hop
> through B.
>
> This patch is kind of minimal change needed to get get_binfo_at_offset to
> look into B: when base is not found, it finds a base that contains A
> and dives into it.
>
> I plan to rewrite the function for next stage1: the walk of fields is already
> done by ipa-devirt separately, so it really should do only BINFO walk. For
> that we however need to retire other uses of get_binfo_at_offset that are still
> used by ipa-devirt. That is on the TODO list to switch it to be basically a
^^^ ipa-cp, that is the only place still ging through
gimple_extract_devirt_binfo_from_cst that works in a way so
get_binfo_at_offset needs to dive into fields.
> propagation engine for ipa-devirt's polymorphic_call_context structures.
> (basically I want to have one local pass doing non-trivial propagation and
> one IPA pass propagation across function boundaries, both sharing
> polymorphic_call_context structure and a lattice operations)
next prev parent reply other threads:[~2014-01-15 21:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 21:22 Jan Hubicka
2014-01-15 21:27 ` Jan Hubicka [this message]
2014-01-16 8:44 ` Richard Biener
2014-01-16 18:45 ` Jan Hubicka
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=20140115212723.GA13469@atrey.karlin.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jason@redhat.com \
--cc=mjambor@suse.cz \
--cc=rguenther@suse.de \
/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).