diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2008-11-10 23:21:45 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2008-11-10 23:21:45 +0000 |
commit | 548a63222ed9b9e8de3503388d64366121ba621d (patch) | |
tree | 7fd0254faf506029de880777901eccc09123341f /gcc/ira-conflicts.c | |
parent | befc25099bbedd2d49f23f929b6c441894c8cb5c (diff) | |
download | gcc-548a63222ed9b9e8de3503388d64366121ba621d.zip gcc-548a63222ed9b9e8de3503388d64366121ba621d.tar.gz gcc-548a63222ed9b9e8de3503388d64366121ba621d.tar.bz2 |
re PR rtl-optimization/37948 (IRA generates slower code)
2008-11-07 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimizations/37948
* ira-int.h (struct ira_allocno_copy): New member constraint_p.
(ira_create_copy, ira_add_allocno_copy): New parameter.
* ira-conflicts.c (process_regs_for_copy): New parameter. Pass it
to ira_add_allocno_copy.
(process_reg_shuffles, add_insn_allocno_copies): Pass a new
parameter to process_regs_for_copy.
(propagate_copies): Pass a new parameter to ira_add_allocno_copy.
Fix typo in passing second allocno to ira_add_allocno_copy.
* ira-color.c (update_conflict_hard_regno_costs): Use head of
coalesced allocnos list.
(assign_hard_reg): Ditto. Check that assigned allocnos are not in
the graph.
(add_ira_allocno_to_bucket): Rename to add_allocno_to_bucket.
(add_ira_allocno_to_ordered_bucket): Rename to
add_allocno_to_ordered_bucket.
(push_ira_allocno_to_stack): Rename to push_allocno_to_stack. Use
head of coalesced allocnos list.
(push_allocnos_to_stack): Remove calculation of ALLOCNO_TEMP.
Check that it is aready calculated.
(push_ira_allocno_to_spill): Rename to push_ira_allocno_to_spill.
(setup_allocno_left_conflicts_num): Use head of coalesced allocnos
list.
(coalesce_allocnos): Do extended coalescing too.
* ira-emit.c (add_range_and_copies_from_move_list): Pass a new
parameter to ira_add_allocno_copy.
* ira-build.c (ira_create_copy, ira_add_allocno_copy): Add a new
parameter.
(print_copy): Print copy origination too.
* ira-costs.c (scan_one_insn): Use alloc_pref for load from
equivalent memory.
From-SVN: r141753
Diffstat (limited to 'gcc/ira-conflicts.c')
-rw-r--r-- | gcc/ira-conflicts.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c index 01ba907..66376b6 100644 --- a/gcc/ira-conflicts.c +++ b/gcc/ira-conflicts.c @@ -329,7 +329,8 @@ go_through_subreg (rtx x, int *offset) registers. When nothing is changed, the function returns FALSE. */ static bool -process_regs_for_copy (rtx reg1, rtx reg2, rtx insn, int freq) +process_regs_for_copy (rtx reg1, rtx reg2, bool constraint_p, + rtx insn, int freq) { int allocno_preferenced_hard_regno, cost, index, offset1, offset2; bool only_regs_p; @@ -363,7 +364,8 @@ process_regs_for_copy (rtx reg1, rtx reg2, rtx insn, int freq) { cp = ira_add_allocno_copy (ira_curr_regno_allocno_map[REGNO (reg1)], ira_curr_regno_allocno_map[REGNO (reg2)], - freq, insn, ira_curr_loop_tree_node); + freq, constraint_p, insn, + ira_curr_loop_tree_node); bitmap_set_bit (ira_curr_loop_tree_node->local_copies, cp->num); return true; } @@ -426,7 +428,7 @@ process_reg_shuffles (rtx reg, int op_num, int freq) || recog_data.operand_type[i] != OP_OUT) continue; - process_regs_for_copy (reg, another_reg, NULL_RTX, freq); + process_regs_for_copy (reg, another_reg, false, NULL_RTX, freq); } } @@ -451,7 +453,7 @@ add_insn_allocno_copies (rtx insn) REG_P (SET_SRC (set)) ? SET_SRC (set) : SUBREG_REG (SET_SRC (set))) != NULL_RTX) - process_regs_for_copy (SET_DEST (set), SET_SRC (set), insn, freq); + process_regs_for_copy (SET_DEST (set), SET_SRC (set), false, insn, freq); else { extract_insn (insn); @@ -470,7 +472,8 @@ add_insn_allocno_copies (rtx insn) for (j = 0, commut_p = false; j < 2; j++, commut_p = true) if ((dup = get_dup (i, commut_p)) != NULL_RTX && REG_SUBREG_P (dup) - && process_regs_for_copy (operand, dup, NULL_RTX, freq)) + && process_regs_for_copy (operand, dup, true, + NULL_RTX, freq)) bound_p = true; if (bound_p) continue; @@ -524,8 +527,8 @@ propagate_copies (void) parent_a2 = parent->regno_allocno_map[ALLOCNO_REGNO (a2)]; ira_assert (parent_a1 != NULL && parent_a2 != NULL); if (! CONFLICT_ALLOCNO_P (parent_a1, parent_a2)) - ira_add_allocno_copy (parent_a1, parent_a1, cp->freq, - cp->insn, cp->loop_tree_node); + ira_add_allocno_copy (parent_a1, parent_a2, cp->freq, + cp->constraint_p, cp->insn, cp->loop_tree_node); } } |