From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21577 invoked by alias); 28 Apr 2016 14:02:58 -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 21554 invoked by uid 89); 28 Apr 2016 14:02:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f43.google.com Received: from mail-wm0-f43.google.com (HELO mail-wm0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 28 Apr 2016 14:02:46 +0000 Received: by mail-wm0-f43.google.com with SMTP id e201so78041127wme.0 for ; Thu, 28 Apr 2016 07:02:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=BwQMTZ+CqcYeD53CPgkVcKOVFRHc0WnDADEWYVWCAG0=; b=GbcRrDQcCl/ftevAX1gTFCUKXSUp8KwrvUCI5MxVLfj+TyYc+q7Nna36T4bHuV4TUz N1pFnzupcU+ASysBRUI6J7i8lgCL2MDCaZM1TxMfWs0QPaXj2KiCUqsYeile7DFfWYFO BLQQr4fCfMi2bQ2N8/R5JiLN8hRC/10YF44ceexkDl6C7KnChkiYZVmFmW3HaDhGNSob i5HsgOlk6Ih+3/AwmHhAQxeE+aBFYzYrLrAlSr+hczIlviYyR895t0PwyTfCmK7cfpMd 2h2y5VZBgaYwV3kghEcCYE7MLpep+OJM674bipkexjR0L4g0G5HHtpaP2PxDDjeRlVU+ RG8w== X-Gm-Message-State: AOPr4FVqEG2FZ1Keob6IG4mQs8H7359u8ZeSM++5AzbG2QonzUy/ZgTzvUuxOp2/UPJMiJ8UdUcS460bFjJ+NA== MIME-Version: 1.0 X-Received: by 10.28.148.202 with SMTP id w193mr31234665wmd.29.1461852163454; Thu, 28 Apr 2016 07:02:43 -0700 (PDT) Received: by 10.194.113.102 with HTTP; Thu, 28 Apr 2016 07:02:43 -0700 (PDT) In-Reply-To: <20160428135011.2719-1-patrick@parcs.ath.cx> References: <20160428135011.2719-1-patrick@parcs.ath.cx> Date: Thu, 28 Apr 2016 14:02:00 -0000 Message-ID: Subject: Re: [PATCH] Mark predicates generated by genmatch as static From: Richard Biener To: Patrick Palka Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg01830.txt.bz2 On Thu, Apr 28, 2016 at 3:50 PM, Patrick Palka wrote: > The predicate functions emitted by genmatch are expected to only be used > locally within {gimple,generic}-match.c, so this patch marks them as > static. Does this look OK to commit after bootstrap and regtest? Actually the idea was to for example generate predicates in match.pd format for things like vectorizer pattern recog (I've done this for a few, need to search for (partial) patches on my disk), so they are supposed to be externally visible. Of course we might want to make that explicit in some way with a (extern_match ...) [or by prefixing local ones with a '*' ...]. Richard. > gcc/ChangeLog: > > * genmatch.c (write_predicate): Mark the emitted function as > static. > --- > gcc/genmatch.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/genmatch.c b/gcc/genmatch.c > index ce964fa..2f5147f 100644 > --- a/gcc/genmatch.c > +++ b/gcc/genmatch.c > @@ -3552,7 +3552,7 @@ decision_tree::gen (FILE *f, bool gimple) > void > write_predicate (FILE *f, predicate_id *p, decision_tree &dt, bool gimple) > { > - fprintf (f, "\nbool\n" > + fprintf (f, "\nstatic bool\n" > "%s%s (tree t%s%s)\n" > "{\n", gimple ? "gimple_" : "tree_", p->id, > p->nargs > 0 ? ", tree *res_ops" : "", > -- > 2.8.1.361.g2fbef4c >