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 <kyrylo.tkac...@arm.com> > > * 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.