From patchwork Thu Feb 2 19:46:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: patch for PR49800 Date: Thu, 02 Feb 2012 09:46:14 -0000 From: Vladimir Makarov X-Patchwork-Id: 139200 Message-Id: <4F2AE806.6090805@redhat.com> To: gcc-patches 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 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. 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);