diff options
author | Luca Barbieri <[email protected]> | 2010-08-10 10:26:14 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-08-11 11:27:46 +0200 |
commit | 6f3c4819ecf397cf9efee0213e628e15c1bc704d (patch) | |
tree | 0d37f767a13637bdc27eb3aae0b4f461e40932af /src | |
parent | 5668526c915a1e31036386d117c536592dae6859 (diff) |
gallium: add ALWAYS_INLINE
Used when we want to be sure the compiler inlines a large function into
an inner loop.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/include/pipe/p_compiler.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h index 0358c14e24b..1fa3ec8300a 100644 --- 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 |