diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-02-27 11:29:35 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-02-27 11:29:35 -0500 |
commit | 6680889fb778ce4c022e4edbfc618693502aad80 (patch) | |
tree | 68c379f0a9dd8c980f1ebce40570530a435a0b4a | |
parent | 0a5152d0d7e7ff30b7a581123bca3f5cc11cf436 (diff) | |
download | gcc-6680889fb778ce4c022e4edbfc618693502aad80.zip gcc-6680889fb778ce4c022e4edbfc618693502aad80.tar.gz gcc-6680889fb778ce4c022e4edbfc618693502aad80.tar.bz2 |
(qty_compare{,_1}): Give multi-word regs higher priority, as stated in
the comments.
From-SVN: r6649
-rw-r--r-- | gcc/local-alloc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index e52b035..a7b272f 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -1503,12 +1503,12 @@ qty_compare (q1, q2) times a register can occur in one insn (surely less than 100). Multiplying this by 10000 can't overflow. */ register int pri1 - = (((double) (floor_log2 (qty_n_refs[q1]) * qty_n_refs[q1]) - / ((qty_death[q1] - qty_birth[q1]) * qty_size[q1])) + = (((double) (floor_log2 (qty_n_refs[q1]) * qty_n_refs[q1] * qty_size[q1]) + / (qty_death[q1] - qty_birth[q1])) * 10000); register int pri2 - = (((double) (floor_log2 (qty_n_refs[q2]) * qty_n_refs[q2]) - / ((qty_death[q2] - qty_birth[q2]) * qty_size[q2])) + = (((double) (floor_log2 (qty_n_refs[q2]) * qty_n_refs[q2] * qty_size[q2]) + / (qty_death[q2] - qty_birth[q2])) * 10000); return pri2 - pri1; } @@ -1524,12 +1524,14 @@ qty_compare_1 (q1, q2) times a register can occur in one insn (surely less than 100). Multiplying this by 10000 can't overflow. */ register int pri1 - = (((double) (floor_log2 (qty_n_refs[*q1]) * qty_n_refs[*q1]) - / ((qty_death[*q1] - qty_birth[*q1]) * qty_size[*q1])) + = (((double) (floor_log2 (qty_n_refs[*q1]) * qty_n_refs[*q1] + * qty_size[*q1]) + / (qty_death[*q1] - qty_birth[*q1])) * 10000); register int pri2 - = (((double) (floor_log2 (qty_n_refs[*q2]) * qty_n_refs[*q2]) - / ((qty_death[*q2] - qty_birth[*q2]) * qty_size[*q2])) + = (((double) (floor_log2 (qty_n_refs[*q2]) * qty_n_refs[*q2] + * qty_size[*q2]) + / (qty_death[*q2] - qty_birth[*q2])) * 10000); tem = pri2 - pri1; |