This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH GCC8][03/33]Refactor invariant variable/expression handling
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Bin Cheng <Bin dot Cheng at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Wed, 3 May 2017 16:38:09 +0200
- Subject: Re: [PATCH GCC8][03/33]Refactor invariant variable/expression handling
- Authentication-results: sourceware.org; auth=none
- References: <VI1PR0802MB21765E7A0A72655FC1E6CC39E7190@VI1PR0802MB2176.eurprd08.prod.outlook.com> <CAFiYyc38iz83r8FZ1NVqM1zzT3GCMYsui_uSw3aVXw_bm+z50Q@mail.gmail.com>
Hi Bin,
On 24 April 2017 at 12:26, Richard Biener <richard.guenther@gmail.com> wrote:
> On Tue, Apr 18, 2017 at 12:38 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>> Hi,
>> This patch refactors how invariant variable/expressions are handled. Now they are
>> recorded in the same kind data structure and handled similarly, which makes code
>> easier to understand.
>>
>> Is it OK?
>
This patch (r247512) caused regression on some arm
targets/cpu/fpu/runtestflags combinations:
FAIL: gcc.target/arm/ivopts.c object-size text <= 32
See: http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/247512/report-build-info.html
Thanks,
Christophe
> Ok.
>
> Richard.
>
>> Thanks,
>> bin
>>
>> 2017-04-11 Bin Cheng <bin.cheng@arm.com>
>>
>> * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
>> inv_vars. Add inv_exprs.
>> (struct iv_cand): Rename depends_on to inv_vars.
>> (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
>> max_inv_var_id/n_inv_var_uses. Move max_inv_expr_id around.
>> Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
>> (dump_cand): Dump inv_vars.
>> (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
>> (record_invariant, find_depends, add_candidate_1): Ditto.
>> (set_group_iv_cost, force_var_cost): Ditto.
>> (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
>> (get_computation_cost_at, get_computation_cost): Ditto.
>> (determine_group_iv_cost_generic): Ditto.
>> (determine_group_iv_cost_address): Ditto.
>> (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
>> (determine_group_iv_costs): Ditto.
>> (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
>> (iv_ca_set_remove_invariants): Renamed to ...
>> (iv_ca_set_remove_invs): ... this. Support inv_vars and inv_exprs.
>> (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
>> (iv_ca_set_add_invariants): Renamed to ...
>> (iv_ca_set_add_invs): ... this. Support inv_vars and inv_exprs.
>> (iv_ca_set_cp): Use iv_ca_set_add_invs.
>> (iv_ca_has_deps): Support inv_vars and inv_exprs.
>> (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
>> (create_new_ivs): Remove useless dump.
>>
>> gcc/testsuite/ChangeLog
>> 2017-04-11 Bin Cheng <bin.cheng@arm.com>
>>
>> * g++.dg/tree-ssa/ivopts-3.C: Adjust test string.