From patchwork Thu Jul 21 16:30:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Zhuykov X-Patchwork-Id: 106103 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]) by ozlabs.org (Postfix) with SMTP id 56E06B6F75 for ; Fri, 22 Jul 2011 02:32:08 +1000 (EST) Received: (qmail 13357 invoked by alias); 21 Jul 2011 16:31:32 -0000 Received: (qmail 13204 invoked by uid 22791); 21 Jul 2011 16:31:29 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (140.186.70.92) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Jul 2011 16:31:13 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qjw9N-0002EM-4o for gcc-patches@gcc.gnu.org; Thu, 21 Jul 2011 12:31:12 -0400 Received: from smtp.ispras.ru ([83.149.198.202]:44946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qjw9M-0002E6-OB for gcc-patches@gcc.gnu.org; Thu, 21 Jul 2011 12:31:01 -0400 Received: from ispserv.ispras.ru (ispserv.ispras.ru [83.149.198.72]) by smtp.ispras.ru (Postfix) with ESMTP id 0A0235D4084; Thu, 21 Jul 2011 20:22:40 +0400 (MSD) Received: from condor.intra.ispras.ru (winnie.ispras.ru [83.149.198.236]) by ispserv.ispras.ru (Postfix) with ESMTP id 5818E3FC57; Thu, 21 Jul 2011 20:30:35 +0400 (MSD) From: zhroma@ispras.ru To: gcc-patches@gcc.gnu.org Cc: dm@ispras.ru Subject: [PATCH 9/9] [ARM] Remove artificial doloop_end pattern Date: Thu, 21 Jul 2011 20:30:34 +0400 Message-Id: <1311265834-2144-10-git-send-email-zhroma@ispras.ru> In-Reply-To: <1311265834-2144-1-git-send-email-zhroma@ispras.ru> References: <1311265834-2144-1-git-send-email-zhroma@ispras.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 83.149.198.202 X-IsSubscribed: yes 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 This patch eliminates fake doloop_end pattern for ARM platform. The problem with such a pattern is that it slows down the loop when SMS doesn't create good schedule. So, i suppose fake pattern is no longer needed with new loop forms supported. 2011-07-20 Roman Zhuykov * config/arm/thumb2.md (doloop_end): Delete. --- gcc/config/arm/thumb2.md | 51 ---------------------------------------------- 1 files changed, 0 insertions(+), 51 deletions(-) diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 9a11012..492e765 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -1101,54 +1101,3 @@ operands[2] = GEN_INT (32 - INTVAL (operands[2])); ") -;; Define the subtract-one-and-jump insns so loop.c -;; knows what to generate. -(define_expand "doloop_end" - [(use (match_operand 0 "" "")) ; loop pseudo - (use (match_operand 1 "" "")) ; iterations; zero if unknown - (use (match_operand 2 "" "")) ; max iterations - (use (match_operand 3 "" "")) ; loop level - (use (match_operand 4 "" ""))] ; label - "TARGET_32BIT" - " - { - /* Currently SMS relies on the do-loop pattern to recognize loops - where (1) the control part consists of all insns defining and/or - using a certain 'count' register and (2) the loop count can be - adjusted by modifying this register prior to the loop. - ??? The possible introduction of a new block to initialize the - new IV can potentially affect branch optimizations. */ - if (optimize > 0 && flag_modulo_sched) - { - rtx s0; - rtx bcomp; - rtx loc_ref; - rtx cc_reg; - rtx insn; - rtx cmp; - - /* Only use this on innermost loops. */ - if (INTVAL (operands[3]) > 1) - FAIL; - - if (GET_MODE (operands[0]) != SImode) - FAIL; - - s0 = operands [0]; - if (TARGET_THUMB2) - insn = emit_insn (gen_thumb2_addsi3_compare0 (s0, s0, GEN_INT (-1))); - else - insn = emit_insn (gen_addsi3_compare0 (s0, s0, GEN_INT (-1))); - - cmp = XVECEXP (PATTERN (insn), 0, 0); - cc_reg = SET_DEST (cmp); - bcomp = gen_rtx_NE (VOIDmode, cc_reg, const0_rtx); - loc_ref = gen_rtx_LABEL_REF (VOIDmode, operands [4]); - emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, - gen_rtx_IF_THEN_ELSE (VOIDmode, bcomp, - loc_ref, pc_rtx))); - DONE; - }else - FAIL; - }") -