Commit 478ab26d by Vladimir Makarov Committed by Vladimir Makarov

re PR rtl-optimization/43413 (Powerpc generates worse code for -mvsx on gromacs…

re PR rtl-optimization/43413 (Powerpc generates worse code for -mvsx on gromacs even though there are no VSX instructions used)

2010-03-23  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/43413
	* ira-color.c (setup_allocno_available_regs_num): Count prohibited
	hard regs too.

From-SVN: r157676
parent b42f0d7e
2010-03-23 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/43413
* ira-color.c (setup_allocno_available_regs_num): Count prohibited
hard regs too.
2010-03-22 James E. Wilson <wilson@codesourcery.com> 2010-03-22 James E. Wilson <wilson@codesourcery.com>
PR target/43348 PR target/43348
......
...@@ -1354,7 +1354,8 @@ pop_allocnos_from_stack (void) ...@@ -1354,7 +1354,8 @@ pop_allocnos_from_stack (void)
static void static void
setup_allocno_available_regs_num (ira_allocno_t allocno) setup_allocno_available_regs_num (ira_allocno_t allocno)
{ {
int i, n, hard_regs_num; int i, n, hard_regs_num, hard_regno;
enum machine_mode mode;
enum reg_class cover_class; enum reg_class cover_class;
ira_allocno_t a; ira_allocno_t a;
HARD_REG_SET temp_set; HARD_REG_SET temp_set;
...@@ -1373,9 +1374,15 @@ setup_allocno_available_regs_num (ira_allocno_t allocno) ...@@ -1373,9 +1374,15 @@ setup_allocno_available_regs_num (ira_allocno_t allocno)
if (a == allocno) if (a == allocno)
break; break;
} }
mode = ALLOCNO_MODE (allocno);
for (n = 0, i = hard_regs_num - 1; i >= 0; i--) for (n = 0, i = hard_regs_num - 1; i >= 0; i--)
if (TEST_HARD_REG_BIT (temp_set, ira_class_hard_regs[cover_class][i])) {
n++; hard_regno = ira_class_hard_regs[cover_class][i];
if (TEST_HARD_REG_BIT (temp_set, hard_regno)
|| TEST_HARD_REG_BIT (prohibited_class_mode_regs[cover_class][mode],
hard_regno))
n++;
}
if (internal_flag_ira_verbose > 2 && n > 0 && ira_dump_file != NULL) if (internal_flag_ira_verbose > 2 && n > 0 && ira_dump_file != NULL)
fprintf (ira_dump_file, " Reg %d of %s has %d regs less\n", fprintf (ira_dump_file, " Reg %d of %s has %d regs less\n",
ALLOCNO_REGNO (allocno), reg_class_names[cover_class], n); ALLOCNO_REGNO (allocno), reg_class_names[cover_class], n);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment