projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5668526
)
gallium: add ALWAYS_INLINE
author
Luca Barbieri
<luca@luca-barbieri.com>
Tue, 10 Aug 2010 08:26:14 +0000
(10:26 +0200)
committer
Luca Barbieri
<luca@luca-barbieri.com>
Wed, 11 Aug 2010 09:27:46 +0000
(11:27 +0200)
Used when we want to be sure the compiler inlines a large function into
an inner loop.
src/gallium/include/pipe/p_compiler.h
patch
|
blob
|
history
diff --git
a/src/gallium/include/pipe/p_compiler.h
b/src/gallium/include/pipe/p_compiler.h
index 0358c14e24b03b3cee615292739278299b6b8663..1fa3ec8300ab7d688397b0ee748d52652c0d55fe 100644
(file)
--- a/
src/gallium/include/pipe/p_compiler.h
+++ b/
src/gallium/include/pipe/p_compiler.h
@@
-102,6
+102,16
@@
typedef unsigned char boolean;
# endif
#endif
+/* Forced function inlining */
+#ifndef ALWAYS_INLINE
+# ifdef __GNUC__
+# define ALWAYS_INLINE inline __attribute__((always_inline))
+# elif defined(_MSC_VER)
+# define ALWAYS_INLINE __forceinline
+# else
+# define ALWAYS_INLINE INLINE
+# endif
+#endif
/* Function visibility */
#ifndef PUBLIC