On 11/12/2015 04:58 PM, Ramana Radhakrishnan wrote: > > > On 12/11/15 15:52, Martin Liška wrote: >> On 11/12/2015 12:29 PM, Richard Biener wrote: >>> On Thu, Nov 12, 2015 at 11:03 AM, Martin Liška <mli...@suse.cz> wrote: >>>> Hello. >>>> >>>> Following patch was a bit negotiated with Jakub and can save a huge amount >>>> of memory in cases >>>> where target attributes are heavily utilized. >>>> >>>> Can bootstrap and survives regression tests on x86_64-linux-pc. >>>> >>>> Ready for trunk? >>> >>> +static bool opts_obstack_initialized = false; >>> + >>> +/* Initialize opts_obstack if not initialized. */ >>> + >>> +void >>> +init_opts_obstack (void) >>> +{ >>> + if (!opts_obstack_initialized) >>> + { >>> + opts_obstack_initialized = true; >>> + gcc_obstack_init (&opts_obstack); >>> >>> you can move the static global to function scope. >>> >>> Ok with that change. >> >> Done and installed as r230264. Final version of the patch is attached. >> >>> >>> Btw, don't other targets need a similar adjustment to their hook? >>> Grepping shows arm and nios2. >> >> nios2 is not the case as it doesn't utilize: >> init_options_struct (&func_options, NULL); >> >> I've been testing patch for aarch64 that is also included in the email. > > The change is also needed in config/aarch64/aarch64.c > (aarch64_option_valid_attribute_p). The attached patch is for arm i.e. 32 bit > arm. > > Ramana
You are right that the change is for arm32, I wrongly wrote aarch64. However if you read aarch64_option_valid_attribute_p, there is no init_options_struct (&func_options, NULL). So that, I'm going to test on an arm32 machine. Martin > >> >> Martin >> >>> >>> Thanks, >>> Richard. >>> >>> >>>> Thanks, >>>> Martin >>