From patchwork Fri Aug 14 12:21:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Suchanek X-Patchwork-Id: 507367 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CD91D1401EF for ; Fri, 14 Aug 2015 22:21:29 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=PKWEG5ef; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=kUl R5syRW0DC7pKD+ErF5mDhLRNpzIk1FtP1pWmXXCb8xjsnz3+pnM8ZUuLadxaJTta vzqUleqJMTX2Y+TDPSXzyMH69YW5ObZZsrySXAipljAKUo81HlaR1yzN5+wdaw/Q Kf0xhp+vTM14+4egYApZiZoAtSSEAd/zi2o7PkkY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=sTIcg/mij l0e4iLuCHmRhVRsz4Y=; b=PKWEG5efMC4ESjceXZmOi7S/qmj0MGNRR0i0tieJh nQFf0pG5+RTWatvI0fgZ7Zx/WGx1qcenj8QFfMsvDjbV8OEMIXAhf0x1+Vjy6se2 Cz5oevG0SHKq8jGOBP+mpwgE9bgXq1+V37MGNr1+Bq+X/dapsxRBSPcp3e4rt5i6 6E= Received: (qmail 32210 invoked by alias); 14 Aug 2015 12:21:08 -0000 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 Received: (qmail 32137 invoked by uid 89); 14 Aug 2015 12:21:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Aug 2015 12:21:05 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 0C8638A33CFBF; Fri, 14 Aug 2015 13:21:01 +0100 (IST) Received: from hhmail02.hh.imgtec.org (10.100.10.20) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 14 Aug 2015 13:21:03 +0100 Received: from hhmail02.hh.imgtec.org ([::1]) by hhmail02.hh.imgtec.org ([::1]) with mapi id 14.03.0235.001; Fri, 14 Aug 2015 13:21:02 +0100 From: Robert Suchanek To: Matthew Fortune , "Catherine_Moore@mentor.com" CC: "gcc-patches@gcc.gnu.org" Subject: [PATCH] Disable -mbranch-likely for -Os when targetting generic architecture Date: Fri, 14 Aug 2015 12:21:01 +0000 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi, The patch below disables generation of the branch likely instructions for -Os but only for generic architecture. The branch likely may result in some code size reduction but the cost of running the code on R6 core is significant. Disabling this for generic architecture would therefore be desirable for now. Ok to apply? Regards, Robert gcc/ * mips.c (mips_option_override): Enable branch likely for non-generic architecture. --- gcc/config/mips/mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index a9829bd..68def06 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -19564,7 +19564,7 @@ mips_option_override (void) if ((target_flags_explicit & MASK_BRANCHLIKELY) == 0) { if (ISA_HAS_BRANCHLIKELY - && (optimize_size + && ((optimize_size && strncmp (mips_arch_info->name, "mips", 4) != 0) || (mips_tune_info->tune_flags & PTF_AVOID_BRANCHLIKELY) == 0)) target_flags |= MASK_BRANCHLIKELY; else