[llvm-commits] [llvm] r91416 - /llvm/trunk/include/llvm/Support/Compiler.h
Chris Lattner
sabre at nondot.org
Mon Dec 14 22:14:33 PST 2009
Author: lattner
Date: Tue Dec 15 00:14:33 2009
New Revision: 91416
URL: http://llvm.org/viewvc/llvm-project?rev=91416&view=rev
Log:
add an ALWAYS_INLINE macro, which does the obvious thing.
Modified:
llvm/trunk/include/llvm/Support/Compiler.h
Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=91416&r1=91415&r2=91416&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Tue Dec 15 00:14:33 2009
@@ -70,6 +70,16 @@
#define DISABLE_INLINE
#endif
+// ALWAYS_INLINE - On compilers where we have a directive to do so, mark a
+// method "always inline" because it is performance sensitive.
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#define ALWAYS_INLINE __attribute__((always_inline))
+#else
+// TODO: No idea how to do this with MSVC.
+#define ALWAYS_INLINE
+#endif
+
+
#ifdef __GNUC__
#define NORETURN __attribute__((noreturn))
#elif defined(_MSC_VER)
More information about the llvm-commits
mailing list