From patchwork Sun Jul 12 15:53:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 494135 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 ADC7C1402BC for ; Mon, 13 Jul 2015 01:54:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=WCuU35wb; 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 :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=fP98wS3NOGfBeUdo+ qEYjSgjwdwgRYR4Ii2QWYjJZtJ8Ja3XZZ2wv/CTEtEV9RsKdOcB+vRW3HUhMx0jf +GEvsPLNfAvb5KFO8JKH45B0o0dzknDb0Vx5fQJJI7NW0BSWqYRkgYxhf3PpDx2m YSPIk18c8Fj7OqiVm2V2s0Xmkw= 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 :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=L30GQdpg9gDoYFaXfuWkq3t FRFI=; b=WCuU35wbnMk6Wf+eeAYI6Z7o1unVwcnpP/BeHBvrgILvP6ioqqS3Z2Y xY0J/IJkD6kvux0kiLYp9qgSupk+Z9bwCcVHW3q2jdRn0owq/7hXAnRo4MnGQoiB G/Jikdu/C7ff+lLsqr8EhvFcg53D88SxVNeILCxuxiNhRothQyKw= Received: (qmail 14370 invoked by alias); 12 Jul 2015 15:54:20 -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 14357 invoked by uid 89); 12 Jul 2015 15:54:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 12 Jul 2015 15:54:18 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37776) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ZEJa4-0000Wv-A0 for gcc-patches@gnu.org; Sun, 12 Jul 2015 11:54:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEJZy-0004Ns-Vl for gcc-patches@gnu.org; Sun, 12 Jul 2015 11:54:15 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:53121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEJZy-0004Ni-Pr for gcc-patches@gnu.org; Sun, 12 Jul 2015 11:54:10 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZEJZx-0002yn-Um from Tom_deVries@mentor.com for gcc-patches@gnu.org; Sun, 12 Jul 2015 08:54:10 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Sun, 12 Jul 2015 16:53:16 +0100 Message-ID: <55A28D67.7010001@mentor.com> Date: Sun, 12 Jul 2015 17:53:11 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "gcc-patches@gnu.org" Subject: [PATCH 4/5] Downgrade value_expr_for_decl to non-cache References: <55A28B9E.1030706@mentor.com> In-Reply-To: <55A28B9E.1030706@mentor.com> X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 On 12/07/15 17:45, Tom de Vries wrote: > Hi, > > this patch series implements the forbidding of multi-step garbage > collection liveness dependencies between caches. > > The first four patches downgrade 3 caches to non-cache, since they > introduce multi-step dependencies. This allows us to decouple: > - establishing a policy for multi-step dependencies in caches, and > - fixing issues that allow us to use these 3 as caches again. > > 1. Downgrade debug_args_for_decl to non-cache > 2. Add struct tree_decl_map_hasher > 3. Downgrade debug_expr_for_decl to non-cache > 4. Downgrade value_expr_for_decl to non-cache > 5. Don't mark live recursively in gt_cleare_cache > > Bootstrapped and reg-tested on x86_64, with ENABLE_CHECKING. > > I'll post the patches in response to this email. This patch downgrade value_expr_for_decl to non-cache. OK for trunk? Thanks, - Tom [PATCH 4/5] Downgrade value_expr_for_decl to non-cache Without this patch, but with patch "Don't mark live recursively in gt_cleare_cache" when compiling soft-fp/divtf3.c -m32 we run into: ... 0x133f37e void gt_cleare_cache(hash_table*) /home/vries/gcc_versions/devel/src/gcc/hash-table.h:1114 0x133bfdb gt_clear_caches_gt_tree_h() ./gt-tree.h:475 0x6c8d0f gt_clear_caches() ./gtype-c.h:151 0xa8ef1e ggc_mark_roots() /home/vries/gcc_versions/devel/src/gcc/ggc-common.c:103 0x7f7bfe ggc_collect() /home/vries/gcc_versions/devel/src/gcc/ggc-page.c:2183 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. ... The offending cache entry is: ... (gdb) call debug_generic_expr ( (*iter).base.from ) (gdb) call debug_generic_expr ( (*iter).to ) *.result_ptr ... 2015-07-10 Tom de Vries PR libgomp/66714 * tree.c (value_expr_for_decl): Use tree_decl_map_hasher instead of tree_decl_map_cache_hasher. Don't use cache GTY attribute. (init_ttree): Allocate value_expr_for_decl using new type. --- gcc/tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/tree.c b/gcc/tree.c index 6038fff..bb4467d 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -253,8 +253,13 @@ static GTY ((cache)) static GTY (()) hash_table *debug_expr_for_decl; +/* TODO: Figure out whether we can declare value_expr_for_decl as: static GTY ((cache)) hash_table *value_expr_for_decl; +*/ + +static GTY (()) + hash_table *value_expr_for_decl; struct tree_vec_map_cache_hasher : ggc_cache_ptr_hash { @@ -667,7 +672,7 @@ init_ttree (void) = hash_table::create_ggc (512); value_expr_for_decl - = hash_table::create_ggc (512); + = hash_table::create_ggc (512); int_cst_hash_table = hash_table::create_ggc (1024); -- 1.9.1