Re: Add -Wsuggest-attribute=cold

2017-10-09 Thread Tom de Vries
On 07/24/2017 08:56 PM, Jan Hubicka wrote: * gcc.dg/cold-1.c: New testcase. Index: testsuite/gcc.dg/cold-1.c === --- testsuite/gcc.dg/cold-1.c (revision 0) +++ testsuite/gcc.dg/cold-1.c (working copy) @@ -0,0 +1,21 @@

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Martin Sebor
+extern void do_something_interesting_and_never_return (); + +int +foo1(int a) +{ /* { dg-warning "cold" "detect cold candidate" { target *-*-* } "8" } */ + if (a) +abort (); + else +abort (); +} In this case it looks to me like with the patch GCC will actually issue two suggestions: t

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Jeff Law
On 07/24/2017 04:06 PM, Jan Hubicka wrote: >> On 07/24/2017 01:08 PM, Jan Hubicka wrote: On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: > Hi, > this patch adds -Wsuggest-attribute=cold because we can now statically > detect > cold functions atuomatically. > > Boo

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Jan Hubicka
> On 07/24/2017 01:08 PM, Jan Hubicka wrote: > >> On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: > >>> Hi, > >>> this patch adds -Wsuggest-attribute=cold because we can now statically > >>> detect > >>> cold functions atuomatically. > >>> > >>> Bootstrapped/regtested x86_64-linux. Plan to co

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Jeff Law
On 07/24/2017 01:08 PM, Jan Hubicka wrote: >> On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: >>> Hi, >>> this patch adds -Wsuggest-attribute=cold because we can now statically >>> detect >>> cold functions atuomatically. >>> >>> Bootstrapped/regtested x86_64-linux. Plan to commit it tomorrow

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Jan Hubicka
> On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: > > Hi, > > this patch adds -Wsuggest-attribute=cold because we can now statically > > detect > > cold functions atuomatically. > > > > Bootstrapped/regtested x86_64-linux. Plan to commit it tomorrow if there > > are no > > complains. > > > >

Re: Add -Wsuggest-attribute=cold

2017-07-24 Thread Eric Gallager
On Mon, Jul 24, 2017 at 2:56 PM, Jan Hubicka wrote: > Hi, > this patch adds -Wsuggest-attribute=cold because we can now statically detect > cold functions atuomatically. > > Bootstrapped/regtested x86_64-linux. Plan to commit it tomorrow if there are > no > complains. > > Honza > > * invo