public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [3/n] Fix minor SSA_NAME leaks
@ 2015-10-08 20:47 Jeff Law
  2015-10-09  9:37 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2015-10-08 20:47 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

And other minor leak.  This time in tree-stdarg.  Unlike other cases, 
we're dropping just the virtual definition, other definitions on the 
statement need to be preserved (they're going to be re-used). 
Additionally, this one is missing the call to unlink_stmt_vdef.

Like other cases, I've got a minimized test, but no good way to add it 
to the testsuite right now.

Bootstrapped and regression tested on x86_64-linux-gnu.  Installed on 
the trunk.

Jeff

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1039 bytes --]

commit 4d303443cc66bf32f3f045014dd22f0e475f0d50
Author: Jeff Law <law@redhat.com>
Date:   Thu Oct 8 14:46:03 2015 -0600

    [PATCH] [3/n] Fix minor SSA_NAME leaks
    
    	* tree-stdarg.c (expand_ifn_va_arg_1): Add missing call to
    	unlink_stmt_vdef and release_ssa_name_fn.

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 64309c1..31e2f30 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
 2015-10-08  Jeff Law  <law@redhat.com>
 
+	* tree-stdarg.c (expand_ifn_va_arg_1): Add missing call to
+	unlink_stmt_vdef and release_ssa_name_fn.
+
 	* tree-ssa-dse.c (dse_optimize_stmt): Add missing call to
 	release_defs.
 
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index d69fa06..3e6d98c 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -1080,6 +1080,8 @@ expand_ifn_va_arg_1 (function *fun)
 
 	/* Remove the IFN_VA_ARG gimple_call.  It's the last stmt in the
 	   bb.  */
+	unlink_stmt_vdef (stmt);
+	release_ssa_name_fn (fun, gimple_vdef (stmt));
 	gsi_remove (&i, true);
 	gcc_assert (gsi_end_p (i));
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-09 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-08 20:47 [PATCH] [3/n] Fix minor SSA_NAME leaks Jeff Law
2015-10-09  9:37 ` Richard Biener
2015-10-09 15:15   ` Jeff Law

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).