From patchwork Fri Apr 1 14:45:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 89269 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 1CEF41007D8 for ; Sat, 2 Apr 2011 01:46:06 +1100 (EST) Received: (qmail 30927 invoked by alias); 1 Apr 2011 14:46:05 -0000 Received: (qmail 30887 invoked by uid 22791); 1 Apr 2011 14:46:03 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Apr 2011 14:45:58 +0000 Received: (qmail 8128 invoked from network); 1 Apr 2011 14:45:57 -0000 Received: from unknown (HELO ?192.168.1.66?) (vries@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Apr 2011 14:45:57 -0000 Message-ID: <4D95E523.1050800@codesourcery.com> Date: Fri, 01 Apr 2011 16:45:55 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH, PR43920, 1/9] ARM specific part. References: <4D94C603.7080505@codesourcery.com> <4D94C6FB.1080309@codesourcery.com> In-Reply-To: <4D94C6FB.1080309@codesourcery.com> 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 Reposting, with ChangeLog. 2011-04-01 Tom de Vries PR target/43920 * config/arm/arm.h (BRANCH_COST): Set to 1 for Thumb-2 when optimizing for size. Index: gcc/config/arm/arm.h =================================================================== --- gcc/config/arm/arm.h (revision 293961) +++ gcc/config/arm/arm.h (revision 293962) @@ -2201,7 +2201,8 @@ typedef struct /* Try to generate sequences that don't involve branches, we can then use conditional instructions */ #define BRANCH_COST(speed_p, predictable_p) \ - (TARGET_32BIT ? 4 : (optimize > 0 ? 2 : 0)) + (TARGET_32BIT ? (TARGET_THUMB2 && optimize_size ? 1 : 4) \ + : (optimize > 0 ? 2 : 0)) /* Position Independent Code. */ /* We decide which register to use based on the compilation options and