summaryrefslogtreecommitdiff
path: root/includes/Rts.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-09-12 21:35:04 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-09-12 21:35:04 +0000
commit064562360a310f08592d41e9fceb3404932c4a04 (patch)
tree52fb145e9d42328188fc218c2c1ea95bcfbe7e4e /includes/Rts.h
parent53628e913632cac29d54da914040e39add334784 (diff)
downloadhaskell-064562360a310f08592d41e9fceb3404932c4a04.tar.gz
Optimise the code generated at trace points
Diffstat (limited to 'includes/Rts.h')
-rw-r--r--includes/Rts.h6
1 files changed, 6 insertions, 0 deletions
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