From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6704 invoked by alias); 21 Jul 2015 11:14:06 -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 6693 invoked by uid 89); 21 Jul 2015 11:14:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: cam-smtp0.cambridge.arm.com Received: from fw-tnat.cambridge.arm.com (HELO cam-smtp0.cambridge.arm.com) (217.140.96.140) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 21 Jul 2015 11:14:05 +0000 Received: from arm.com (e106375-lin.cambridge.arm.com [10.2.207.23]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id t6LBE1sJ007199; Tue, 21 Jul 2015 12:14:01 +0100 Date: Tue, 21 Jul 2015 11:15:00 -0000 From: James Greenhalgh To: Kyrill Tkachov Cc: GCC Patches , Marcus Shawcroft , Richard Earnshaw Subject: Re: [PATCH][AArch64][7/14] Implement TARGET_SET_CURRENT_FUNCTION Message-ID: <20150721111401.GA11073@arm.com> References: <55A7CBD8.8000705@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55A7CBD8.8000705@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg01737.txt.bz2 On Thu, Jul 16, 2015 at 04:20:56PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch implements TARGET_SET_CURRENT_FUNCTION and defines SWITCHABLE_TARGET. > With this patch in the series, we should be far enough to get LTO option switching to work properly. > > The implementation if TARGET_SET_CURRENT_FUNCTION is pretty much a direct copy from the rs6000 backend, > and i386 has a very similar structure as well. I tried to simplify this for aarch64, but in the end > this implementation was the one that worked. > > TARGET_SET_CURRENT_FUNCTION should take the target-specific options from DECL_FUNCTION_SPECIFIC_TARGET > and use them to set up the backend state. Since it may be called many times for the same function, > we keep track of the previous function this got called on in order to avoid repeating work. > > Bootstrapped and tested on aarch64. > > Ok for trunk? OK. Thanks, James > > Thanks, > Kyrill > > 2015-07-16 Kyrylo Tkachov > > * config/aarch64/aarch64.h (SWITCHABLE_TARGET): Define. > * config/aarch64/aarch64.c: Include target-globals.h > (aarch64_previous_fndecl): New variable. > (aarch64_set_current_function): New function. > (TARGET_SET_CURRENT_FUNCTION): Define.