diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-14 01:56:32 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-14 01:56:32 +0000 |
commit | e320331a89f5f023ceace316431a091bd6077101 (patch) | |
tree | bf075ab760c9643d5d25be8ef2552f0bf9631b4a /gcc/ira.c | |
parent | 9d53e3727a6846b77e6033aab12064611e085ff7 (diff) | |
download | gcc-e320331a89f5f023ceace316431a091bd6077101.tar.gz |
* ira-int.h (ira_object_conflict_iterator): Rename from
ira_allocno_conflict_iterator.
(ira_object_conflict_iter_init): Rename from
ira_allocno_conflict_iter_init, second arg changed to
* ira.c (check_allocation): Use FOR_EACH_OBJECT_CONFLICT rather than
FOR_EACH_ALLOCNO_CONFLICT.
* ira-color.c (assign_hard_reg, push_allocno_to_stack)
setup_allocno_left_conflicts_size, coalesced_allocno_conflict_p,
ira_reassign_conflict_allocnos, ira_reassign_pseudos): Likewise.
* ira-conflicts.c (print_allocno_conflicts): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/gcc/ira.c b/gcc/ira.c index 08a333362c9..943b06bd391 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -1609,33 +1609,40 @@ calculate_allocation_cost (void) static void check_allocation (void) { - ira_allocno_t a, conflict_a; - int hard_regno, conflict_hard_regno, nregs, conflict_nregs; - ira_allocno_conflict_iterator aci; + ira_allocno_t a; + int hard_regno, nregs; ira_allocno_iterator ai; FOR_EACH_ALLOCNO (a, ai) { + ira_object_t obj, conflict_obj; + ira_object_conflict_iterator oci; + if (ALLOCNO_CAP_MEMBER (a) != NULL || (hard_regno = ALLOCNO_HARD_REGNO (a)) < 0) continue; nregs = hard_regno_nregs[hard_regno][ALLOCNO_MODE (a)]; - FOR_EACH_ALLOCNO_CONFLICT (a, conflict_a, aci) - if ((conflict_hard_regno = ALLOCNO_HARD_REGNO (conflict_a)) >= 0) - { - conflict_nregs - = (hard_regno_nregs - [conflict_hard_regno][ALLOCNO_MODE (conflict_a)]); - if ((conflict_hard_regno <= hard_regno - && hard_regno < conflict_hard_regno + conflict_nregs) - || (hard_regno <= conflict_hard_regno - && conflict_hard_regno < hard_regno + nregs)) - { - fprintf (stderr, "bad allocation for %d and %d\n", - ALLOCNO_REGNO (a), ALLOCNO_REGNO (conflict_a)); - gcc_unreachable (); - } - } + obj = ALLOCNO_OBJECT (a); + FOR_EACH_OBJECT_CONFLICT (obj, conflict_obj, oci) + { + ira_allocno_t conflict_a = OBJECT_ALLOCNO (conflict_obj); + int conflict_hard_regno = ALLOCNO_HARD_REGNO (conflict_a); + if (conflict_hard_regno >= 0) + { + int conflict_nregs + = (hard_regno_nregs + [conflict_hard_regno][ALLOCNO_MODE (conflict_a)]); + if ((conflict_hard_regno <= hard_regno + && hard_regno < conflict_hard_regno + conflict_nregs) + || (hard_regno <= conflict_hard_regno + && conflict_hard_regno < hard_regno + nregs)) + { + fprintf (stderr, "bad allocation for %d and %d\n", + ALLOCNO_REGNO (a), ALLOCNO_REGNO (conflict_a)); + gcc_unreachable (); + } + } + } } } #endif |