diff options
author | Bernd Schmidt <bernds@cygnus.co.uk> | 1999-09-16 09:55:48 +0000 |
---|---|---|
committer | Bernd Schmidt <crux@gcc.gnu.org> | 1999-09-16 09:55:48 +0000 |
commit | 2feb9704c27f0d2eb4a1381cb47eaf4b77208979 (patch) | |
tree | adbe9409b3b98d855e824cd54b8b4424a5ee0c63 /gcc/reload1.c | |
parent | 7402eca07a77af257a385144b8a4ca4e0323ef3f (diff) | |
download | gcc-2feb9704c27f0d2eb4a1381cb47eaf4b77208979.zip gcc-2feb9704c27f0d2eb4a1381cb47eaf4b77208979.tar.gz gcc-2feb9704c27f0d2eb4a1381cb47eaf4b77208979.tar.bz2 |
Bugfix in order_regs_for_reload
From-SVN: r29455
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 22533ec..57b43d92 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -4109,44 +4109,35 @@ order_regs_for_reload (chain) COPY_HARD_REG_SET (bad_spill_regs, bad_spill_regs_global); - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - { - hard_reg_n_uses[i].regno = i; - hard_reg_n_uses[i].uses = 0; - } - /* Count number of uses of each hard reg by pseudo regs allocated to it and then order them by decreasing use. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { - int j; + hard_reg_n_uses[i].regno = i; + hard_reg_n_uses[i].uses = 0; /* Test the various reasons why we can't use a register for spilling in this insn. */ if (fixed_regs[i] || REGNO_REG_SET_P (chain->live_before, i) || REGNO_REG_SET_P (chain->live_after, i)) - { - SET_HARD_REG_BIT (bad_spill_regs, i); - continue; - } + SET_HARD_REG_BIT (bad_spill_regs, i); + } - /* Now find out which pseudos are allocated to it, and update - hard_reg_n_uses. */ - CLEAR_REG_SET (pseudos_counted); + /* Now compute hard_reg_n_uses. */ + CLEAR_REG_SET (pseudos_counted); - EXECUTE_IF_SET_IN_REG_SET - (chain->live_before, FIRST_PSEUDO_REGISTER, j, - { - count_pseudo (hard_reg_n_uses, j); - }); - EXECUTE_IF_SET_IN_REG_SET - (chain->live_after, FIRST_PSEUDO_REGISTER, j, - { - count_pseudo (hard_reg_n_uses, j); - }); - } + EXECUTE_IF_SET_IN_REG_SET + (chain->live_before, FIRST_PSEUDO_REGISTER, i, + { + count_pseudo (hard_reg_n_uses, i); + }); + EXECUTE_IF_SET_IN_REG_SET + (chain->live_after, FIRST_PSEUDO_REGISTER, i, + { + count_pseudo (hard_reg_n_uses, i); + }); FREE_REG_SET (pseudos_counted); |