From patchwork Fri Oct 30 15:47:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 55840 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp1304467lbr; Fri, 30 Oct 2015 08:47:39 -0700 (PDT) X-Received: by 10.50.30.101 with SMTP id r5mr3958746igh.35.1446220058584; Fri, 30 Oct 2015 08:47:38 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a187si8131630ioe.184.2015.10.30.08.47.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Oct 2015 08:47:38 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-412199-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-return-412199-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-412199-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=HBfRykNlOmQ7pl1Fa 3nu/5tnVsfZ1YgtcvRbDh1y52Mpo3fpBRKL61z5VEpfp0alqsUEJzTp057zeOem+ K5Z/hEDiwb1W49VrbDKGsAzjQg1InqG6FwIjOP7YZUZu3wYo0AXzMz9FWnl1Z/X9 5Mkfxk173JsX6kyEYdpq+WkUls= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=DXkhgMG2XQbhiKxvtaEXnwu 5CKw=; b=cit4gvlSV2Uk/YD5rQjyin0ZoCFuh7j20Uov42Fv0MMON6xioCmn+8+ 4nHNAPg0i2q7C6wASk6EjTsF6N8f7PcxAvtJDT/zR6pD3/jyE9F/UKElEwJoQBDq uGmXdoEi8iKu1ej6ysvjblAE5G5vaUW6vqf7rvou/UQ1h8D153ec= Received: (qmail 1610 invoked by alias); 30 Oct 2015 15:47:26 -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 1595 invoked by uid 89); 30 Oct 2015 15:47:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Oct 2015 15:47:24 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-29-VUorOqStRmyVvZsAGk8bWw-1; Fri, 30 Oct 2015 15:47:19 +0000 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 30 Oct 2015 15:47:19 +0000 Message-ID: <56339107.2080302@arm.com> Date: Fri, 30 Oct 2015 15:47:19 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Ramana Radhakrishnan , GCC Patches CC: Richard Earnshaw Subject: Re: [PATCH][ARM] Fix checking RTL error in cortex_a9_sched_adjust_cost References: <5632430F.7080402@arm.com> <563380B3.3070007@foss.arm.com> In-Reply-To: <563380B3.3070007@foss.arm.com> X-MC-Unique: VUorOqStRmyVvZsAGk8bWw-1 X-IsSubscribed: yes On 30/10/15 14:37, Ramana Radhakrishnan wrote: > > On 29/10/15 16:02, Kyrill Tkachov wrote: >> Hi all, >> >> An arm-none-eabi build with RTL checking and --with-cpu=cortex-a9 fails because >> cortex_a9_sched_adjust_cost tries to access the SET_DEST of a PARALLEL. >> The correct thing to do is to call single_set on dep, which will return a simple SET >> that we can take the SET_DEST of or NULL if there's more than one SET. >> >> This patch does that. >> The arm-none-eabi build passes. >> Bootstrapped and tested on arm-none-linux-gnueabihf. >> >> Ok for trunk? >> >> Thanks, >> Kyrill >> >> 2015-10-29 Kyrylo Tkachov >> >> * config/arm/arm.c (cortex_a9_sched_adjust_cost): Use reg_set_p to >> check for dependencies. > Ok - but I think we also need a patch to improve the comment for reg_set_p, probably because it started life as internal function but now has wider visibility. Thanks, Here's a patch for the reg_set_p comment. Committing as obvious. Kyrill > > > Thanks, > Ramana > diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 23b2c45..d7201ea 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1207,7 +1207,8 @@ reg_set_between_p (const_rtx reg, const rtx_insn *from_insn, return 0; } -/* Internals of reg_set_between_p. */ +/* Return true if REG is set or clobbered inside INSN. */ + int reg_set_p (const_rtx reg, const_rtx insn) {