From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6829 invoked by alias); 24 Nov 2016 15:30:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 6809 invoked by uid 89); 24 Nov 2016 15:30:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1585, U*ebotcazou X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Nov 2016 15:30:47 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id AD4DB8138D for ; Thu, 24 Nov 2016 16:30:45 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m_FC0oO6Lplq for ; Thu, 24 Nov 2016 16:30:45 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 8AF168138A for ; Thu, 24 Nov 2016 16:30:45 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [SPARC] Enable REE at -O2 by default in 64-bit mode Date: Thu, 24 Nov 2016 15:30:00 -0000 Message-ID: <2089802.4AkFIGpqyi@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-48-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2043734.zFvxySjgn3" Content-Transfer-Encoding: 7Bit X-SW-Source: 2016-11/txt/msg02560.txt.bz2 This is a multi-part message in MIME format. --nextPart2043734.zFvxySjgn3 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 385 Tests showed that it helps to eliminates redundant 32-to-64-bit extensions. Tested on SPARC/Solaris, applied on the mainline. 2016-11-24 Eric Botcazou * common/config/sparc/sparc-common.c (option_optimization_table): Enable REE at -O2 and higher. * config/sparc/sparc.c (sparc_option_override): Disable it by default in 32-bit mode. -- Eric Botcazou --nextPart2043734.zFvxySjgn3 Content-Disposition: attachment; filename="sparc_ree.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="sparc_ree.diff" Content-length: 1207 Index: common/config/sparc/sparc-common.c =================================================================== --- common/config/sparc/sparc-common.c (revision 242632) +++ common/config/sparc/sparc-common.c (working copy) @@ -28,6 +28,8 @@ along with GCC; see the file COPYING3. static const struct default_options sparc_option_optimization_table[] = { { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, + /* Enable redundant extension instructions removal at -O2 and higher. */ + { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 }, { OPT_LEVELS_NONE, 0, NULL, 0 } }; Index: config/sparc/sparc.c =================================================================== --- config/sparc/sparc.c (revision 242632) +++ config/sparc/sparc.c (working copy) @@ -1713,6 +1713,11 @@ sparc_option_override (void) pessimizes for double floating-point registers. */ if (!global_options_set.x_flag_ira_share_save_slots) flag_ira_share_save_slots = 0; + + /* Only enable REE by default in 64-bit mode where it helps to eliminate + redundant 32-to-64-bit extensions. */ + if (!global_options_set.x_flag_ree && TARGET_ARCH32) + flag_ree = 0; } /* Miscellaneous utilities. */ --nextPart2043734.zFvxySjgn3--