2014-03-08 Tobias Burnus <burnus@net-b.de>
* libgfortran.h (unlikely, likely): Add usage comment.
From-SVN: r208434
+2014-03-08 Tobias Burnus <burnus@net-b.de>
+
+ * libgfortran.h (unlikely, likely): Add usage comment.
+
2014-03-08 Dominique d'Humieres <dominiq@lps.ens.fr>
PR libgfortran/60128
#define NULL (void *) 0
#endif
+
+/* The following macros can be used to annotate conditions which are likely or
+ unlikely to be true. Avoid using them when a condition is only slightly
+ more likely/less unlikely than average to avoid the performance penalties of
+ branch misprediction. In addition, as __builtin_expect overrides the compiler
+ heuristic, do not use in conditions where one of the branches ends with a
+ call to a function with __attribute__((noreturn)): the compiler internal
+ heuristic will mark this branch as much less likely as unlikely() would
+ do. */
+
#ifndef __GNUC__
#define __attribute__(x)
#define likely(x) (x)