Skip to content

Commit

Permalink
add branch preference tuning framework for gcc
Browse files Browse the repository at this point in the history
Signed-off-by: RoelKluin <[email protected]>
  • Loading branch information
RoelKluin committed Sep 8, 2011
1 parent bccba45 commit c149499
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@
#ifdef __GNUC__
// Tell GCC to validate printf format string and args
#define ATTRIBUTE(list) __attribute__ (list)
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#define if_usual(x) if (likely(x))
#define if_ever(x) if (unlikely(x))
#else
#define ATTRIBUTE(list)
#define likely(x) (x)
#define unlikely(x) (x)
#define if_usual(x) if ((x))
#define if_ever(x) if ((x))
#endif


Expand Down

0 comments on commit c149499

Please sign in to comment.