aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-08-29 22:57:00 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-08-29 22:57:00 +0000
commit55907d1274ce715b92d584e305e0708e333a33c0 (patch)
treecef39c9e649d5a68d13ff4c240a25695f46d01c8 /include
parent15b7a98ece81ec275a560c77b814e0479a669bc6 (diff)
downloadexternal_llvm-55907d1274ce715b92d584e305e0708e333a33c0.zip
external_llvm-55907d1274ce715b92d584e305e0708e333a33c0.tar.gz
external_llvm-55907d1274ce715b92d584e305e0708e333a33c0.tar.bz2
Replace the BUILTIN_EXPECT macro with a less horrible LLVM_LIKELY/LLVM_UNLIKELY interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/Compiler.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index ea0a4da..28e4cc6 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -106,9 +106,11 @@
#endif
#if (__GNUC__ >= 4)
-#define BUILTIN_EXPECT(EXPR, VALUE) __builtin_expect((EXPR), (VALUE))
+#define LLVM_LIKELY(EXPR) __builtin_expect((EXPR), true)
+#define LLVM_UNLIKELY(EXPR) __builtin_expect((EXPR), false)
#else
-#define BUILTIN_EXPECT(EXPR, VALUE) (EXPR)
+#define LLVM_LIKELY(EXPR) (EXPR)
+#define LLVM_UNLIKELY(EXPR) (EXPR)
#endif