From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102663 invoked by alias); 14 Jan 2020 04:52:14 -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 102648 invoked by uid 89); 14 Jan 2020 04:52:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=4076, deduplicating, H*MI:sk:10454af, 29137 X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Jan 2020 04:52:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578977531; h=from:from: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=8y/BxWhc7Nz1+2H2SHWmrEG27DY0DpgYl7GZ4FoGzHY=; b=MZcpUj25+cWPUtH1JwluIaiArb3QHmk3xcT7Dpx5RX2W7zuGH0GFm7IuZ3cL197ZvKQ7Rp Ht2tYQxDRXb+gTU6+b059RrS7UbNQ6XrU3DW+E+5i2SFsj+LQ2BliLJfyjOv+XDWJpNzHI 3Sv60ua60xKNvsLTTR4gD2h+XKNQ/8I= 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-277-MPvAbqhfMVeAeD4rZh6sUA-1; Mon, 13 Jan 2020 23:52:08 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1D47C107ACC7; Tue, 14 Jan 2020 04:52:07 +0000 (UTC) Received: from t470.redhat.com (ovpn-117-41.phx2.redhat.com [10.3.117.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CF4F5DA7B; Tue, 14 Jan 2020 04:52:05 +0000 (UTC) From: David Malcolm To: Jakub Jelinek Cc: law@redhat.com, Richard Biener , gcc-patches@gcc.gnu.org, David Malcolm Subject: [PATCH 2/2] analyzer: add empty_zero_p for the various hash traits Date: Tue, 14 Jan 2020 07:55:00 -0000 Message-Id: <20200114045154.19021-2-dmalcolm@redhat.com> In-Reply-To: <20200114045154.19021-1-dmalcolm@redhat.com> References: <10454af11705eee5ca86ca83d351e81e04d6fc45.camel@redhat.com> <20200114045154.19021-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00765.txt.bz2 Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu OK for master? gcc/analyzer/ChangeLog: * diagnostic-manager.cc (dedupe_hash_map_traits::empty_zero_p): New static constant. * engine.cc (default_hash_traits::empty_zero_p): Likewise. * exploded-graph.h (eg_hash_map_traits::empty_zero_p): Likewise. (eg_point_hash_map_traits::empty_zero_p): Likewise. (eg_call_string_hash_map_traits::empty_zero_p): Likewise. * program-state.h (default_hash_traits::empty_zero_p): Likewise. * state-purge.h (default_hash_traits::empty_zero_p): Likewise. --- gcc/analyzer/diagnostic-manager.cc | 2 +- gcc/analyzer/engine.cc | 1 + gcc/analyzer/exploded-graph.h | 3 +++ gcc/analyzer/program-state.h | 1 + gcc/analyzer/state-purge.h | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/analyzer/diagnostic-manager.cc b/gcc/analyzer/diagnostic-m= anager.cc index 12b8e5a4ac4..cd2c3bf2076 100644 --- a/gcc/analyzer/diagnostic-manager.cc +++ b/gcc/analyzer/diagnostic-manager.cc @@ -265,7 +265,7 @@ public: { return entry.m_key =3D=3D NULL; } - + static const bool empty_zero_p =3D true; }; =20 /* A class for deduplicating diagnostics and finding (and emitting) the diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index 3e3d8a120b7..720fa219d16 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -2913,6 +2913,7 @@ struct function_call_string template <> struct default_hash_traits : public pod_hash_traits { + static const bool empty_zero_p =3D false; }; =20 template <> diff --git a/gcc/analyzer/exploded-graph.h b/gcc/analyzer/exploded-graph.h index ddc5e06b3b6..8c29e552cac 100644 --- a/gcc/analyzer/exploded-graph.h +++ b/gcc/analyzer/exploded-graph.h @@ -407,6 +407,7 @@ struct eg_hash_map_traits { return entry.m_key =3D=3D NULL; } + static const bool empty_zero_p =3D false; }; =20 /* Per-program_point data for an exploded_graph. */ @@ -473,6 +474,7 @@ struct eg_point_hash_map_traits { return entry.m_key =3D=3D NULL; } + static const bool empty_zero_p =3D false; }; =20 /* Data about a particular call_string within an exploded_graph. */ @@ -539,6 +541,7 @@ struct eg_call_string_hash_map_traits { return entry.m_key =3D=3D NULL; } + static const bool empty_zero_p =3D false; }; =20 /* Data about a particular function within an exploded_graph. */ diff --git a/gcc/analyzer/program-state.h b/gcc/analyzer/program-state.h index 37fb7cc4101..75b65b780c9 100644 --- a/gcc/analyzer/program-state.h +++ b/gcc/analyzer/program-state.h @@ -50,6 +50,7 @@ public: template <> struct default_hash_traits : public pod_hash_traits { + static const bool empty_zero_p =3D false; }; =20 template <> diff --git a/gcc/analyzer/state-purge.h b/gcc/analyzer/state-purge.h index 77b7f622bbd..e33733a6cc5 100644 --- a/gcc/analyzer/state-purge.h +++ b/gcc/analyzer/state-purge.h @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see template <> struct default_hash_traits : public pod_hash_traits { + static const bool empty_zero_p =3D false; }; =20 template <> --=20 2.21.0