From 064562360a310f08592d41e9fceb3404932c4a04 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Sat, 12 Sep 2009 21:35:04 +0000 Subject: Optimise the code generated at trace points --- includes/Rts.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'includes/Rts.h') diff --git a/includes/Rts.h b/includes/Rts.h index 753a66436b..1bfb37a1bf 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -65,6 +65,12 @@ extern "C" { #define END_RTS_PRIVATE /* disabled: END_RTS_PRIVATE */ #endif +#if __GNUC__ > 4 +#define RTS_UNLIKELY(p) __builtin_expect((p),0) +#else +#define RTS_UNLIKELY(p) p +#endif + /* Fix for mingw stat problem (done here so it's early enough) */ #ifdef mingw32_HOST_OS #define __MSVCRT__ 1 -- cgit v1.2.1