From patchwork Sat May 10 20:16:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 347728 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A0D7D14008A for ; Sun, 11 May 2014 06:17:12 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=DyBMJYtHREl/SLknyT6wDW3N9KJFs iTtBRltxUcvr66aIGuxYHSHnBuDhXuSfXtrYNXDZ3TB0bjbk2OzzMkYp8U/fDdm9 6d9jTBcO/Tg+SVDv4G62AgMJl7zXO9l1p40FaNukguS3iW0CPO7oXqAoa6Cj43sK jSawyUXRobdOGU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=VSBtbmZfusgMWQApMscfHX5i1zM=; b=Py+ LL8cXtaPmcnWC9VD+70dViXyk18hFOyIw1i7i9q+Q9X3euaYu8C56NDYiRcAWCGe 7xbHRrgFIFQjDHLqEhh0uUDAawUrUZJxapKOYdIekuI5YXWr+46xdvC8XpAcZDhR HJilOx4e1xDI1keiKe+pdyaVxjs/XvN8wu4iOHFc= Received: (qmail 9430 invoked by alias); 10 May 2014 20:17:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9416 invoked by uid 89); 10 May 2014 20:17:04 -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 X-HELO: mail-wg0-f50.google.com Received: from mail-wg0-f50.google.com (HELO mail-wg0-f50.google.com) (74.125.82.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 10 May 2014 20:17:02 +0000 Received: by mail-wg0-f50.google.com with SMTP id x12so5186836wgg.21 for ; Sat, 10 May 2014 13:17:00 -0700 (PDT) X-Received: by 10.180.78.5 with SMTP id x5mr8843255wiw.12.1399753020009; Sat, 10 May 2014 13:17:00 -0700 (PDT) Received: from localhost ([2.26.169.52]) by mx.google.com with ESMTPSA id ek4sm6311439wib.9.2014.05.10.13.16.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 May 2014 13:16:59 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: [PATCH 5/7] Shrink SCRATCH References: <87a9ap1k8n.fsf@talisman.default> Date: Sat, 10 May 2014 21:16:58 +0100 In-Reply-To: <87a9ap1k8n.fsf@talisman.default> (Richard Sandiford's message of "Sat, 10 May 2014 20:55:52 +0100") Message-ID: <87oaz5z8w5.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 SCRATCH has a single "0" field because reload used to turn it directly into a REG. It no longer does (or could do) that since REG has three fields rather than one. This patch therefore updates the comment and removes the field. Tested on x86_64-linux-gnu. OK to install? Thanks, Richard gcc/ * rtl.def (scratch): Fix outdated comment and remove "0" field. * gengtype.c (adjust_field_rtx_def): Update accordingly. Index: gcc/rtl.def =================================================================== --- gcc/rtl.def 2014-05-10 21:13:03.383968475 +0100 +++ gcc/rtl.def 2014-05-10 21:13:06.240993266 +0100 @@ -384,11 +384,10 @@ DEF_RTL_EXPR(PC, "pc", "", RTX_OBJ) DEF_RTL_EXPR(REG, "reg", "i0", RTX_OBJ) /* A scratch register. This represents a register used only within a - single insn. It will be turned into a REG during register allocation + single insn. It will be replaced by a REG during register allocation or reload unless the constraint indicates that the register won't be - needed, in which case it can remain a SCRATCH. This code is - marked as having one operand so it can be turned into a REG. */ -DEF_RTL_EXPR(SCRATCH, "scratch", "0", RTX_OBJ) + needed, in which case it can remain a SCRATCH. */ +DEF_RTL_EXPR(SCRATCH, "scratch", "", RTX_OBJ) /* A reference to a part of another value. The first operand is the complete value and the second is the byte offset of the selected part. */ Index: gcc/gengtype.c =================================================================== --- gcc/gengtype.c 2014-05-10 21:13:03.381968458 +0100 +++ gcc/gengtype.c 2014-05-10 21:13:06.242993283 +0100 @@ -1249,8 +1249,6 @@ adjust_field_rtx_def (type_p t, options_ t = tree_tp, subname = "rt_tree"; else if (i == REG && aindex == 1) t = reg_attrs_tp, subname = "rt_reg"; - else if (i == SCRATCH && aindex == 0) - t = scalar_tp, subname = "rt_int"; else if (i == SYMBOL_REF && aindex == 1) t = scalar_tp, subname = "rt_int"; else if (i == SYMBOL_REF && aindex == 2)