diff options
author | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-14 11:15:07 +0000 |
---|---|---|
committer | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-14 11:15:07 +0000 |
commit | 936f065ecc891b03ff28f25812fa0034dd3ef30b (patch) | |
tree | c312e16ce6b9a6f91c31c5f01153939357b955af /gcc/sel-sched.c | |
parent | ba1fc7599ce440264c497c5e91ac894dd4297990 (diff) | |
download | gcc-936f065ecc891b03ff28f25812fa0034dd3ef30b.tar.gz |
2010-01-14 Alexander Monakov <amonakov@ispras.ru>
* sel-sched.c (choose_best_reg_1): Loop over all regs for mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155897 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched.c')
-rw-r--r-- | gcc/sel-sched.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 7fb08828b97..bdc7f9c42bc 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -1429,6 +1429,16 @@ choose_best_reg_1 (HARD_REG_SET hard_regs_used, 0, cur_reg, hrsi) if (! TEST_HARD_REG_BIT (hard_regs_used, cur_reg)) { + /* Check that all hard regs for mode are available. */ + for (i = 1, n = hard_regno_nregs[cur_reg][mode]; i < n; i++) + if (TEST_HARD_REG_BIT (hard_regs_used, cur_reg + i) + || !TEST_HARD_REG_BIT (reg_rename_p->available_for_renaming, + cur_reg + i)) + break; + + if (i < n) + continue; + /* All hard registers are available. */ if (best_new_reg < 0 || reg_rename_tick[cur_reg] < reg_rename_tick[best_new_reg]) @@ -1460,6 +1470,7 @@ choose_best_reg (HARD_REG_SET hard_regs_used, struct reg_rename *reg_rename_p, rtx best_reg = choose_best_reg_1 (hard_regs_used, reg_rename_p, original_insns, is_orig_reg_p_ptr); + /* FIXME loop over hard_regno_nregs here. */ gcc_assert (best_reg == NULL_RTX || TEST_HARD_REG_BIT (sel_hrd.regs_ever_used, REGNO (best_reg))); |