diff options
author | Martin Liska <mliska@suse.cz> | 2015-11-18 10:01:35 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2015-11-18 09:01:35 +0000 |
commit | 36fb33de4830007d79ae302896536736534e0872 (patch) | |
tree | 52bc452a1018297216c369a5786ac6cf35f33c31 /gcc/haifa-sched.c | |
parent | a4f0c29da8489f5c1f83597edfc77c65cb59858c (diff) | |
download | gcc-36fb33de4830007d79ae302896536736534e0872.tar.gz |
Release memory in haifa-sched
* haifa-sched.c (haifa_finish_h_i_d): Release reg_set_list.
From-SVN: r230520
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index e712110b2d8..7443ac56cfe 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -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 (); } |