From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106866 invoked by alias); 9 Oct 2015 09:37:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 106844 invoked by uid 89); 9 Oct 2015 09:37:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f174.google.com Received: from mail-yk0-f174.google.com (HELO mail-yk0-f174.google.com) (209.85.160.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 09 Oct 2015 09:37:44 +0000 Received: by ykec126 with SMTP id c126so36111409yke.2 for ; Fri, 09 Oct 2015 02:37:43 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.79.211 with SMTP id d202mr8373540ywb.240.1444383463058; Fri, 09 Oct 2015 02:37:43 -0700 (PDT) Received: by 10.37.93.136 with HTTP; Fri, 9 Oct 2015 02:37:42 -0700 (PDT) In-Reply-To: <5616D66A.7010906@redhat.com> References: <5616D66A.7010906@redhat.com> Date: Fri, 09 Oct 2015 09:37:00 -0000 Message-ID: Subject: Re: [PATCH] [3/n] Fix minor SSA_NAME leaks From: Richard Biener To: Jeff Law Cc: gcc-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00944.txt.bz2 On Thu, Oct 8, 2015 at 10:47 PM, Jeff Law wrote: > 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 > > commit 4d303443cc66bf32f3f045014dd22f0e475f0d50 > Author: Jeff Law > 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 > > + * 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)); I'd prefer a release_defs () call here, it works well in combination with unlink_stmt_vdef. > gsi_remove (&i, true); > gcc_assert (gsi_end_p (i)); > >