From: Richard Guenther <richard.guenther@gmail.com>
To: Martin Jambor <mjambor@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Richard Guenther <rguenther@suse.de>,
Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH, PR 45934 3/6] More robust compute_complex_ancestor_jump_func
Date: Wed, 01 Dec 2010 20:28:00 -0000 [thread overview]
Message-ID: <AANLkTin2RFtk-_V3GUyb0y0WXp=mOy6GV1fXAGZ_G7n4@mail.gmail.com> (raw)
In-Reply-To: <20101201201711.029187216@virgil.suse.cz>
On Wed, Dec 1, 2010 at 9:16 PM, Martin Jambor <mjambor@suse.cz> wrote:
> Hi,
>
> compute_complex_ancestor_jump_func tries to match a pattern like this:
>
> if (obj_2(D) != 0B)
> goto <bb 3>;
> else
> goto <bb 4>;
>
> <bb 3>:
> iftmp.1_3 = &obj_2(D)->D.1762;
>
> <bb 4>:
> # iftmp.1_1 = PHI <iftmp.1_3(3), 0B(2)>
> D.1879_6 = middleman_1 (iftmp.1_1, i_5(D));
> return D.1879_6; */
>
> At some point while working at the devirtualization issues I have seen
> this failing because the zero was the zeroth parameter in the phi
> node. I think it is necessary for some of the new testcases to work
> but I am not really sure any more, I only remembered when I was
> splitting the big patch into separate ones.
>
> I did not bootstrap this patch separately but it did pas bootstrap and
> testsuite on x86_64-linux and make check-c++ on i686 together with the
> rest.
Ok.
Thanks,
Richard.
> Thanks,
>
> Martin
>
>
> 2010-11-30 Martin Jambor <mjambor@suse.cz>
>
> * ipa-prop.c (compute_complex_ancestor_jump_func): Work also if the
> zero is the first phi parameter.
>
> Index: icln/gcc/ipa-prop.c
> ===================================================================
> --- icln.orig/gcc/ipa-prop.c
> +++ icln/gcc/ipa-prop.c
> @@ -461,11 +461,15 @@ compute_complex_ancestor_jump_func (stru
> tree tmp, parm, expr;
> int index, i;
>
> - if (gimple_phi_num_args (phi) != 2
> - || !integer_zerop (PHI_ARG_DEF (phi, 1)))
> + if (gimple_phi_num_args (phi) != 2)
> return;
>
> - tmp = PHI_ARG_DEF (phi, 0);
> + if (integer_zerop (PHI_ARG_DEF (phi, 1)))
> + tmp = PHI_ARG_DEF (phi, 0);
> + else if (integer_zerop (PHI_ARG_DEF (phi, 0)))
> + tmp = PHI_ARG_DEF (phi, 1);
> + else
> + return;
> if (TREE_CODE (tmp) != SSA_NAME
> || SSA_NAME_IS_DEFAULT_DEF (tmp)
> || !POINTER_TYPE_P (TREE_TYPE (tmp))
>
>
next prev parent reply other threads:[~2010-12-01 20:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 20:22 [PATCH, PR 45934 0/6] Devirtualization aware of dynamic type changes Martin Jambor
2010-12-01 20:22 ` [PATCH, PR 45934 3/6] More robust compute_complex_ancestor_jump_func Martin Jambor
2010-12-01 20:28 ` Richard Guenther [this message]
2010-12-01 20:23 ` [PATCH, PR 45934 5/6] Identify the new dynamic type after change Martin Jambor
2010-12-01 20:23 ` [PATCH, PR 45934 6/6] Intraprocedural type-based devirtualization Martin Jambor
2010-12-02 15:40 ` Richard Guenther
2010-12-01 20:23 ` [PATCH, PR 45934 4/6] Dynamic type change detection Martin Jambor
2010-12-02 15:19 ` Richard Guenther
2010-12-02 16:17 ` Richard Guenther
2010-12-09 11:30 ` Martin Jambor
2010-12-02 23:25 ` Jason Merrill
2010-12-03 13:45 ` Martin Jambor
2010-12-03 14:34 ` Gabriel Dos Reis
2010-12-03 16:07 ` Jason Merrill
2010-12-03 16:09 ` Richard Guenther
2010-12-03 16:21 ` Gabriel Dos Reis
2010-12-04 23:14 ` Jason Merrill
2010-12-01 20:23 ` [PATCH, PR 45934 1/6] [PR 46287] Do not generate direct calls to thunks Martin Jambor
2010-12-01 20:58 ` Jan Hubicka
2010-12-03 13:01 ` Martin Jambor
2010-12-14 17:39 ` Jan Hubicka
2010-12-15 15:15 ` Martin Jambor
2010-12-15 15:46 ` Jan Hubicka
2010-12-15 16:52 ` Martin Jambor
2010-12-17 14:14 ` H.J. Lu
2010-12-01 20:23 ` [PATCH, PR 45934 2/6] Remove devirtualizations that cannot be done Martin Jambor
2010-12-01 20:35 ` Richard Guenther
2010-12-02 10:46 ` Martin Jambor
2010-12-02 12:14 ` Richard Guenther
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='AANLkTin2RFtk-_V3GUyb0y0WXp=mOy6GV1fXAGZ_G7n4@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--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).