Re: [PATCH 1/2] Add an no_reorder attribute for LTO

2014-09-22 Thread Jan Hubicka
> gcc/c-family/: > > 2014-09-15 Andi Kleen > > * c-common.c (handle_no_reorder_attribute): New function. > (c_common_attribute_table): Add no_reorder attribute. > > gcc/: > > 2014-09-14 Andi Kleen > > * cgraph.h (symtab_node): Add no_reorder attribute. > (symbol_t

Re: [PATCH 1/2] Add an no_reorder attribute for LTO

2014-09-14 Thread Andi Kleen
> I see, you want to mix toplevel/non-toplevel across partitions. In that case > we also > need to disable logic sorting partitions by size if no_reorder BBs exists in > more than > one partition. Isn't that already broken then with -fno-toplevel-reorder? It already puts ordered nodes into di

Re: [PATCH 1/2] Add an no_reorder attribute for LTO

2014-09-14 Thread Jan Hubicka
> > Yep, -fno-toplevel-reorder also ldisables some optimizations (as unreachable > > function removal) > > Actually it seemed like in my tests it only disables unreachable > variable removal. Might have been wrong though. > > > >/* Set when function is visible by other units. */ > > >uns

Re: [PATCH 1/2] Add an no_reorder attribute for LTO

2014-09-14 Thread Andi Kleen
> Yep, -fno-toplevel-reorder also ldisables some optimizations (as unreachable > function removal) Actually it seemed like in my tests it only disables unreachable variable removal. Might have been wrong though. > >/* Set when function is visible by other units. */ > >unsigned externally

Re: [PATCH 1/2] Add an no_reorder attribute for LTO

2014-09-14 Thread Jan Hubicka
> From: Andi Kleen > > Some projects need to prevent reordering of specific top level > declarations with LTO, in particular declarations defining init calls. Thanks for working on it! > > The only way to do that with LTO was to use -fno-toplevel-reorder, > which stops reordering for all declar