Release memory in haifa-sched
authorMartin Liska <mliska@suse.cz>
Wed, 18 Nov 2015 09:01:35 +0000 (10:01 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 18 Nov 2015 09:01:35 +0000 (09:01 +0000)
* haifa-sched.c (haifa_finish_h_i_d): Release reg_set_list.

From-SVN: r230520

gcc/ChangeLog
gcc/haifa-sched.c

index 71add6098cad25478419c067ac4e60a3246ab168..360bbc83af283e4f16983a7f8a3514c5ae0843d3 100644 (file)
@@ -1,3 +1,7 @@
+2015-11-18  Martin Liska  <mliska@suse.cz>
+
+       * haifa-sched.c (haifa_finish_h_i_d): Release reg_set_list.
+
 2015-11-18  Martin Liska  <mliska@suse.cz>
 
        * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
index e712110b2d8ba0ad04dc4ea3c4c621b7507f9d19..7443ac56cfee85b599453599abe41133cdc30d59 100644 (file)
@@ -9147,17 +9147,24 @@ haifa_finish_h_i_d (void)
 {
   int i;
   haifa_insn_data_t data;
-  struct reg_use_data *use, *next;
+  reg_use_data *use, *next_use;
+  reg_set_data *set, *next_set;
 
   FOR_EACH_VEC_ELT (h_i_d, i, data)
     {
       free (data->max_reg_pressure);
       free (data->reg_pressure);
-      for (use = data->reg_use_list; use != NULL; use = next)
+      for (use = data->reg_use_list; use != NULL; use = next_use)
        {
-         next = use->next_insn_use;
+         next_use = use->next_insn_use;
          free (use);
        }
+      for (set = data->reg_set_list; set != NULL; set = next_set)
+       {
+         next_set = set->next_insn_set;
+         free (set);
+       }
+
     }
   h_i_d.release ();
 }