From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111364 invoked by alias); 21 Aug 2015 16:20:49 -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 111355 invoked by uid 89); 21 Aug 2015 16:20:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 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; Fri, 21 Aug 2015 16:20:47 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 830528E907; Fri, 21 Aug 2015 16:20:46 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-201.phx2.redhat.com [10.3.113.201]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7LGKj6u018118; Fri, 21 Aug 2015 12:20:45 -0400 Subject: Re: RFA: Replace LAST_INSN_CODE with NUM_INSN_CODES To: gcc-patches@gcc.gnu.org, Claudiu Zissulescu , Claudiu Zissulescu , Francois Bedard , richard.sandiford@arm.com References: <098ECE41A0A6114BB2A07F1EC238DE8965C6756D@de02wembxa.internal.synopsys.com> <55D6064F.40505@redhat.com> <55D60EA3.6040708@redhat.com> <87mvxk99lk.fsf_-_@e105548-lin.cambridge.arm.com> <87d1yg9093.fsf@e105548-lin.cambridge.arm.com> From: Jeff Law Message-ID: <55D74FDD.4020807@redhat.com> Date: Fri, 21 Aug 2015 16:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <87d1yg9093.fsf@e105548-lin.cambridge.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01327.txt.bz2 On 08/21/2015 08:36 AM, Richard Sandiford wrote: > Richard Sandiford writes: >> Claudiu reported that I'd botched the definition of LAST_INSN_CODE >> in my recent patches to reduce the size of insn_data. I'd defined >> it as the last valid insn code, whereas it's supposed to be the >> last valid code +1. >> >> This patch replaces LAST_INSN_CODE with a separate NUM_INSN_CODES >> count, outside the enum. >> >> Tested on x86_64-linux-gnu and aarch64-linux-gnu. OK to install? > > Sorry, I realised later that this patch triggers a warning with older > host compilers about a trailing "," on the last enum value. This patch > updates the gencodes.c part to fix that. The other parts are unchanged. > > I think the #defines for removed codes are a hold-over from the days > when CODE_FOR_nothing was the final enum value rather than the first, > amd so was only defined later in the file. These days we can make them > proper enum aliases instead. > > Tested on x86_64-linux-gnu and aarch64-linux-gnu. OK to install? > > Thanks, > Richard > > gcc/ > * gencodes.c (gencodes): Print the comma for the preceding > enum value rather than the current one. Use aliased enum values > rather than #defines for compiled-out patterns. > (main): Update accordingly. Replace LAST_INSN_CODE with > NUM_INSN_CODES. > * lra.c (insn_code_data): Update accordingly. > (finish_insn_code_data_once, get_static_insn_data): Likewise. > * recog.h (target_recog): Likewise. > (preprocess_insn_constraints): Change parameter to unsigned int. > * recog.c (preprocess_insn_constraints): Likewise. > (recog_init): Replace LAST_INSN_CODE with NUM_INSN_CODES. > * tree-vect-stmts.c (vectorizable_operation): Simplify. OK. Thanks for taking care of this. Jeff