Hi,
This patch simplifies function autoinc_possible_for_pair by deleting
unnecessary local variables.
Is it OK?
Thanks,
bin
2017-04-11 Bin Cheng <bin.ch...@arm.com>
* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
From 09ea8cf6f542ab270ba9994f8491b926fc78237d Mon Sep 17 00:00:00 2001
From: Bin Cheng <binch...@e108451-lin.cambridge.arm.com>
Date: Wed, 1 Mar 2017 14:34:54 +0000
Subject: [PATCH 15/33] autoinc_possible_for_pair-20170220.txt
---
gcc/tree-ssa-loop-ivopts.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index c9cf9cf..4948a47 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5232,19 +5232,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
--
1.9.1