From patchwork Thu Dec 22 14:35:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 132856 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 3917FB717D for ; Fri, 23 Dec 2011 01:35:34 +1100 (EST) Received: (qmail 12035 invoked by alias); 22 Dec 2011 14:35:28 -0000 Received: (qmail 11892 invoked by uid 22791); 22 Dec 2011 14:35:27 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Dec 2011 14:35:13 +0000 Received: by yenm12 with SMTP id m12so5230339yen.20 for ; Thu, 22 Dec 2011 06:35:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.187.97 with SMTP id x61mr15065185yhm.97.1324564512929; Thu, 22 Dec 2011 06:35:12 -0800 (PST) Received: by 10.147.133.6 with HTTP; Thu, 22 Dec 2011 06:35:12 -0800 (PST) In-Reply-To: References: Date: Thu, 22 Dec 2011 15:35:12 +0100 Message-ID: Subject: Re: [PATCH, i386]: Enable flag_ree also on 32bit targets From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Ilya Enkovich 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 On Wed, Dec 21, 2011 at 9:13 PM, Uros Bizjak wrote: > As shown by pr50038.c testcase, recent redundant extension insns > improvements also benefit 32bit targets... I have committed this additional patch that moves option processing to the right place. 2011-12-22 Uros Bizjak * common/config/i386/i386-common.c (ix86_option_optimization_table): Move OPT_free processing from ... * config/i386/i386.c (ix86_option_override_internal): ... here. Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32}, committed. Uros. Index: common/config/i386/i386-common.c =================================================================== --- common/config/i386/i386-common.c (revision 182615) +++ common/config/i386/i386-common.c (working copy) @@ -599,6 +599,8 @@ ix86_handle_option (struct gcc_options *opts, static const struct default_options ix86_option_optimization_table[] = { + /* Enable redundant extension instructions removal at -O2 and higher. */ + { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 }, /* Turn off -fschedule-insns by default. It tends to make the problem with not enough registers even worse. */ { OPT_LEVELS_ALL, OPT_fschedule_insns, NULL, 0 }, Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 182615) +++ config/i386/i386.c (working copy) @@ -3445,10 +3445,6 @@ ix86_option_override_internal (bool main_args_p) #define USE_X86_64_FRAME_POINTER 0 #endif - /* Enable redundant extension instructions removal at -O2 and higher. */ - if (optimize >= 2 && !global_options_set.x_flag_ree) - flag_ree = 1; - /* Set the default values for switches whose default depends on TARGET_64BIT in case they weren't overwritten by command line options. */ if (TARGET_64BIT)