From patchwork Sun May 8 04:37:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Revital Eres X-Patchwork-Id: 1418 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:47 -0000 Delivered-To: patches@linaro.org Received: by 10.224.184.145 with SMTP id ck17cs20492qab; Sat, 7 May 2011 21:37:24 -0700 (PDT) Received: by 10.213.102.84 with SMTP id f20mr1729126ebo.134.1304829443607; Sat, 07 May 2011 21:37:23 -0700 (PDT) Received: from mail-ey0-f178.google.com (mail-ey0-f178.google.com [209.85.215.178]) by mx.google.com with ESMTPS id e72si7172795eee.14.2011.05.07.21.37.23 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 07 May 2011 21:37:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) client-ip=209.85.215.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) smtp.mail=revital.eres@linaro.org Received: by eya25 with SMTP id 25so1458964eya.37 for ; Sat, 07 May 2011 21:37:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.15.83 with SMTP id j19mr554525eba.89.1304829441877; Sat, 07 May 2011 21:37:21 -0700 (PDT) Received: by 10.213.108.203 with HTTP; Sat, 7 May 2011 21:37:21 -0700 (PDT) Date: Sun, 8 May 2011 07:37:21 +0300 Message-ID: Subject: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop From: Revital Eres To: zaks@il.ibm.com Cc: gcc-patches@gcc.gnu.org, Patch Tracking 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) {