This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR51030, handle p ? &p->base : 0 in phiopt


On Fri, Nov 11, 2011 at 6:56 AM, Jeff Law <law@redhat.com> wrote:
> -----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?

No, I didn't.  But I think it'll be common enough to be worth the effort.

Richard.

> 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-----
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]