Commit c1662028 by Bin Cheng Committed by Bin Cheng

tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo iv_cand code.

	* tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
	iv_cand code.
	(determine_group_iv_cost_cond, determine_iv_cost): Ditto.
	(iv_ca_set_no_cp, create_new_iv): Ditto.

From-SVN: r247510
parent 53685896
2017-05-02 Bin Cheng <bin.cheng@arm.com> 2017-05-02 Bin Cheng <bin.cheng@arm.com>
* tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
iv_cand code.
(determine_group_iv_cost_cond, determine_iv_cost): Ditto.
(iv_ca_set_no_cp, create_new_iv): Ditto.
2017-05-02 Bin Cheng <bin.cheng@arm.com>
* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
2017-05-02 Xi Ruoyao <ryxi@stu.xidian.edu.cn> 2017-05-02 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
......
...@@ -4845,10 +4845,6 @@ get_computation_cost_at (struct ivopts_data *data, ...@@ -4845,10 +4845,6 @@ get_computation_cost_at (struct ivopts_data *data,
if (depends_on) if (depends_on)
*depends_on = NULL; *depends_on = NULL;
/* Only consider real candidates. */
if (!cand->iv)
return infinite_cost;
cbase = cand->iv->base; cbase = cand->iv->base;
cstep = cand->iv->step; cstep = cand->iv->step;
ctype = TREE_TYPE (cbase); ctype = TREE_TYPE (cbase);
...@@ -5568,8 +5564,6 @@ determine_group_iv_cost_cond (struct ivopts_data *data, ...@@ -5568,8 +5564,6 @@ determine_group_iv_cost_cond (struct ivopts_data *data,
enum tree_code comp = ERROR_MARK; enum tree_code comp = ERROR_MARK;
struct iv_use *use = group->vuses[0]; struct iv_use *use = group->vuses[0];
gcc_assert (cand->iv);
/* Try iv elimination. */ /* Try iv elimination. */
if (may_eliminate_iv (data, use, cand, &bound, &comp)) if (may_eliminate_iv (data, use, cand, &bound, &comp))
{ {
...@@ -5898,11 +5892,7 @@ determine_iv_cost (struct ivopts_data *data, struct iv_cand *cand) ...@@ -5898,11 +5892,7 @@ determine_iv_cost (struct ivopts_data *data, struct iv_cand *cand)
unsigned cost, cost_step; unsigned cost, cost_step;
tree base; tree base;
if (!cand->iv) gcc_assert (cand->iv != NULL);
{
cand->cost = 0;
return;
}
/* There are two costs associated with the candidate -- its increment /* There are two costs associated with the candidate -- its increment
and its initialization. The second is almost negligible for any loop and its initialization. The second is almost negligible for any loop
...@@ -6123,9 +6113,7 @@ iv_ca_set_no_cp (struct ivopts_data *data, struct iv_ca *ivs, ...@@ -6123,9 +6113,7 @@ iv_ca_set_no_cp (struct ivopts_data *data, struct iv_ca *ivs,
if (ivs->n_cand_uses[cid] == 0) if (ivs->n_cand_uses[cid] == 0)
{ {
bitmap_clear_bit (ivs->cands, cid); bitmap_clear_bit (ivs->cands, cid);
/* Do not count the pseudocandidates. */ ivs->n_regs--;
if (cp->cand->iv)
ivs->n_regs--;
ivs->n_cands--; ivs->n_cands--;
ivs->cand_cost -= cp->cand->cost; ivs->cand_cost -= cp->cand->cost;
...@@ -6189,9 +6177,7 @@ iv_ca_set_cp (struct ivopts_data *data, struct iv_ca *ivs, ...@@ -6189,9 +6177,7 @@ iv_ca_set_cp (struct ivopts_data *data, struct iv_ca *ivs,
if (ivs->n_cand_uses[cid] == 1) if (ivs->n_cand_uses[cid] == 1)
{ {
bitmap_set_bit (ivs->cands, cid); bitmap_set_bit (ivs->cands, cid);
/* Do not count the pseudocandidates. */ ivs->n_regs++;
if (cp->cand->iv)
ivs->n_regs++;
ivs->n_cands++; ivs->n_cands++;
ivs->cand_cost += cp->cand->cost; ivs->cand_cost += cp->cand->cost;
...@@ -7076,8 +7062,7 @@ create_new_iv (struct ivopts_data *data, struct iv_cand *cand) ...@@ -7076,8 +7062,7 @@ create_new_iv (struct ivopts_data *data, struct iv_cand *cand)
struct iv_group *group; struct iv_group *group;
bool after = false; bool after = false;
if (!cand->iv) gcc_assert (cand->iv != NULL);
return;
switch (cand->pos) switch (cand->pos)
{ {
......
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