Re: [PATCH 1/8] Add GCC_LIKELY and GCC_UNLIKELY

2018-06-15 Thread David Malcolm
On Fri, 2018-06-15 at 10:36 -0600, Jeff Law wrote: > On 06/15/2018 10:35 AM, Jakub Jelinek wrote: > > On Fri, Jun 15, 2018 at 10:31:26AM -0600, Jeff Law wrote: > > > On 06/14/2018 02:32 PM, David Malcolm wrote: > > > > The idea is to later use these macros to mark the > > > > if (dump_enabled_p (

Re: [PATCH 1/8] Add GCC_LIKELY and GCC_UNLIKELY

2018-06-15 Thread Jeff Law
On 06/15/2018 10:35 AM, Jakub Jelinek wrote: > On Fri, Jun 15, 2018 at 10:31:26AM -0600, Jeff Law wrote: >> On 06/14/2018 02:32 PM, David Malcolm wrote: >>> The idea is to later use these macros to mark the >>> if (dump_enabled_p ()) >>> parts of the compiler as cold, in the hope of helping non-P

Re: [PATCH 1/8] Add GCC_LIKELY and GCC_UNLIKELY

2018-06-15 Thread Jakub Jelinek
On Fri, Jun 15, 2018 at 10:31:26AM -0600, Jeff Law wrote: > On 06/14/2018 02:32 PM, David Malcolm wrote: > > The idea is to later use these macros to mark the > > if (dump_enabled_p ()) > > parts of the compiler as cold, in the hope of helping non-PGO builds > > of gcc. > > > > I haven't measure

Re: [PATCH 1/8] Add GCC_LIKELY and GCC_UNLIKELY

2018-06-15 Thread Jeff Law
On 06/14/2018 02:32 PM, David Malcolm wrote: > The idea is to later use these macros to mark the > if (dump_enabled_p ()) > parts of the compiler as cold, in the hope of helping non-PGO builds > of gcc. > > I haven't measured it yet, though. > > gcc/ChangeLog: > * system.h (GCC_LIKELY, GC

Re: [PATCH 1/8] Add GCC_LIKELY and GCC_UNLIKELY

2018-06-14 Thread Alexander Monakov
On Thu, 14 Jun 2018, David Malcolm wrote: > The idea is to later use these macros to mark the > if (dump_enabled_p ()) > parts of the compiler as cold, in the hope of helping non-PGO builds > of gcc. I think a cleaner way to achieve that would be to mark a function called under the predicate wi

[PATCH 1/8] Add GCC_LIKELY and GCC_UNLIKELY

2018-06-14 Thread David Malcolm
The idea is to later use these macros to mark the if (dump_enabled_p ()) parts of the compiler as cold, in the hope of helping non-PGO builds of gcc. I haven't measured it yet, though. gcc/ChangeLog: * system.h (GCC_LIKELY, GCC_UNLIKELY): New macros, adapted from libgfortran.h.