diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-30 20:03:37 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-30 20:03:37 +0000 |
commit | eefdec482d3b01c97ab6d360dbee968b9ca9c252 (patch) | |
tree | aa952727c06ed38ed797f094dd095bd14f5da5f4 /gcc/local-alloc.c | |
parent | 7572bd481e5ce1c6ea23bd61461bc3adb55ba901 (diff) | |
download | gcc-eefdec482d3b01c97ab6d360dbee968b9ca9c252.tar.gz |
* flow.c (mark_set_1): Use REG_FREQ_FROM_BB.
(attempt_auto_inc): LIkewise.
(mark_used_reg): Likewise.
(try_pre_increment_1): Likewise.
* regclass.c (regclass): Likewise.
* global.c (allocno_compare): Update comment; change scaling factor.
* local-alloc.c (QTY_CMP_PRI): Likewise.
* regs.h (REG_FREQ_FROM_BB): New.
(REG_FREQ_MAX): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44483 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/local-alloc.c')
-rw-r--r-- | gcc/local-alloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index 4424074b653..a068db8385d 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -1698,13 +1698,14 @@ block_alloc (b) /* Note that the quotient will never be bigger than the value of floor_log2 times the maximum number of - times a register can occur in one insn (surely less than 100). - Multiplying this by 10000 can't overflow. + times a register can occur in one insn (surely less than 100) + weighted by frequency (max REG_FREQ_MAX). + Multiplying this by 10000/REG_FREQ_MAX can't overflow. QTY_CMP_PRI is also used by qty_sugg_compare. */ #define QTY_CMP_PRI(q) \ ((int) (((double) (floor_log2 (qty[q].n_refs) * qty[q].freq * qty[q].size) \ - / (qty[q].death - qty[q].birth)) * 10000)) + / (qty[q].death - qty[q].birth)) * (10000 / REG_FREQ_MAX))) static int qty_compare (q1, q2) |