From 73eb5e9ee140383c7dcbf57f88b57a4e92ded46d Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Thu, 29 Oct 2015 04:40:37 +0000 Subject: [PATCH] tree-ssa-loop-ivopts.c (split_address_cost): Check depends_on. * tree-ssa-loop-ivopts.c (split_address_cost): Check depends_on. (get_computation_cost_at): Ditto. (determine_use_iv_cost_address): Pass NULL for arguments depends_on and inv_expr_id. From-SVN: r229514 --- gcc/ChangeLog | 7 +++++++ gcc/tree-ssa-loop-ivopts.c | 13 ++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36489c595c8..39de254d757 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-10-29 Bin Cheng + + * tree-ssa-loop-ivopts.c (split_address_cost): Check depends_on. + (get_computation_cost_at): Ditto. + (determine_use_iv_cost_address): Pass NULL for arguments depends_on + and inv_expr_id. + 2015-10-28 Tom de Vries * tree-ssa-structalias.c (intra_create_variable_infos): Remove diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 945d34b4fa8..91f7284f91a 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -4328,7 +4328,9 @@ split_address_cost (struct ivopts_data *data, *symbol_present = false; *var_present = true; fd_ivopts_data = data; - walk_tree (&addr, find_depends, depends_on, NULL); + if (depends_on) + walk_tree (&addr, find_depends, depends_on, NULL); + return new_cost (target_spill_cost[data->speed], 0); } @@ -4616,7 +4618,8 @@ get_computation_cost_at (struct ivopts_data *data, ? TYPE_MODE (TREE_TYPE (*use->op_p)) : VOIDmode); - *depends_on = NULL; + if (depends_on) + *depends_on = NULL; /* Only consider real candidates. */ if (!cand->iv) @@ -4908,9 +4911,9 @@ determine_use_iv_cost_address (struct ivopts_data *data, sub_use && !infinite_cost_p (cost); sub_use = sub_use->next) { - sub_cost = get_computation_cost (data, sub_use, cand, true, &depends_on, - &can_autoinc, &inv_expr_id); - cost = add_costs (cost, sub_cost); + sub_cost = get_computation_cost (data, sub_use, cand, true, NULL, + &can_autoinc, NULL); + cost = add_costs (cost, sub_cost); } set_use_iv_cost (data, use, cand, cost, depends_on, NULL_TREE, ERROR_MARK, -- 2.30.2