This is the mail archive of the
mailing list for the GCC project.
Re: [patch tree-ssa-structalias.c]: Small finding in find_func_aliases function
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Kai Tietz <ktietz70 at googlemail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 8 Apr 2013 11:06:12 +0200
- Subject: Re: [patch tree-ssa-structalias.c]: Small finding in find_func_aliases function
- References: <CAEwic4aLV-10e3XVxraLyr84J7ji_=m6PFVm04YozQ1x_URxsw at mail dot gmail dot com> <515F266E dot 6020307 at redhat dot com>
On Fri, Apr 5, 2013 at 9:30 PM, Jeff Law <email@example.com> wrote:
> On 04/05/2013 02:29 AM, Kai Tietz wrote:
>> while debugging I made the finding that in find_func_aliases rhsop
>> might be used as NULL for gimple_assign_single_p items. It should be
>> using for the gimple_assign_single_p instead directly the rhs1-item as
>> argument to pass to get_constraint_for_rhs function.
>> 2013-04-05 Kai Tietz
>> * tree-ssa-structalias.c (find_func_aliases): Special-case
>> gimple_assign_single_p handling.
>> Ok for apply?
> Yes. OK for the trunk.
> Do you have a testcase?
He can't because the analysis is wrong. GIMPLE_SINGLE_RHS have exactly
two operands thus rhsop is always gimple_assign_rhs1 (). So the patch
only un-CSEs gimple_assign_rhs1 ().
The is_gimple_assign () case can surely be re-worked to be easier to read
but the patch doesn't improve things.
Please revert it.