From patchwork Wed Nov 28 01:47:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Cheng X-Patchwork-Id: 202352 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 64AFE2C0087 for ; Wed, 28 Nov 2012 12:48:25 +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=1354672106; 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=nPiCwZNUd1gixtn5z0iqQAGLPwg=; b=E2WFPu5ePL5cqrv xF/fcz0Us0ZSFiwEkvPcuCwhG5HGT1+qJeQ48j75CGEzVk+w1oOOFJcM4k9Aww+p FOXL+DFFqnsY2QlNl/m3uDjrUQUOSEWT6IJ6rVFZRgK8T6gUfmxq4G6PbatbdNTF L1zE4OoVzbNkRG/L/0RSrrRm6n1c= 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:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=V8LGHOMYtJEbc1ooz/1ZbMrMkHwB6dcACZM5WR0q+YmlwbM44AeZ/6P2WN/sIe RIXK8xePkt9qOcwLs2ju7rZky/S13QitHr/3X4HQWIoQOEK/NVHX+95m4CMQx7Qj IU0oUE7qbytjFe62HKxY5/9lg0LNGDVoeCl5nqIPjitok=; Received: (qmail 26335 invoked by alias); 28 Nov 2012 01:48:21 -0000 Received: (qmail 26269 invoked by uid 22791); 28 Nov 2012 01:48:20 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, 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; Wed, 28 Nov 2012 01:48:13 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 28 Nov 2012 01:48:12 +0000 Received: from Binsh02 ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 28 Nov 2012 01:48:10 +0000 From: "Bin Cheng" To: "Richard Earnshaw" Cc: References: <001d01cdcc87$6065fbc0$2131f340$@cheng@arm.com> <50B5001E.1020901@arm.com> In-Reply-To: <50B5001E.1020901@arm.com> Subject: RE: [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2 Date: Wed, 28 Nov 2012 09:47:32 +0800 Message-ID: <001e01cdcd0a$56dd4080$0497c180$@cheng@arm.com> MIME-Version: 1.0 X-MC-Unique: 112112801481201101 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 > -----Original Message----- > From: Richard Earnshaw > Sent: Wednesday, November 28, 2012 2:02 AM > To: Bin Cheng > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2 > > On 27/11/12 10:10, Bin Cheng wrote: > > Hi, > > I committed the patch implementing register pressure directed hoist in > > TRUNK and enabled the option "-fira-hoist-pressure" for all targets by > > reviewer's suggestion, although it has no obvious effect on > > Thumb2/x86/x86_64. Now I collected performance data with Os and found > > it causes performance regression in some cases on Thumb2, so this > > patch disables the option on > > Thumb2 and modify the corresponding test cases. > > > > Tested on arm-none-eabi/M3, is it OK? > > > > Thanks. > > > > > > 2012-11-21 Bin Cheng > > > > * config/arm/arm.c (arm_option_override): Disable option > > -fira-hoist-pressure on Thumb2. > > > > 2012-11-21 Bin Cheng > > > > * gcc.dg/hoist-register-pressure-1.c: Skip on ARM Thumb2. > > * gcc.dg/hoist-register-pressure-2.c: Ditto. > > * gcc.dg/hoist-register-pressure-3.c: Ditto. > > > > > > > > > > > > No patch. Very sorry for missing the patch. Thanks. Index: gcc/testsuite/gcc.dg/hoist-register-pressure-1.c =================================================================== --- gcc/testsuite/gcc.dg/hoist-register-pressure-1.c (revision 193687) +++ gcc/testsuite/gcc.dg/hoist-register-pressure-1.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-Os -fdump-rtl-hoist" } */ -/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { nonpic } } } } */ +/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { nonpic && { ! arm_thumb2 } } } } } */ /* { dg-final { cleanup-rtl-dump "hoist" } } */ #define BUF 100 Index: gcc/testsuite/gcc.dg/hoist-register-pressure-2.c =================================================================== --- gcc/testsuite/gcc.dg/hoist-register-pressure-2.c (revision 193687) +++ gcc/testsuite/gcc.dg/hoist-register-pressure-2.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-Os -fdump-rtl-hoist" } */ -/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */ +/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { ! arm_thumb2 } } } } */ /* { dg-final { cleanup-rtl-dump "hoist" } } */ #define BUF 100 Index: gcc/testsuite/gcc.dg/hoist-register-pressure-3.c =================================================================== --- gcc/testsuite/gcc.dg/hoist-register-pressure-3.c (revision 193687) +++ gcc/testsuite/gcc.dg/hoist-register-pressure-3.c (working copy) @@ -1,5 +1,5 @@ /* { dg-options "-Os -fdump-rtl-hoist" } */ -/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */ +/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { ! arm_thumb2 } } } } */ /* { dg-final { cleanup-rtl-dump "hoist" } } */ #define BUF 100 Index: gcc/config/arm/arm.c =================================================================== --- gcc/config/arm/arm.c (revision 193687) +++ gcc/config/arm/arm.c (working copy) @@ -2027,6 +2027,12 @@ arm_option_override (void) else max_insns_skipped = current_tune->max_insns_skipped; + if (TARGET_THUMB2 && flag_ira_hoist_pressure) + { + /* Don't do register pressure directed hoist on Thumb2. */ + flag_ira_hoist_pressure = 0; + } + /* Hot/Cold partitioning is not currently supported, since we can't handle literal pool placement in that case. */ if (flag_reorder_blocks_and_partition)