aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@arm.com>2017-05-11 09:36:05 +0000
committerBin Cheng <amker@gcc.gnu.org>2017-05-11 09:36:05 +0000
commit3770871408ac00a6f148eebfc037f7b0e6d4719e (patch)
treeac3a82a910a152a0febb274557bdda0f895fae51 /gcc
parentc544114fdece1611ab623e71483118c962047b29 (diff)
downloadgcc-3770871408ac00a6f148eebfc037f7b0e6d4719e.zip
gcc-3770871408ac00a6f148eebfc037f7b0e6d4719e.tar.gz
gcc-3770871408ac00a6f148eebfc037f7b0e6d4719e.tar.bz2
* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
From-SVN: r247887
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/tree-ssa-loop-ivopts.c13
2 files changed, 7 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e39c09d..b363799 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
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
operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
RSHIFT_EXPR and BIT_NOT_EXPR.
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 4fc0ba4..3dc6988 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