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 measured it yet, though. > > > > gcc/ChangeLog: > > * system.h (GCC_LIKELY, GCC_UNLIKELY): New macros, adapted from > > libgfortran.h. > ISTM if we're going to bother with this stuff that we should try to be > consistent between glibc and gcc. Anything else seems like utter > madness to me.
Do we really need these macros at all? We are already using __builtin_expect directly in gcc/ subdirectory (with system.h providing a dummy macro if not supported by the host compiler). And I bet GCC developers are all familiar with __builtin_expect. Jakub