diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-10 23:21:45 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-10 23:21:45 +0000 |
commit | b7c06809df0910385638eb0b6d1a30f0a184f220 (patch) | |
tree | 7fd0254faf506029de880777901eccc09123341f /gcc/ira-build.c | |
parent | 8a4445c7a7258619444eb21659d0a1637b454635 (diff) | |
download | gcc-b7c06809df0910385638eb0b6d1a30f0a184f220.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141753 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-build.c')
-rw-r--r-- | gcc/ira-build.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ira-build.c b/gcc/ira-build.c index 8e92f8c1b3e..295825ce5f0 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -961,9 +961,10 @@ find_allocno_copy (ira_allocno_t a1, ira_allocno_t a2, rtx insn, } /* Create and return copy with given attributes LOOP_TREE_NODE, FIRST, - SECOND, FREQ, and INSN. */ + SECOND, FREQ, CONSTRAINT_P, and INSN. */ ira_copy_t -ira_create_copy (ira_allocno_t first, ira_allocno_t second, int freq, rtx insn, +ira_create_copy (ira_allocno_t first, ira_allocno_t second, int freq, + bool constraint_p, rtx insn, ira_loop_tree_node_t loop_tree_node) { ira_copy_t cp; @@ -973,6 +974,7 @@ ira_create_copy (ira_allocno_t first, ira_allocno_t second, int freq, rtx insn, cp->first = first; cp->second = second; cp->freq = freq; + cp->constraint_p = constraint_p; cp->insn = insn; cp->loop_tree_node = loop_tree_node; VEC_safe_push (ira_copy_t, heap, copy_vec, cp); @@ -1081,7 +1083,8 @@ ira_swap_allocno_copy_ends_if_necessary (ira_copy_t cp) LOOP_TREE_NODE. */ ira_copy_t ira_add_allocno_copy (ira_allocno_t first, ira_allocno_t second, int freq, - rtx insn, ira_loop_tree_node_t loop_tree_node) + bool constraint_p, rtx insn, + ira_loop_tree_node_t loop_tree_node) { ira_copy_t cp; @@ -1090,7 +1093,8 @@ ira_add_allocno_copy (ira_allocno_t first, ira_allocno_t second, int freq, cp->freq += freq; return cp; } - cp = ira_create_copy (first, second, freq, insn, loop_tree_node); + cp = ira_create_copy (first, second, freq, constraint_p, insn, + loop_tree_node); ira_assert (first != NULL && second != NULL); ira_add_allocno_copy_to_list (cp); ira_swap_allocno_copy_ends_if_necessary (cp); @@ -1101,9 +1105,11 @@ ira_add_allocno_copy (ira_allocno_t first, ira_allocno_t second, int freq, static void print_copy (FILE *f, ira_copy_t cp) { - fprintf (f, " cp%d:a%d(r%d)<->a%d(r%d)@%d\n", cp->num, + fprintf (f, " cp%d:a%d(r%d)<->a%d(r%d)@%d:%s\n", cp->num, ALLOCNO_NUM (cp->first), ALLOCNO_REGNO (cp->first), - ALLOCNO_NUM (cp->second), ALLOCNO_REGNO (cp->second), cp->freq); + ALLOCNO_NUM (cp->second), ALLOCNO_REGNO (cp->second), cp->freq, + cp->insn != NULL + ? "move" : cp->constraint_p ? "constraint" : "shuffle"); } /* Print info about copy CP into stderr. */ |