From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119416 invoked by alias); 14 Jan 2020 10:02:56 -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 119408 invoked by uid 89); 14 Jan 2020 10:02:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=Successfully X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (205.139.110.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Jan 2020 10:02:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578996164; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bQ39V9nttEwrRJ3UxO05PauhkYTHdNriVmXesKJUUWI=; b=R7G3xuS/pr4aZ4ZyYafvUqqdOs2YQ8fcqkEKcG2J8qJagYEKR2+Db8w7dspZwtycsLs0IG DnD3k9xR4Ju0tCo+gQk1dOpi6g6A/PMjBZ7BkfanYsduGORBi3YvZ0s/QRHciVAoqkq3dy kROC71kblLkgf56y8rlIHLzr2wc0Hmg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-426-Jufx31SwP2WgyhK7RUzb4A-1; Tue, 14 Jan 2020 05:02:41 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3AF07DBA3; Tue, 14 Jan 2020 10:02:40 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-74.brq.redhat.com [10.40.204.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A7D9682062; Tue, 14 Jan 2020 10:02:39 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 00EA2bv7000306; Tue, 14 Jan 2020 11:02:38 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 00EA2bJC000305; Tue, 14 Jan 2020 11:02:37 +0100 Date: Tue, 14 Jan 2020 11:07:00 -0000 From: Jakub Jelinek To: David Malcolm Cc: law@redhat.com, Richard Biener , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 1/2] hash-table.h: support non-zero empty values in empty_slow (v2) Message-ID: <20200114100237.GZ10088@tucnak> Reply-To: Jakub Jelinek References: <10454af11705eee5ca86ca83d351e81e04d6fc45.camel@redhat.com> <20200114045154.19021-1-dmalcolm@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200114045154.19021-1-dmalcolm@redhat.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00775.txt.bz2 On Mon, Jan 13, 2020 at 11:51:53PM -0500, David Malcolm wrote: > > * cfg.s correctly has a call to memset (even with no optimization) > > for > > hash_table::empty_slow I have intestigated unpatched cc1plus and in the (usually inlined) alloc_entries I see in all the places the xcalloc or ggc_internal_cleared_a= lloc followed by either a loop storing some zeros or a memset, which is something I'd hope the patch also improves. As for graphite.c, sure, empty_zero_p =3D false is a fallback value, the question was not directly related to this patch, but rather wondering how it can work at all. > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu (in > conjuction with the analyzer patch kit, which it fixes) >=20 > OK for master? Yes to both patches, thanks. > gcc/cp/ChangeLog: Jakub Jelinek > * cp-gimplify.c (source_location_table_entry_hash::empty_zero_p): > New static constant. > * cp-tree.h (named_decl_hash::empty_zero_p): Likewise. > (struct named_label_hash::empty_zero_p): Likewise. > * decl2.c (mangled_decl_hash::empty_zero_p): Likewise. >=20 > gcc/ChangeLog: Jakub Jelinek , > David Malcolm > * attribs.c (excl_hash_traits::empty_zero_p): New static constant. > * gcov.c (function_start_pair_hash::empty_zero_p): Likewise. > * graphite.c (struct sese_scev_hash::empty_zero_p): Likewise. > * hash-map-tests.c (selftest::test_nonzero_empty_key): New selftest. > (selftest::hash_map_tests_c_tests): Call it. > * hash-map-traits.h (simple_hashmap_traits::empty_zero_p): > New static constant, using the value of =3D H::empty_zero_p. > (unbounded_hashmap_traits::empty_zero_p): Likewise, using the value > from default_hash_traits . > * hash-map.h (hash_map::empty_zero_p): Likewise, using the value > from Traits. > * hash-set-tests.c (value_hash_traits::empty_zero_p): Likewise. > * hash-table.h (hash_table::alloc_entries): Guard the loop of > calls to mark_empty with !Descriptor::empty_zero_p. > (hash_table::empty_slow): Conditionalize the memset call with a > check that Descriptor::empty_zero_p; otherwise, loop through the > entries calling mark_empty on them. > * hash-traits.h (int_hash::empty_zero_p): New static constant. > (pointer_hash::empty_zero_p): Likewise. > (pair_hash::empty_zero_p): Likewise. > * ipa-devirt.c (default_hash_traits ::empty_zero_p): > Likewise. > * ipa-prop.c (ipa_bit_ggc_hash_traits::empty_zero_p): Likewise. > (ipa_vr_ggc_hash_traits::empty_zero_p): Likewise. > * profile.c (location_triplet_hash::empty_zero_p): Likewise. > * sanopt.c (sanopt_tree_triplet_hash::empty_zero_p): Likewise. > (sanopt_tree_couple_hash::empty_zero_p): Likewise. > * tree-hasher.h (int_tree_hasher::empty_zero_p): Likewise. > * tree-ssa-sccvn.c (vn_ssa_aux_hasher::empty_zero_p): Likewise. > * tree-vect-slp.c (bst_traits::empty_zero_p): Likewise. > * tree-vectorizer.h > (default_hash_traits::empty_zero_p): > Likewise. Jakub