From: Bin Cheng Date: Thu, 11 May 2017 09:36:05 +0000 (+0000) Subject: * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3770871408ac00a6f148eebfc037f7b0e6d4719e;p=gcc.git * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify. From-SVN: r247887 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e39c09d565d..b363799b7e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-05-11 Bin Cheng + + * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify. + 2017-05-11 Bin Cheng * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 4fc0ba4a5db..3dc6988d31d 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -5229,19 +5229,12 @@ static bool autoinc_possible_for_pair (struct ivopts_data *data, struct iv_use *use, struct iv_cand *cand) { - bitmap inv_vars; - bool can_autoinc; - comp_cost cost; - if (use->type != USE_ADDRESS) return false; - cost = get_computation_cost (data, use, cand, true, &inv_vars, - &can_autoinc, NULL); - - BITMAP_FREE (inv_vars); - - return !cost.infinite_cost_p () && can_autoinc; + bool can_autoinc = false; + get_computation_cost (data, use, cand, true, NULL, &can_autoinc, NULL); + return can_autoinc; } /* Examine IP_ORIGINAL candidates to see if they are incremented next to a