From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68828 invoked by alias); 11 Dec 2019 19:54:48 -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 68818 invoked by uid 89); 11 Dec 2019 19:54:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT autolearn=ham version=3.3.1 spammy=nail, distinguishing, UD:program-point.cc, supergraph.h 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; Wed, 11 Dec 2019 19:54:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576094085; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nC7n+sGfRBY0A+YdvOPNk/HgQc7cZ1T/WpADETInhOk=; b=RR6oomOMCLn7nss0u6GIpRTeHXuuKRuSL3wdkyzq+Kgw9fSr073u+JIEbsJM/UI/6nQscI Z9wlVGSfhYWm44bQDKxQdvbaicT6vxOr7uj0BbIFTt9IDSuOvkJAtMat31o3+XBSLKa6ak pESnBzKtRZxrfII1BajmqdkI8qvvNSo= 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-106-aq846XlLPIqRhMwHvwp0hw-1; Wed, 11 Dec 2019 14:54:41 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DC825805219 for ; Wed, 11 Dec 2019 19:54:40 +0000 (UTC) Received: from ovpn-112-27.phx2.redhat.com (ovpn-112-27.phx2.redhat.com [10.3.112.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8113A5C1BB; Wed, 11 Dec 2019 19:54:40 +0000 (UTC) Message-ID: <4819b62cd469bf9e4071c1e6f4bd58848918bcd5.camel@redhat.com> Subject: Re: [PATCH 41/49] analyzer: new files: program-point.{cc|h} From: Jeff Law Reply-To: law@redhat.com To: David Malcolm , gcc-patches@gcc.gnu.org Date: Wed, 11 Dec 2019 19:54:00 -0000 In-Reply-To: <1573867416-55618-42-git-send-email-dmalcolm@redhat.com> References: <1573867416-55618-1-git-send-email-dmalcolm@redhat.com> <1573867416-55618-42-git-send-email-dmalcolm@redhat.com> User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00811.txt.bz2 On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > This patch introduces function_point and program_point, classes > for tracking locations within the program (the latter adding > a call_string for tracking interprocedural location). > > gcc/ChangeLog: > * analyzer/program-point.cc: New file. > * analyzer/program-point.h: New file. > --- > > > diff --git a/gcc/analyzer/program-point.h b/gcc/analyzer/program- > point.h > new file mode 100644 > index 0000000..ad7b9cd > --- /dev/null > +++ b/gcc/analyzer/program-point.h > @@ -0,0 +1,316 @@ > +/* Classes for representing locations within the program. > + Copyright (C) 2019 Free Software Foundation, Inc. > + Contributed by David Malcolm . > + > +This file is part of GCC. > + > +GCC is free software; you can redistribute it and/or modify it > +under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 3, or (at your option) > +any later version. > + > +GCC is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with GCC; see the file COPYING3. If not see > +;. */ > + > +#ifndef GCC_ANALYZER_PROGRAM_POINT_H > +#define GCC_ANALYZER_PROGRAM_POINT_H > + > +#include "analyzer/call-string.h" > +#include "analyzer/supergraph.h" > + > +class exploded_graph; > + > +/* An enum for distinguishing the various kinds of > program_point. */ > + > +enum point_kind { > + /* A "fake" node which has edges to all entrypoints. */ > + PK_ORIGIN, > + > + PK_BEFORE_SUPERNODE, > + PK_BEFORE_STMT, > + PK_AFTER_SUPERNODE, > + > + /* Special values used for hash_map: */ > + PK_EMPTY, > + PK_DELETED, > + > + NUM_POINT_KINDS > +}; Isn't this the cause of the hash_map stuff we're discussing with Martin? (PK_EMPTY is a non-zero value)? Regardless, I don't see anything there to object to. We have to nail down the hash_map issues though. jeff