From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18064 invoked by alias); 13 Jul 2016 22:19:31 -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 18054 invoked by uid 89); 13 Jul 2016 22:19:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Sandiford, sandiford, HTo:U*gnu, validating X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 13 Jul 2016 22:19:20 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 979CC3E2AE; Wed, 13 Jul 2016 22:19:19 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-70.phx2.redhat.com [10.3.116.70]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6DMJId5023381; Wed, 13 Jul 2016 18:19:19 -0400 Subject: Re: [PATCH 2/2] gcc/genrecog: Don't warn for missing mode on special predicates To: Andrew Burgess , gcc-patches@gcc.gnu.org, Joern Wolfgang Rennecke , richard.sandiford@arm.com References: <65124582452f1e6ba9f95992684363b0ae5ef0be.1465946922.git.andrew.burgess@embecosm.com> <87bn32tjer.fsf@googlemail.com> <20160630132949.GP8823@embecosm.com> <878txhlrhj.fsf@e105548-lin.cambridge.arm.com> <20160706194254.GF10229@embecosm.com> From: Jeff Law Message-ID: Date: Wed, 13 Jul 2016 22:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160706194254.GF10229@embecosm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00782.txt.bz2 On 07/06/2016 01:42 PM, Andrew Burgess wrote: > * Richard Sandiford [2016-07-04 09:47:20 +0100]: >> Thanks for removing the duplicated error check for unknown predicates. >> I think that error gets reported later though, so we should check for >> null here: >> >> return pred && pred->special; >> >> OK with that change, thanks. > > Richard, > > Thanks for the continued reviews. I don't have GCC write access, so I > wonder if you would be willing to commit this patch for me please. > > There's an updated version below that includes the latest change you > suggested. > > Many thanks, > Andrew > > --- > > [PATCH] gcc/genrecog: Don't warn for missing mode on special predicates > > In md.texi it says: > > Predicates written with @code{define_special_predicate} do not get any > automatic mode checks, and are treated as having special mode handling > by @command{genrecog}. > > In genrecog, when validating a SET pattern, there is already a special > case for 'address_operand' which is a special predicate, however, > other special predicates fall through to the code which checks for > incorrect use of VOIDmode. > > This commit adds a new function for detecting special predicates, and > then generalises the check in validate_pattern so that mode checking > is skipped for all special predicates. > > gcc/ChangeLog: > > * genrecog.c (special_predicate_operand_p): New function. > (predicate_name): Move function. > (validate_pattern): Don't warn about missing mode for all > define_special_predicate predicates. Committed. THanks, jeff