This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR51030, handle p ? &p->base : 0 in phiopt
- From: Jeff Law <law at redhat dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Nov 2011 22:56:51 -0700
- Subject: Re: [PATCH] Fix PR51030, handle p ? &p->base : 0 in phiopt
- References: <alpine.LNX.2.00.1111081444080.4527@zhemvz.fhfr.qr>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/08/11 06:45, Richard Guenther wrote:
>
> This should optimize VEC_BASE that Jakub was patching by teaching
> phiopt to handle some one-statement intermediate basic-blocks.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, any comments?
>
> Thanks, Richard.
>
> 2011-11-08 Richard Guenther <rguenther@suse.de>
>
> PR tree-optimization/51030 * tree-ssa-phiopt.c
> (jump_function_from_stmt): New function. (value_replacement): Use
> it to handle trivial non-empty intermediate blocks.
>
> * gcc.dg/tree-ssa/phi-opt-6.c: New testcase.
Seems like a reasonable extension of the existing value_replacement
capability. We might want to tweak the comment near the top of the
file to indicate the additional case we handle.
It's pretty specific to the &p->base idiom, but that's probably OK.
You didn't peek to see how often the optimization triggered by chance
did you?
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJOvLkjAAoJEBRtltQi2kC7hp0H/29hwfGpSdRFaK6JFanakkp1
HnpEf/YdMr8YieG5dAqR5IzBkb/lRIgwZR9mxPdXnb172IdsHfTaeuX3NyXtVPHD
0Rt/yXGQJStt0J7n3FUjOnQHvZeE05VRzxK8axSLDsNHGUH3j+FVVOT8/+hhnKi3
YfZJo6A68mfpeV/0BlPmnQJOTKnE4YSJbeBnqXg3DNcAJcIajNnj6SNUs8cXe4JB
s2ERYcqrje9sWwgEQY4KueTlwqpPu2c+52Sh2JBD8E8fo+S5OWIglg23q5GmZ83i
OIeM3DZaZdjtV8/oJjsSi1viJVyXXQQqiIJfs1U4EcFw+h6gRLp4HDWIoy/tprQ=
=zmj+
-----END PGP SIGNATURE-----