From patchwork Tue Jun 25 08:03:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= X-Patchwork-Id: 1951979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=kolabnow.com header.i=@kolabnow.com header.a=rsa-sha256 header.s=dkim20240523 header.b=jgsKPyFi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W7cmY6r8bz20X6 for ; Tue, 25 Jun 2024 18:04:13 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 44CBF384514A for ; Tue, 25 Jun 2024 08:04:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx.kolabnow.com (mx.kolabnow.com [212.103.80.155]) by sourceware.org (Postfix) with ESMTPS id 79E763857000 for ; Tue, 25 Jun 2024 08:03:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 79E763857000 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lambda.is Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lambda.is ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 79E763857000 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.103.80.155 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719302625; cv=none; b=Ss9AzZh1pLloweVzR/1qKI49J4LVUdTbzc5GTc4CfOH3UJweQDqvUaCdd5hVFQk95pcfUBa8heEuzeGDTf5fc60oFZDYKQISVuH/vKYRPA9cOR4Op/IdBeWLcKXLfx6Mi/7B5iynRNQTuU1mA0TpGc2uemjkaDDv6ewsa+PQ6ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719302625; c=relaxed/simple; bh=knctxGc+YgXH+QyIiVTtSvtLNcaR0P+Oo0Q0OP6Kdno=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=u08VnzKweK55AI6qkcbqq+deKP9FSoL/wpTOKpVifoLXG1IZkDnMPs1qTrnvp7QH/ynrRKbZDt/5m+ePgvol+Qj1fNfPkIHVNcCh9gzQtKvbx+2g0i+mA0InzuYVpSwscLgNeJ596/iPDnNSURdc6/VDFkuUjKhgYgA3oc2Ix4E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 69C2F20D136E; Tue, 25 Jun 2024 10:03:42 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20240523; t=1719302621; x=1721117022; bh=RiVW4tsGhksajxInAT1csXd+wFOOgsK0HOQEgDMqk58=; b=jgsKPyFi3eBE a0wdXhcjIgeaWYQMmmZIAcO/012fr9uRVEirV2yxR3Kob/XcDA54RTAv9HZ74bJn N221W3CRCj23q8xZPAuQJ6n+WRciLhGvZIBB1MWDVI7Q6SoEhOSXT5e8Pm9bECmU DcQU07RV42CSxonmZm8EkibruOhzUbmtgN05aeUze17YeMqaXueYn4jQKPmm/RFt kB9jgHUiTSns7zzKESmCcVYG95O9aaTBEu4W8ILxwS26o6fj/35rQBmirxdYPPjn ErdbRMdfzvId2ntjeqf8/TlLEWyOLbO7tmXzyWfXm8qBFPi9nN37u9WGueByhJ6G nZgecgaafQ== X-Virus-Scanned: amavis at mykolab.com X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id zqd56tz1SeVX; Tue, 25 Jun 2024 10:03:41 +0200 (CEST) Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id A030320D1348; Tue, 25 Jun 2024 10:03:41 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id 66E5832F126A; Tue, 25 Jun 2024 10:03:41 +0200 (CEST) From: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= To: gcc-patches@gcc.gnu.org Cc: hubicka@ucw.cz, =?utf-8?q?J=C3=B8rgen_Kvalsvik?= Subject: [PATCH 1/3] Release structures on function return Date: Tue, 25 Jun 2024 10:03:30 +0200 Message-Id: <20240625080332.1517736-2-j@lambda.is> In-Reply-To: <20240625080332.1517736-1-j@lambda.is> References: <20240625080332.1517736-1-j@lambda.is> MIME-Version: 1.0 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org The value vec objects are destroyed on exit, but release still needs to be called explicitly. gcc/ChangeLog: * tree-profile.cc (find_conditions): Release vectors before return. --- gcc/tree-profile.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc index e4bb689cef5..18f48e8d04e 100644 --- a/gcc/tree-profile.cc +++ b/gcc/tree-profile.cc @@ -919,6 +919,9 @@ find_conditions (struct function *fn) if (!have_post_dom) free_dominance_info (fn, CDI_POST_DOMINATORS); + for (auto expr : exprs) + expr.second.release (); + cov->m_masks.safe_grow_cleared (2 * cov->m_index.last ()); const size_t length = cov_length (cov); for (size_t i = 0; i != length; i++)