From patchwork Tue Oct 10 20:41:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 824049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-463897-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ZIF+lmmG"; dkim-atps=neutral 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 3yBTYq4rLjz9t69 for ; Wed, 11 Oct 2017 07:42:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=T8AmeyTPxMYMuMwuLwSLTdpxruUVhYgKnKXCAkHK+VCGGUxDkQ 29GuCJ3pnpACohcwVbqRcbeu5aVFfF03uiLGOyVdT4Vr1+lp6EJSxaPt5mRohWI8 SfVA12XiwScT1AR2LX1PWs7+Ny/XfDJQObNA63T+4mO39evSbtWQgLSgg= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=XzoXhivEbKCngMen9TF99S6R+do=; b=ZIF+lmmG3yPrZu6zGG1n fheZVW8mlxXrB8Nu5IWmdHogSTi0KdWz9x/9MF6fUGcPaeaqS2GU2LUSC3MP9N2L jG4TPb5R7ZBiUzMOpWT02J54toNIHyVNTWaW/7vb8Yor5Fe/yksI1VYwN/ZHNjHa rxHzcoWvmQzLEnKoNB2lDJY= Received: (qmail 13549 invoked by alias); 10 Oct 2017 20:41:59 -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 13039 invoked by uid 89); 10 Oct 2017 20:41:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=killing, trait X-HELO: mail-qt0-f174.google.com Received: from mail-qt0-f174.google.com (HELO mail-qt0-f174.google.com) (209.85.216.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Oct 2017 20:41:57 +0000 Received: by mail-qt0-f174.google.com with SMTP id z50so50249151qtj.4 for ; Tue, 10 Oct 2017 13:41:57 -0700 (PDT) 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=M9TIE29ADvyW6+gy7lrPc8ieNdcdOiKJvLRmHHl8o/A=; b=kqrpW0u/8hdIuH19vb+in/MmkIXUOqhjJSIfj1EBQZ9DIfQEXpvOxIdW/KtqJ73AXm eJ/He8sazQl9Ihb2c59a6kJG0bS+oA7w3sYoamOJoTg8gb/0MCA3Uh2mOxn6a6lAHVIJ lt1V6mTaAtTkadU77dd+LhbwdA/ZYdpq6ES2XfW8dYcQMojMZtsTLp4O0KkP8d1+nJyc Fo7WspWPOOhUNKot6w9ABa1mVTHkZcJKw8P+8hhoT9uuwyYcHf1+gSP62IdmtLmhcdE9 0CLhyqGPfsGoRz5Wh7CHBmgS59TPQoaPt0PBr4y2k59KDh+4k0iskdBr47Sj/AOIL9mx R/WA== X-Gm-Message-State: AMCzsaWmFFiHvku516R0jcn3C6u0168TXaOTzHvMiDtfQ5u0+MVmfIq4 C6WvHeMVy1cXFzIsoxmdRTk= X-Google-Smtp-Source: AOwi7QAq2vwZyyiQbEki914fV3mJOKCKrF3m2dKKseQF0fqo+jg1qoUNZn5lqC4A9/e2Wgy20KrT+Q== X-Received: by 10.37.43.72 with SMTP id r69mr3086964ybr.171.1507668115850; Tue, 10 Oct 2017 13:41:55 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254? ([2620:10d:c091:200::3:9bf7]) by smtp.googlemail.com with ESMTPSA id n134sm3508533ywn.27.2017.10.10.13.41.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Oct 2017 13:41:55 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [C++ PATCH] Kill unneeded hash specialization Message-ID: <33141b70-f4cd-e058-1733-9d0f39891416@acm.org> Date: Tue, 10 Oct 2017 16:41:53 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Now I've converted the identifier_>decl hash_maps to self-hashing hash_tables, there's no need for the lang_identifier specialization of default_hash_traits. So killing it. nathan 2017-10-10 Nathan Sidwell * cp-tree.h (default_hash_traits ): Delete specialization. Index: cp-tree.h =================================================================== --- cp-tree.h (revision 253605) +++ cp-tree.h (working copy) @@ -572,30 +572,6 @@ identifier_p (tree t) return NULL; } -/* Hash trait specialization for lang_identifiers. This allows - PCH-safe maps keyed by DECL_NAME. If it wasn't for PCH, we could - just use a regular tree key. */ - -template <> -struct default_hash_traits - : pointer_hash -{ - /* Use a regular tree as the type, to make using the hash table - simpler. We'll get dynamic type checking with the hash function - itself. */ - GTY((skip)) typedef tree value_type; - GTY((skip)) typedef tree compare_type; - - static hashval_t hash (const value_type id) - { - return IDENTIFIER_HASH_VALUE (id); - } - - /* Nothing is deletable. Everything is insertable. */ - static bool is_deleted (value_type) { return false; } - static void remove (value_type) { gcc_unreachable (); } -}; - #define LANG_IDENTIFIER_CAST(NODE) \ ((struct lang_identifier*)IDENTIFIER_NODE_CHECK (NODE))