+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.
if (depends_on)
*depends_on = NULL;
- /* Only consider real candidates. */
- if (!cand->iv)
- return infinite_cost;
-
cbase = cand->iv->base;
cstep = cand->iv->step;
ctype = TREE_TYPE (cbase);
enum tree_code comp = ERROR_MARK;
struct iv_use *use = group->vuses[0];
- gcc_assert (cand->iv);
-
/* Try iv elimination. */
if (may_eliminate_iv (data, use, cand, &bound, &comp))
{
unsigned cost, cost_step;
tree base;
- if (!cand->iv)
- {
- cand->cost = 0;
- return;
- }
+ gcc_assert (cand->iv != NULL);
/* There are two costs associated with the candidate -- its increment
and its initialization. The second is almost negligible for any loop
if (ivs->n_cand_uses[cid] == 0)
{
bitmap_clear_bit (ivs->cands, cid);
- /* Do not count the pseudocandidates. */
- if (cp->cand->iv)
- ivs->n_regs--;
+ ivs->n_regs--;
ivs->n_cands--;
ivs->cand_cost -= cp->cand->cost;
if (ivs->n_cand_uses[cid] == 1)
{
bitmap_set_bit (ivs->cands, cid);
- /* Do not count the pseudocandidates. */
- if (cp->cand->iv)
- ivs->n_regs++;
+ ivs->n_regs++;
ivs->n_cands++;
ivs->cand_cost += cp->cand->cost;
struct iv_group *group;
bool after = false;
- if (!cand->iv)
- return;
+ gcc_assert (cand->iv != NULL);
switch (cand->pos)
{