From patchwork Mon Nov 2 17:30:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 1392415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=B3ZXGErU; dkim-atps=neutral Received: from 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CQ0Lp28Kxz9sTD for ; Tue, 3 Nov 2020 04:30:58 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D920C388A403; Mon, 2 Nov 2020 17:30:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by sourceware.org (Postfix) with ESMTPS id 5B92B3836C09 for ; Mon, 2 Nov 2020 17:30:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5B92B3836C09 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nathanmsidwell@gmail.com Received: by mail-qt1-x836.google.com with SMTP id h12so9711938qtc.9 for ; Mon, 02 Nov 2020 09:30:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=XJylmN6sykfI0OqPhJRcQjqryH22kQyv1MhOuz8mDZI=; b=B3ZXGErUf86E4kzC9dOA+M61KUlmIBuFQ6t1TzzWqbe1udCD7WkSge0zecR3gRe8IQ rUCCNHkA9bazr3J5IwF9+yNrWUL3zgWsXV78yB72gxb7r+ZIc5d2bUnYMRCikrZfB8c0 gePpa2vXv79Pt1VRyb3NUn7x1ob3VSEOGDHNRgr49DB5tLsUrVeDs94K/qbH6ztRmF+O yJkmysUr2YQXiMHWUypGLyEjZbX0rTMPnG7VHREClh3wDDOn/KQpW8MoM0kfjieZy8+U JYSdbZvPyAfANbTWY1Wa4z9vSpfWwFLuPTEmkZy2eAbdWBEQ/xtA89VBCiKz7dNM1RH9 8GmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language; bh=XJylmN6sykfI0OqPhJRcQjqryH22kQyv1MhOuz8mDZI=; b=YC/NE2sy4CADNvydKd1+o/andy+Klgg3/Ci1p2LiciTipXJMwl/mG3jRskeGTFfJdZ YNnGALKO/QIE6boEc1d18toH7b7XPIdxOixtuZWWTrH8fY8XritNPgZVduFSjBMjBKpu tjqVQf5klmYZp9wxoETQpadbxaaYNNNdOkDdxsI6/ss93KSZNNn3ehQ+tNR7n2QV9Of8 BZ+3U1dCkyMC9H2W4OVlhYZsefLj+Zk+Er3xzAw2jkFlgSnAhA5qEzk0N7CNaneNjwZj KgkR/CZrywxcuUnPxNmUiSBuz3HE/YO3f1dDAoCUXc3hFgUjNPAmP+z7Ql257YHlV0Iz tj2g== X-Gm-Message-State: AOAM533vGEBrapja/0y+mw07uL2N6ipOK0NbMkKznIgPsvfJXCCoMTJt s+Jf0g3tFew/ApqqcSs3w3E= X-Google-Smtp-Source: ABdhPJxr3ye6y0oQDk5vfnLYHtZnM/MIab0pge+xHwQaltZMwIyEfcBLwPH8fu7LakkAxoCMqHRbjg== X-Received: by 2002:a05:622a:28d:: with SMTP id z13mr1798521qtw.360.1604338252542; Mon, 02 Nov 2020 09:30:52 -0800 (PST) Received: from ?IPv6:2620:10d:c0a8:1102:99fe:751e:9aea:5090? ([2620:10d:c091:480::1:7f20]) by smtp.googlemail.com with ESMTPSA id r190sm8564753qkf.101.2020.11.02.09.30.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 09:30:51 -0800 (PST) To: GCC Patches From: Nathan Sidwell Subject: c++: Delete unused hash type Message-ID: <4e247397-7adc-c784-9f45-84d72d47963a@acm.org> Date: Mon, 2 Nov 2020 12:30:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Language: en-US X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Since I redid block-scope extern decls, the need for a uid->decl hasher has gone away. Deleting thusly. gcc/cp/ * cp-tree.h (struct cxx_int_tree_map): Delete. (struct cxx_int_tree_map_hasher): Delete. * cp-gimplify.c (cxx_int_tree_map_hasher::equal): Delete. (cxx_int_tree_map_hasher::hash): Delete. pushing to trunk diff --git i/gcc/cp/cp-gimplify.c w/gcc/cp/cp-gimplify.c index 44c9d249b15..064a44ca3e5 100644 --- i/gcc/cp/cp-gimplify.c +++ w/gcc/cp/cp-gimplify.c @@ -680,22 +680,6 @@ is_invisiref_parm (const_tree t) && DECL_BY_REFERENCE (t)); } -/* Return true if the uid in both int tree maps are equal. */ - -bool -cxx_int_tree_map_hasher::equal (cxx_int_tree_map *a, cxx_int_tree_map *b) -{ - return (a->uid == b->uid); -} - -/* Hash a UID in a cxx_int_tree_map. */ - -unsigned int -cxx_int_tree_map_hasher::hash (cxx_int_tree_map *item) -{ - return item->uid; -} - /* A stable comparison routine for use with splay trees and DECLs. */ static int diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index fdb8ee57f0b..eb7d1caa0a7 100644 --- i/gcc/cp/cp-tree.h +++ w/gcc/cp/cp-tree.h @@ -1867,19 +1867,6 @@ public: #define cp_noexcept_operand scope_chain->noexcept_operand -/* A list of private types mentioned, for deferred access checking. */ - -struct GTY((for_user)) cxx_int_tree_map { - unsigned int uid; - tree to; -}; - -struct cxx_int_tree_map_hasher : ggc_ptr_hash -{ - static hashval_t hash (cxx_int_tree_map *); - static bool equal (cxx_int_tree_map *, cxx_int_tree_map *); -}; - struct named_label_entry; /* Defined in decl.c. */ struct named_label_hash : ggc_remove