On 05/30/2012 02:21 PM, Richard Sandiford wrote:
The only part of IRA that uses move_costs directly is copy_cost.
It looks like this might be an oversight, since all related costs
already use ira_register_move_cost.
move_cost was from code which was part or regclass before.
As mentioned in the covering message, the two arrays are usually
the same anyway. The only hitch is that we have:
if (!move_cost[mode])
init_move_cost (mode);
so if the move costs for this mode really haven't been calculated yet,
we could potentially end up with different costs then if we used the
normal ira_init_register_move_cost_if_necessary route. In the former
case we'd use the original move_cost (before the IRA modifications),
while in the latter we'd use the value assigned by
ira_init_register_move_cost via the ira_register_move_cost alias.
Ok.