From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36708 invoked by alias); 20 Oct 2015 22:55:37 -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 36699 invoked by uid 89); 20 Oct 2015 22:55:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 20 Oct 2015 22:55:36 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id B4599C0AF78A; Tue, 20 Oct 2015 22:55:34 +0000 (UTC) Received: from localhost.localdomain (vpn1-4-114.ams2.redhat.com [10.36.4.114]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9KMtX1p008756; Tue, 20 Oct 2015 18:55:33 -0400 Subject: Re: [Patch, MIPS] Frame header optimization for MIPS (part 2) To: Steve Ellcey , gcc-patches@gcc.gnu.org References: Cc: matthew.fortune@imgtec.com, clm@codesourcery.com From: Bernd Schmidt Message-ID: <5626C664.7030006@redhat.com> Date: Tue, 20 Oct 2015 23:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg01997.txt.bz2 On 10/16/2015 10:21 PM, Steve Ellcey wrote: > Here is the second part of the MIPS frame header optimization patch. I'll leave reviewing the functionality to the MIPS maintainers. But... > + return TARGET_OLDABI && flag_frame_header_optimization && (optimize > 0); > + if ((fn != NULL) && fn->machine->optimize_call_stack) > + if (TARGET_OLDABI > + && (optimize > 0) > + && flag_frame_header_optimization > + && !MAIN_NAME_P (DECL_NAME (current_function_decl)) > + && (cfun->machine->varargs_size == 0) > + && (crtl->args.pretend_args_size == 0) > + && (frame->var_size == 0) > + && (frame->num_acc == 0) > + && (frame->num_cop0_regs == 0) > + && (frame->num_fp == 0) > + && (frame->num_gp > 0) > + && (frame->num_gp <= MAX_ARGS_IN_REGISTERS) > + && (!GENERATE_MIPS16E_SAVE_RESTORE) > + && (!cfun->machine->interrupt_handler_p) > + && (cfun->machine->does_not_use_frame_header) > + && (cfun->machine->optimize_call_stack) > + && (!cfun->machine->callers_may_not_allocate_frame) > + && !mips_cfun_has_cprestore_slot_p ()) > + return ((cfun->machine->frame.total_size == 0) > + && !cfun->machine->use_frame_header_for_callee_saved_regs); There are many unnecessary parentheses in this patch which should be removed. Bernd