From patchwork Fri Jan 25 18:24:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greta Yorsh X-Patchwork-Id: 215824 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 DF4EF2C009F for ; Sat, 26 Jan 2013 05:25:29 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1359743130; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=WbRJWeXPVPNi5M4sZ6msVexnyLI=; b=RQidwLtKV21ty3x f1uYg5kAnwL4OVNwnJvk/gC5t8buL4OsbNTGSys4KzjbvjmSheWgwO68eGBpzdKt N3l7q0cGO9lbVr69e5jjr/acQeWwm3ub0FMny4GjfY1PgSf2FWhj2JYu/kzek6ai ZA+xEF5NQVM16tGL8zshxRtSgA00= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:X-MC-Unique:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=UIr/0gqt2KuiRW7OwjsgZ+OCxkabycyAhXNYV1AMDea+WLoEv24aGEyRstzoXb emEsVHoMhWkpEZhFA9sPsoW3nyONLJexAzuvYdhxJyPhxKw6FPE4ue1FSY2WzlxT DiaZgLChdAE0imaZRSAl5kPyS7VYIhtNeNi3Xtr8Go40E=; Received: (qmail 6317 invoked by alias); 25 Jan 2013 18:25:21 -0000 Received: (qmail 6275 invoked by uid 22791); 25 Jan 2013 18:25:16 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, KHOP_THREADED, MSGID_MULTIPLE_AT, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Jan 2013 18:24:39 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 25 Jan 2013 18:24:38 +0000 Received: from e103227vm ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 25 Jan 2013 18:24:35 +0000 From: "Greta Yorsh" To: "GCC Patches" Cc: "Richard Earnshaw" , "Ramana Radhakrishnan" , , , "Greta Yorsh" References: <000401cdfb27$da2f1f30$8e8d5d90$@yorsh@arm.com> In-Reply-To: <000401cdfb27$da2f1f30$8e8d5d90$@yorsh@arm.com> Subject: [PATCH,ARM][4/5] Fix calls in cortex-a7 pipeline description Date: Fri, 25 Jan 2013 18:24:31 -0000 Message-ID: <001601cdfb29$38714270$a953c750$@yorsh@arm.com> MIME-Version: 1.0 X-MC-Unique: 113012518243800201 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 Improve handling of call insns in cortex-a7 pipeline description, as follows. A call can dual-issue as a younger instruction but not as an older instruction (from compiler's point of view). This patch adjusts the function cortexa7_younger (used by the implementation of TARGET_SCHED_REORDER hook) to return true for calls. The patch also updates the pipeline description for calls to allow either dual-issue as a younger instruction or single-issue. gcc/ 2013-01-03 Greta Yorsh * config/arm/arm.c (cortexa7_younger): Return true for TYPE_CALL. * config/arm/cortex-a7.md (cortex_a7_call): Update required units. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index ab6c88b..9f61722 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -8746,6 +8746,7 @@ cortexa7_younger (FILE *file, int verbose, rtx insn) case TYPE_SIMPLE_ALU_IMM: case TYPE_SIMPLE_ALU_SHIFT: case TYPE_BRANCH: + case TYPE_CALL: return true; default: return false; --- a/gcc/config/arm/cortex-a7.md 2013-01-03 13:28:19.000000000 +0000 +++ b/gcc/config/arm/cortex-a7.md 2013-01-03 12:33:15.000000000 +0000 @@ -80,12 +80,15 @@ (eq_attr "neon_type" "none"))) "(cortex_a7_ex2|cortex_a7_ex1)+cortex_a7_branch") -;; A call reserves all issue slots. The result is available the next cycle. +;; Call cannot dual-issue as an older instruction. It can dual-issue +;; as a younger instruction, or single-issue. Call cannot dual-issue +;; with another branch instruction. The result is available the next +;; cycle. (define_insn_reservation "cortex_a7_call" 1 (and (eq_attr "tune" "cortexa7") (and (eq_attr "type" "call") (eq_attr "neon_type" "none"))) - "cortex_a7_all") + "(cortex_a7_ex2|cortex_a7_both)+cortex_a7_branch") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ALU instructions.