]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
authorBin Cheng <bin.cheng@arm.com>
Thu, 11 May 2017 09:36:05 +0000 (09:36 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Thu, 11 May 2017 09:36:05 +0000 (09:36 +0000)
From-SVN: r247887

gcc/ChangeLog
gcc/tree-ssa-loop-ivopts.c

index e39c09d565d5e377573690d1b974d6baadbdc790..b363799b7e268cd36fc1cea1736c450c86ddb085 100644 (file)
@@ -1,3 +1,7 @@
+2017-05-11  Bin Cheng  <bin.cheng@arm.com>
+
+       * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
+
 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
 
        * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
index 4fc0ba4a5db91c623e01fdc32e6589d125ad9b04..3dc6988d31db116efa6ca91aed78ac0551b8745b 100644 (file)
@@ -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