From patchwork Mon Nov 23 13:48:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 547541 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A472B1402B0 for ; Tue, 24 Nov 2015 00:53:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=FIfNImx0; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-to:resent-date:resent-message-id:message-id :in-reply-to:references:from:date:subject:to; q=dns; s=default; b= v8YRk2VHQkmAuR3gtSGSElvT36/M2EiLh6wk4/OYaV6CIB5e8WsOWrpq2GnAYlgk ZBhcslmXTEegJ4JAFnODpzEHZY4ZRDJm9tM2b3H5Cfz1NEEiqxUdQc2UyZZJFvAV M6gP/q39Sm5q9FWhYkXnkgvb2vO6NaJqGyt3lSPN+JA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-to:resent-date:resent-message-id:message-id :in-reply-to:references:from:date:subject:to; s=default; bh=Tgql KffsVR88kf5ywVHzu4e6zg0=; b=FIfNImx0wM4mdipgR2B9xxdZFGEQHQNV5mkQ bqdtMvdjDUwEFzXNy9bw6NdPfHYB0lrbCoiG38jkkIb+MoT9ASRJ+AjYwxuZpCDf X4jCsEwE1TrixNMrbqEe7nQdVjh6wp2tdNZiEckQhQIMjwIomnmNxxXKWADesi9f A/koC0U= Received: (qmail 100286 invoked by alias); 23 Nov 2015 13:52:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 99957 invoked by uid 89); 23 Nov 2015 13:52:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_00, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 23 Nov 2015 13:52:09 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0rXH-0004eZ-Jo for gcc-patches@gcc.gnu.org; Mon, 23 Nov 2015 08:52:06 -0500 Received: from mx2.suse.de ([195.135.220.15]:48203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0rXH-0004eN-Dz for gcc-patches@gcc.gnu.org; Mon, 23 Nov 2015 08:52:03 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DB923AD41 for ; Mon, 23 Nov 2015 13:50:54 +0000 (UTC) Resent-From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Resent-To: GCC Patches Resent-Date: Mon, 23 Nov 2015 14:52:01 +0100 Resent-Message-ID: <56531A01.9030702@suse.cz> Resent-User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 Message-Id: <2a624b32b2ac05134c1958728c81362c5b653426.1448286565.git.mliska@suse.cz> In-Reply-To: References: From: marxin Date: Mon, 23 Nov 2015 14:48:40 +0100 Subject: [PATCH 4/6] Fix memory leak in loop_vec_info To: gcc-patches@gcc.gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-IsSubscribed: yes gcc/ChangeLog: 2015-11-23 Martin Liska * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Do not release memory for comp_alias_ddrs. * tree-vect-loop.c (destroy_loop_vec_info): Release the memory for all loop_vec_info. --- gcc/tree-vect-loop-manip.c | 2 -- gcc/tree-vect-loop.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index c96e196..226b88f 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -2284,8 +2284,6 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, tree * cond_expr) dump_printf_loc (MSG_NOTE, vect_location, "created %u versioning for alias checks.\n", comp_alias_ddrs.length ()); - - comp_alias_ddrs.release (); } diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 41e5031..8f39578 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -1179,6 +1179,7 @@ destroy_loop_vec_info (loop_vec_info loop_vinfo, bool clean_stmts) free_dependence_relations (LOOP_VINFO_DDRS (loop_vinfo)); LOOP_VINFO_LOOP_NEST (loop_vinfo).release (); LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo).release (); + LOOP_VINFO_COMP_ALIAS_DDRS (loop_vinfo).release (); LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo).release (); slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo); FOR_EACH_VEC_ELT (slp_instances, j, instance)