diff mbox

RFA: patch to solve PR 48331 and PR 48334 in IRA

Message ID 4D923906.5030502@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov March 29, 2011, 7:54 p.m. UTC
The following patch solves PR 48331 and PR 48334.  The problem was in 
that allocno profitable hard regs were not set up for priority colouring 
and function assign_hard_reg used a garbage in its decisions generating 
wrong code or code of awful quality.

Is it ok to commit?

2011-03-29  Vladimir Makarov <vmakarov@redhat.com>

         PR rtl-optimization/48331
         PR rtl-optimization/48334
         * ira-color.c (color_allocnos): Call setup_profitable_hard_regs
         for any used algorithm.

Comments

Bernd Schmidt March 29, 2011, 8:35 p.m. UTC | #1
On 03/29/2011 09:54 PM, Vladimir Makarov wrote:
> The following patch solves PR 48331 and PR 48334.  The problem was in
> that allocno profitable hard regs were not set up for priority colouring
> and function assign_hard_reg used a garbage in its decisions generating
> wrong code or code of awful quality.
> 
> Is it ok to commit?

Ok.


Bernd
diff mbox

Patch

Index: ira-color.c
===================================================================
--- ira-color.c	(revision 171682)
+++ ira-color.c	(working copy)
@@ -2590,6 +2590,7 @@  color_allocnos (void)
   bitmap_iterator bi;
   ira_allocno_t a;
 
+  setup_profitable_hard_regs ();
   if (flag_ira_algorithm == IRA_ALGORITHM_PRIORITY)
     {
       n = 0;
@@ -2642,7 +2643,6 @@  color_allocnos (void)
     }
   else
     {
-      setup_profitable_hard_regs ();
       form_object_hard_regs_nodes_forest ();
       if (internal_flag_ira_verbose > 2 && ira_dump_file != NULL)
 	print_hard_regs_forest (ira_dump_file);