From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5459 invoked by alias); 12 Apr 2011 14:07:18 -0000 Received: (qmail 5439 invoked by uid 22791); 12 Apr 2011 14:07:16 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Apr 2011 14:07:10 +0000 Received: by qwh5 with SMTP id 5so4655917qwh.20 for ; Tue, 12 Apr 2011 07:07:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.63.143 with SMTP id b15mr5270314qci.136.1302617229361; Tue, 12 Apr 2011 07:07:09 -0700 (PDT) Received: by 10.229.34.71 with HTTP; Tue, 12 Apr 2011 07:07:09 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Apr 2011 14:07:00 -0000 Message-ID: Subject: Re: Recording predicate information in all rtl gen* programs From: "H.J. Lu" To: gcc-patches@gcc.gnu.org, patches@linaro.org, richard.sandiford@linaro.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00883.txt.bz2 On Tue, Apr 12, 2011 at 5:28 AM, Richard Sandiford wrote: > This patch is a prerequisite for: > > =A0 =A0http://gcc.gnu.org/ml/gcc-patches/2011-03/msg02168.html > > (approved but not yet applied, because I'd forgotten about this). > > At the moment, gen* programs that want predicate information need > to process the DEFINE*_PREDICATE directives themselves. =A0They can then > use routines in gensupport.c to record and retrieve the processed data. > > This patch moves the directive processing into gensupport.c too, so that > all gen* programs have access to it. > > Tested on x86_64-linux-gnu and arm-linux-gnueabi. =A0OK to install? > > Richard > > > gcc/ > =A0 =A0 =A0 =A0* genpreds.c (process_define_predicate): Move most process= ing > =A0 =A0 =A0 =A0to gensupport.c. =A0Continue to validate the expression. > =A0 =A0 =A0 =A0* genrecog.c (did_you_mean_codes, compute_predicate_codes) > =A0 =A0 =A0 =A0(process_define_predicate): Move processing to gensupport.= c. > =A0 =A0 =A0 =A0(main): Remove DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICA= TE cases. > =A0 =A0 =A0 =A0* gensupport.c (did_you_mean_codes): Moved from genrecog.c. > =A0 =A0 =A0 =A0(compute_predicate_codes): Moved from genrecog.c. =A0Add l= ineno > =A0 =A0 =A0 =A0argument. > =A0 =A0 =A0 =A0(valid_predicate_name_p): New function, split out from old > =A0 =A0 =A0 =A0genpreds.c:process_define_predicate. > =A0 =A0 =A0 =A0(process_define_predicate): New function, combining code f= rom > =A0 =A0 =A0 =A0old genpreds.c and genrecog.c functions. > =A0 =A0 =A0 =A0(process_rtx): Call it for DEFINE_PREDICATE and > =A0 =A0 =A0 =A0DEFINE_SPECIAL_PREDICATE. > > I think your patch caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48573 --=20 H.J.