Commit 06fd3160 by Bin Cheng Committed by Bin Cheng

tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.

	* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
	(find_iv_candidates): Call relate_compare_use_with_all_cands.

From-SVN: r247890
parent 4c11bdff
2017-05-11 Bin Cheng <bin.cheng@arm.com> 2017-05-11 Bin Cheng <bin.cheng@arm.com>
* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
(find_iv_candidates): Call relate_compare_use_with_all_cands.
2017-05-11 Bin Cheng <bin.cheng@arm.com>
* tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs. * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
(dump_cand): Support iv_cand.inv_exprs. (dump_cand): Support iv_cand.inv_exprs.
(add_candidate_1): Record invariant exprs in iv_cand.inv_exprs (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
......
...@@ -5250,6 +5250,21 @@ set_autoinc_for_original_candidates (struct ivopts_data *data) ...@@ -5250,6 +5250,21 @@ set_autoinc_for_original_candidates (struct ivopts_data *data)
} }
} }
/* Relate compare use with all candidates. */
static void
relate_compare_use_with_all_cands (struct ivopts_data *data)
{
unsigned i, max_id = data->vcands.length () - 1;
for (i = 0; i < data->vgroups.length (); i++)
{
struct iv_group *group = data->vgroups[i];
if (group->type == USE_COMPARE)
bitmap_set_range (group->related_cands, 0, max_id);
}
}
/* Finds the candidates for the induction variables. */ /* Finds the candidates for the induction variables. */
static void static void
...@@ -5269,6 +5284,10 @@ find_iv_candidates (struct ivopts_data *data) ...@@ -5269,6 +5284,10 @@ find_iv_candidates (struct ivopts_data *data)
/* Record the important candidates. */ /* Record the important candidates. */
record_important_candidates (data); record_important_candidates (data);
/* Relate compare iv_use with all candidates. */
if (!data->consider_all_candidates)
relate_compare_use_with_all_cands (data);
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
{ {
unsigned i; unsigned i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment