public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Fix memory leaks.
@ 2021-12-08 18:37 Martin Liska
0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2021-12-08 18:37 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:129bee1bdd8c50e6f5e122d6713494b3665b8dde
commit 129bee1bdd8c50e6f5e122d6713494b3665b8dde
Author: Martin Liska <mliska@suse.cz>
Date: Wed Dec 8 19:37:02 2021 +0100
Fix memory leaks.
Diff:
---
gcc/tree-ssa-loop-unswitch.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 961c6f20478..dac859ad1e5 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -210,6 +210,7 @@ init_loop_unswitch_info (class loop *loop,
set_predicates_for_bb (bbs[i], candidates);
else
{
+ candidates.release ();
gimple *last = last_stmt (bbs[i]);
if (last != NULL)
gimple_set_uid (last, 0);
@@ -248,7 +249,16 @@ tree_ssa_unswitch_loops (void)
predicate_path.create (8);
changed |= tree_unswitch_single_loop (loop, 0, predicate_path,
budget, ignored_edge_flag);
+ predicate_path.release ();
+ for (auto predlist: bb_predicates)
+ {
+ for (auto predicate: predlist)
+ delete predicate;
+ predlist.release ();
+ }
+
+ bb_predicates->release ();
delete bb_predicates;
bb_predicates = NULL;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Fix memory leaks.
@ 2021-12-09 12:49 Martin Liska
0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2021-12-09 12:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:589094d78e42b87fc28a1385bf56fb630602e3c7
commit 589094d78e42b87fc28a1385bf56fb630602e3c7
Author: Martin Liska <mliska@suse.cz>
Date: Wed Dec 8 19:37:02 2021 +0100
Fix memory leaks.
Diff:
---
gcc/tree-ssa-loop-unswitch.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 961c6f20478..dac859ad1e5 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -210,6 +210,7 @@ init_loop_unswitch_info (class loop *loop,
set_predicates_for_bb (bbs[i], candidates);
else
{
+ candidates.release ();
gimple *last = last_stmt (bbs[i]);
if (last != NULL)
gimple_set_uid (last, 0);
@@ -248,7 +249,16 @@ tree_ssa_unswitch_loops (void)
predicate_path.create (8);
changed |= tree_unswitch_single_loop (loop, 0, predicate_path,
budget, ignored_edge_flag);
+ predicate_path.release ();
+ for (auto predlist: bb_predicates)
+ {
+ for (auto predicate: predlist)
+ delete predicate;
+ predlist.release ();
+ }
+
+ bb_predicates->release ();
delete bb_predicates;
bb_predicates = NULL;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-09 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 18:37 [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Fix memory leaks Martin Liska
2021-12-09 12:49 Martin Liska
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).