&& (note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != NULL_RTX
&& ((MEM_P (XEXP (note, 0)))
|| (CONSTANT_P (XEXP (note, 0))
- && LEGITIMATE_CONSTANT_P (XEXP (note, 0))
+ && targetm.legitimate_constant_p (GET_MODE (SET_DEST (set)),
+ XEXP (note, 0))
&& REG_N_SETS (REGNO (SET_DEST (set))) == 1)))
{
enum reg_class cl = GENERAL_REGS;
i_costs[k] += add_cost;
}
add_cost = COSTS (costs, a_num)->mem_cost;
- if (add_cost && INT_MAX - add_cost < i_mem_cost)
+ if (add_cost > 0 && INT_MAX - add_cost < i_mem_cost)
i_mem_cost = INT_MAX;
else
i_mem_cost += add_cost;
}
}
if (equiv_savings < 0)
- temp_costs->mem_cost = -equiv_savings;
+ i_mem_cost = -equiv_savings;
else if (equiv_savings > 0)
{
- temp_costs->mem_cost = 0;
+ i_mem_cost = 0;
for (k = cost_classes_ptr->num - 1; k >= 0; k--)
i_costs[k] += equiv_savings;
}
ALLOCNO_HARD_REG_COSTS (a)[i] -= cost;
ALLOCNO_CONFLICT_HARD_REG_COSTS (a)[i] -= cost;
ALLOCNO_CLASS_COST (a) = MIN (ALLOCNO_CLASS_COST (a),
- ALLOCNO_HARD_REG_COSTS (a)[i]);
+ ALLOCNO_HARD_REG_COSTS (a)[i]);
}
}
{
int i;
- if (init_cost != NULL)
- free (init_cost);
+ free (init_cost);
init_cost = NULL;
for (i = 0; i < MAX_RECOG_OPERANDS; i++)
{
- if (op_costs[i] != NULL)
- free (op_costs[i]);
- if (this_op_costs[i] != NULL)
- free (this_op_costs[i]);
+ free (op_costs[i]);
+ free (this_op_costs[i]);
op_costs[i] = this_op_costs[i] = NULL;
}
- if (temp_costs != NULL)
- free (temp_costs);
+ free (temp_costs);
temp_costs = NULL;
}