This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/3] Encapsulate comp_cost within a class with methods.
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: marxin <mliska at suse dot cz>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 May 2016 11:13:57 +0100
- Subject: Re: [PATCH 1/3] Encapsulate comp_cost within a class with methods.
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1461931011 dot git dot mliska at suse dot cz> <cce4dcddbcb19eebbb9424e81bb130c5c2fd200c dot 1461931011 dot git dot mliska at suse dot cz>
On Mon, Apr 25, 2016 at 10:42 AM, marxin <mliska@suse.cz> wrote:
> gcc/ChangeLog:
>
> 2016-04-25 Martin Liska <mliska@suse.cz>
>
> * tree-ssa-loop-ivopts.c(comp_cost::operator=): New function.
> (comp_cost::infinite_cost_p): Likewise.
> (operator+): Likewise.
> (comp_cost::operator+=): Likewise.
> (comp_cost::operator-=): Likewise.
> (comp_cost::operator/=): Likewise.
> (comp_cost::operator*=): Likewise.
> (operator-): Likewise.
> (operator<): Likewise.
> (operator==): Likewise.
> (operator<=): Likewise.
> (comp_cost::get_cost): Likewise.
> (comp_cost::set_cost): Likewise.
> (comp_cost::get_complexity): Likewise.
> (comp_cost::set_complexity): Likewise.
> (comp_cost::get_scratch): Likewise.
> (comp_cost::set_scratch): Likewise.
> (comp_cost::get_infinite): Likewise.
> (comp_cost::get_no_cost): Likewise.
> (struct ivopts_data): Rename inv_expr_id to max_inv_expr_id;
> (tree_ssa_iv_optimize_init): Use the renamed property.
> (new_cost): Remove.
> (infinite_cost_p): Likewise.
> (add_costs): Likewise.
> (sub_costs): Likewise.
> (compare_costs): Likewise.
> (set_group_iv_cost): Use comp_cost::infinite_cost_p.
> (get_address_cost): Use new comp_cost::comp_cost.
> (get_shiftadd_cost): Likewise.
> (force_expr_to_var_cost): Use new comp_cost::get_no_cost.
> (split_address_cost): Likewise.
> (ptr_difference_cost): Likewise.
> (difference_cost): Likewise.
> (get_expr_id): Use max_inv_expr_id.
> (get_computation_cost_at): Use comp_cost::get_infinite.
> (determine_group_iv_cost_generic): Use comp_cost::get_no_cost.
> (determine_group_iv_cost_address): Likewise.
> (determine_group_iv_cost_cond): Use comp_const::infinite_cost_p.
> (autoinc_possible_for_pair): Likewise.
> (determine_group_iv_costs): Use new methods of comp_cost.
> (determine_iv_cost): Likewise.
> (cheaper_cost_pair): Use comp_cost operators.
> (iv_ca_recount_cost): Likewise.
> (iv_ca_set_no_cp): Likewise.
> (iv_ca_set_cp): Likewise.
> (iv_ca_cost): Use comp_cost::get_infinite.
> (iv_ca_new): Use comp_cost::get_no_cost.
> (iv_ca_dump): Use new methods of comp_cost.
> (iv_ca_narrow): Use operators of comp_cost.
> (iv_ca_prune): Likewi.se
> (iv_ca_replace): Likewise.
> (try_add_cand_for): Likewise.
> (try_improve_iv_set): Likewise.
> (find_optimal_iv_set): Use new methods of comp_cost.
> (free_loop_data): Use renamed max_inv_expr_id.
> ---
Hi Martin,
Could you please rebase this patch and the profiling one against
latest trunk? The third patch was applied before these two now.
Thanks,
bin