From patchwork Tue May 10 22:50:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayal Zaks X-Patchwork-Id: 1427 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:51:54 -0000 Delivered-To: patches@linaro.org Received: by 10.224.61.3 with SMTP id r3cs37882qah; Tue, 10 May 2011 15:50:54 -0700 (PDT) Received: by 10.227.195.6 with SMTP id ea6mr4043056wbb.74.1305067853183; Tue, 10 May 2011 15:50:53 -0700 (PDT) Received: from mtagate2.uk.ibm.com (mtagate2.uk.ibm.com [194.196.100.162]) by mx.google.com with ESMTPS id bc6si20177674wbb.52.2011.05.10.15.50.51 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 May 2011 15:50:52 -0700 (PDT) Received-SPF: pass (google.com: domain of ZAKS@il.ibm.com designates 194.196.100.162 as permitted sender) client-ip=194.196.100.162; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ZAKS@il.ibm.com designates 194.196.100.162 as permitted sender) smtp.mail=ZAKS@il.ibm.com Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p4AMokmC000373; Tue, 10 May 2011 22:50:46 GMT Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4AMojEi2580682; Tue, 10 May 2011 23:50:45 +0100 Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4AMojTv004235; Tue, 10 May 2011 16:50:45 -0600 Received: from d12mc102.megacenter.de.ibm.com (d12mc102.megacenter.de.ibm.com [9.149.167.114]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p4AMojAX004232; Tue, 10 May 2011 16:50:45 -0600 In-Reply-To: References: Subject: Re: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop X-KeepSent: F35020B6:03E51811-C225788C:007D511F; type=4; name=$KeepSent To: Revital Eres Cc: gcc-patches@gcc.gnu.org, Patch Tracking X-Mailer: Lotus Notes Release 8.5.1FP5 SHF29 November 12, 2010 Message-ID: From: Ayal Zaks Date: Wed, 11 May 2011 01:50:41 +0300 X-MIMETrack: Serialize by Router on D12MC102/12/M/IBM(Release 8.5.2FP1|November 29, 2010) at 11/05/2011 01:50:44 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII > OK for mainline? Yes, this is pretty obvious. (You don't have to change to prev_nondebug_insn btw). Ayal. From: Revital Eres To: Ayal Zaks/Haifa/IBM@IBMIL Cc: gcc-patches@gcc.gnu.org, Patch Tracking Date: 08/05/2011 07:37 AM Subject: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop Hello, The attached patch adds code to skip DEBUG_INSNs while recognizing doloop pattern. The patch was tested together with the rest of the patches in this series and on top of the patch to support do-loop for ARM (not yet in mainline, but approved http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01718.html). On ppc64-redhat-linux regtest as well as bootstrap with SMS flags enabling SMS also on loops with stage count 1. Regtested on SPU. On arm-linux-gnueabi regtseted on c,c++. Bootstrap c language with SMS flags enabling SMS also on loops with stage count 1. OK for mainline? Thanks, Revital Changelog: * modulo-sched.c (doloop_register_get): Ignore DEBUG_INSNs while recognizing doloop. { Index: modulo-sched.c =================================================================== --- modulo-sched.c (revision 173368) +++ modulo-sched.c (working copy) @@ -310,10 +313,10 @@ doloop_register_get (rtx head ATTRIBUTE_ either a single (parallel) branch-on-count or a (non-parallel) branch immediately preceded by a single (decrement) insn. */ first_insn_not_to_check = (GET_CODE (PATTERN (tail)) == PARALLEL ? tail - : PREV_INSN (tail)); + : prev_nondebug_insn (tail)); for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN (insn)) - if (reg_mentioned_p (reg, insn)) + if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn)) { if (dump_file)