diff mbox

patch for PR49800

Message ID 4F2AE806.6090805@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Feb. 2, 2012, 7:46 p.m. UTC
The following patch solves PR49800 which is described on 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49800.

The patch was successfully bootstrapped on x86/x86-64.

Committed as rev. 183843.

2012-02-02  Vladimir Makarov <vmakarov@redhat.com>

         PR rtl-optimization/49800
         * haifa-sched.c (sched_init): Call regstat_init_n_sets_and_refs.
         (sched_finish): Call regstat_free_n_sets_and_refs.
diff mbox

Patch

Index: haifa-sched.c
===================================================================
--- haifa-sched.c	(revision 183839)
+++ haifa-sched.c	(working copy)
@@ -4835,6 +4835,10 @@  sched_init (void)
     {
       int i, max_regno = max_reg_num ();
 
+      if (sched_dump != NULL)
+	/* We need info about pseudos for rtl dumps about pseudo
+	   classes and costs.  */
+	regstat_init_n_sets_and_refs ();
       ira_set_pseudo_classes (sched_verbose ? sched_dump : NULL);
       sched_regno_pressure_class
 	= (enum reg_class *) xmalloc (max_regno * sizeof (enum reg_class));
@@ -4946,6 +4950,8 @@  sched_finish (void)
   haifa_finish_h_i_d ();
   if (sched_pressure_p)
     {
+      if (regstat_n_sets_and_refs != NULL)
+	regstat_free_n_sets_and_refs ();
       free (sched_regno_pressure_class);
       BITMAP_FREE (region_ref_regs);
       BITMAP_FREE (saved_reg_live);