From patchwork Tue Jul 21 10:22:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 498142 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 AFA6A140D31 for ; Tue, 21 Jul 2015 20:23:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=W0Oanj9P; 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=PRoB0PDssYUcP+sFY Y6Z1dc3k9FbIxwFpdft1r+/8M+neHH3jbnUt0nCr3psWC6bD08Q8ytntntxS9DQg D7xTxLniGp6CZuZOIycoZBLXnmrNpRTRCoTb4fq33fi68WD3Jq6uV/iNYBvRgaPc FxrWuY081qnsD1p1wDFsMd1pKM= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=KTe9nzSsenNVTOXALf2Im+r lZho=; b=W0Oanj9PT8XlJpf/kk4jmT7CUfkjUm6MqK8bEDxhKFHFA2cA3XhYpWU VW98elNaRYQWsv3flto0rHBjcgltR3MWrVOskGzgDK5JcJWc0mZgux4FjnG2O58f 181Eztrv89aiGSGnXhNTAewwL6uUn1OPj7SUsXynJ3Hp19efnK/Q= Received: (qmail 66564 invoked by alias); 21 Jul 2015 10:23:02 -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 66546 invoked by uid 89); 21 Jul 2015 10:23:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Jul 2015 10:23:00 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-33-qpkCmaLhQbuUJgegL3A4OQ-1; Tue, 21 Jul 2015 11:22:56 +0100 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 21 Jul 2015 11:22:55 +0100 Message-ID: <55AE1D7F.7010004@arm.com> Date: Tue, 21 Jul 2015 11:22:55 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: James Greenhalgh CC: GCC Patches , Marcus Shawcroft , Richard Earnshaw Subject: Re: [PATCH][AArch64][5/14] Make flag_omit_leaf_frame_pointer intialize to 2. Define and use TARGET_OMIT_LEAF_FRAME_POINTER References: <55A7CBCD.8000804@arm.com> <20150721100938.GA9195@arm.com> In-Reply-To: <20150721100938.GA9195@arm.com> X-MC-Unique: qpkCmaLhQbuUJgegL3A4OQ-1 X-IsSubscribed: yes Hi James, On 21/07/15 11:09, James Greenhalgh wrote: > On Thu, Jul 16, 2015 at 04:20:45PM +0100, Kyrill Tkachov wrote: >> Hi all, >> >> This patch wraps aarch64_frame_pointer_required into a TARGET_OMIT_LEAF_FRAME_POINTER macro >> and initializes aarch64_frame_pointer_required to 2 instead of 1, allowing us to detect from >> aarch64_frame_pointer_required whether the user explicitly specified -momit-leaf-frame-pointer >> or -mno-omit-leaf-frame-pointer. No functional changes in this patch. >> >> Bootstrapped and tested as part of series on aarch64. >> >> Ok for trunk? > I'm not sure the new macro adds much to this patch really, and it is just > one more layer of indirection to look through when I want to understand > the code. It seems to me that we can drop all the hunks except this one: > >> diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt >> index c9c0aff..e29d606 100644 >> --- a/gcc/config/aarch64/aarch64.opt >> +++ b/gcc/config/aarch64/aarch64.opt >> @@ -77,7 +77,7 @@ Target Report RejectNegative Mask(STRICT_ALIGN) >> Don't assume that unaligned accesses are handled by the system >> >> momit-leaf-frame-pointer >> -Target Report Save Var(flag_omit_leaf_frame_pointer) Init(1) >> +Target Report Save Var(flag_omit_leaf_frame_pointer) Init(2) >> Omit the frame pointer in leaf functions >> >> mtls-dialect= > So, OK for that part and please drop the rest (and update the ChangeLog > accordingly). Ok, if that extra indirection is deemed superfluous I don't mind removing it. Here's the much shorter version. I'll commit it together with the rest of the series when appropriate. Kyrill 2015-07-21 Kyrylo Tkachov * config/aarch64/aarch64.opt (momit-leaf-frame-pointer): Initialize flag_omit_leaf_frame_pointer to 2. > > Thanks, > James > > >> 2015-07-16 Kyrylo Tkachov >> >> * config/aarch64/aarch64.opt (momit-leaf-frame-pointer): Initialize >> flag_omit_leaf_frame_pointer to 2. >> * config/aarch64/aarch64.h (TARGET_OMIT_LEAF_FRAME_POINTER): New macro. >> * config/aarch64.aarch64.c (aarch64_frame_pointer_required): Use above. >> (aarch64_can_eliminate): Likewise. > commit 7cea4e8355ce7472fb026fc557cca3b932fe69f0 Author: Kyrylo Tkachov Date: Thu May 21 09:57:23 2015 +0100 [AArch64][5/N] Make flag_omit_leaf_frame_pointer intialize to 2. Define and use TARGET_OMIT_LEAF_FRAME_POINTER diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt index c9c0aff..e29d606 100644 --- a/gcc/config/aarch64/aarch64.opt +++ b/gcc/config/aarch64/aarch64.opt @@ -77,7 +77,7 @@ Target Report RejectNegative Mask(STRICT_ALIGN) Don't assume that unaligned accesses are handled by the system momit-leaf-frame-pointer -Target Report Save Var(flag_omit_leaf_frame_pointer) Init(1) +Target Report Save Var(flag_omit_leaf_frame_pointer) Init(2) Omit the frame pointer in leaf functions mtls-dialect=