From: Richard Guenther <richard.guenther@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Make devirtualization use BINFO_VTABLE instead of BINFO_VIRTUALS
Date: Fri, 02 Sep 2011 08:58:00 -0000 [thread overview]
Message-ID: <CAFiYyc0h=ZpwmuU6ecgEwtySJo5Pq=edhS9=ZSUBTA3DCYPMFg@mail.gmail.com> (raw)
In-Reply-To: <20110901185230.GA11080@kam.mff.cuni.cz>
On Thu, Sep 1, 2011 at 8:52 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> - Nevertheless, this method of devirtualization cannot automatically
>> de-thunkize this-adjusting thunks and newly direct calls to them
>> cannot be inlined because the inliner does not have this capability
>> now. This is in fact a regression from 4.6, and testcases
>> ivinline-7.C and ivinline-9.C had to be XFAILed exactly for this
>> reason. The size of the memory savings and the fact that we do not
>> devirtualize that much now make this an acceptable tradeoff, though.
>
> OK, the "dethunkization" was ugly anyway. I guess we will need to add support
> for handling thunks in inliner but that can go incrementally.
>
>> 2011-08-31 Martin Jambor <mjambor@suse.cz>
>>
>> * cgraph.h (cgraph_indirect_call_info): Removed field thunk_delta.
>> * gimple-fold.c (gimple_get_virt_method_for_binfo): Rewritten to use
>> BINFO_VTABLE. Parameter delta removed, all callers updated.
>> * tree.c (free_lang_data_in_binfo): Clear BINFO_VIRTUALs instead
>> BINFO_VTABLE.
>> * cgraph.c (cgraph_make_edge_direct): Removed parameter delta, updated
>> all calls.
>> * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Removed
>> handling of thunk_delta.
>> * ipa-cp.c (get_indirect_edge_target): Removed parameter delta.
>> (devirtualization_time_bonus): Do not handle thunk deltas.
>> (ipcp_discover_new_direct_edges): Likewise.
>> * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
>> (try_make_edge_direct_simple_call): Likewise.
>> (try_make_edge_direct_virtual_call): Likewise.
>> * lto-cgraph.c (output_cgraph_opt_summary_p): Likewise. Mark
>> parameter set as unused.
>> (output_edge_opt_summary): Likewise. Mark both parameters as unused.
>> * lto-cgraph.c (output_cgraph_opt_summary_p): Likewise. Mark
>> parameter set as unused.
>> (output_edge_opt_summary): Likewise. Mark both parameters as unused.
>> (input_edge_opt_summary): Likewise.
>> * lto-streamer-out.c (lto_output_ts_binfo_tree_pointers): Do not stream
>> BINFO_VIRTUALS at all.
>> * lto-streamer-in.c (lto_input_ts_binfo_tree_pointers): Likewise.
>>
>> * testsuite/g++.dg/ipa/devirt-3.C: Added a distraction method.
>> * testsuite/g++.dg/ipa/ivinline-7.C: Added a test for direct call
>> discovery, xfailed test for inlining.
>> * testsuite/g++.dg/ipa/ivinline-9.C: Likewise.
>
> The cgraph bits of the patch are OK, but I will leave the gimple-fold bits for Richi's approval.
Ok.
Thanks,
Richard.
> Can't we drop computation of BINFO_VIRTUALS from C++ FE completely now?
>
> Honza
>
next prev parent reply other threads:[~2011-09-02 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 17:48 Martin Jambor
2011-09-01 18:52 ` Jan Hubicka
2011-09-02 8:58 ` Richard Guenther [this message]
2011-09-02 13:39 ` Martin Jambor
2011-09-02 13:43 ` 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='CAFiYyc0h=ZpwmuU6ecgEwtySJo5Pq=edhS9=ZSUBTA3DCYPMFg@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
/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).