diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 15:15:48 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 15:15:48 +0000 |
commit | 8f6c49f5439f316279d260c2c1bb0d478cd19dcb (patch) | |
tree | cb80a649f68346c26aa9c7e3333e0ca57fbc0396 /gcc/ira-lives.c | |
parent | 3e10a823e1263be1541e1d9e91676460bb12d926 (diff) | |
download | gcc-8f6c49f5439f316279d260c2c1bb0d478cd19dcb.tar.gz |
2009-04-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/39762
* ira-int.h (ira_register_move_cost, ira_may_move_in_cost,
ira_may_move_out_cost): Add comments about way of their usage.
(ira_get_register_move_cost, ira_get_may_move_cost): New
functions.
* ira-conflicts.c (process_regs_for_copy): Use function
ira_get_register_move_cost instead of global
ira_register_move_cost.
* ira-color.c (update_copy_costs, calculate_allocno_spill_cost,
color_pass, move_spill_restore, update_curr_costs): Ditto.
* ira-lives.c (process_single_reg_class_operands): Ditto.
* ira-emit.c (emit_move_list): Ditto.
* ira-costs.c (copy_cost): Don't call ira_init_register_move_cost.
(record_reg_classes): Ditto. Use functions
ira_get_register_move_cost and ira_get_may_move_cost instead of
global vars ira_register_move_cost, ira_may_move_out_cost and
ira_may_move_in_cost.
(record_address_regs): Don't call ira_init_register_move_cost.
Use function ira_get_may_move_cost instead of global
ira_may_move_in_cost.
(process_bb_node_for_hard_reg_moves): Use function
ira_get_register_move_cost instead of global
ira_register_move_cost.
(ira_costs): Don't call ira_init_register_move_cost.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146198 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-lives.c')
-rw-r--r-- | gcc/ira-lives.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index 7ad903d2e44..4390c6fdb8c 100644 --- a/gcc/ira-lives.c +++ b/gcc/ira-lives.c @@ -782,10 +782,11 @@ process_single_reg_class_operands (bool in_p, int freq) [ira_class_hard_regs[cl][0]]) >= 0 && reg_class_size[cl] <= (unsigned) CLASS_MAX_NREGS (cl, mode)) { - /* ??? FREQ */ - cost = freq * (in_p - ? ira_register_move_cost[mode][cover_class][cl] - : ira_register_move_cost[mode][cl][cover_class]); + cost + = (freq + * (in_p + ? ira_get_register_move_cost (mode, cover_class, cl) + : ira_get_register_move_cost (mode, cl, cover_class))); ira_allocate_and_set_costs (&ALLOCNO_CONFLICT_HARD_REG_COSTS (operand_a), cover_class, 0); ALLOCNO_CONFLICT_HARD_REG_COSTS (operand_a) |