New BLI_NOINLINE macro
This macro is handy in at least two occasions: * When you want to check the optimized generated assembly for some small function that would get inlined otherwise. * The marked function will be visible in profiling results. I can't test the implementations for other compilers now, so I did not include them. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D4754
This commit is contained in:
@@ -45,4 +45,10 @@ template<typename T> static inline T decltype_helper(T x)
|
||||
# define BLI_INLINE static inline __attribute__((always_inline)) __attribute__((__unused__))
|
||||
# endif
|
||||
|
||||
# if defined(__GNUC__)
|
||||
# define BLI_NOINLINE __attribute__((noinline))
|
||||
# else
|
||||
# define BLI_NOINLINE
|
||||
# endif
|
||||
|
||||
#endif /* __BLI_COMPILER_COMPAT_H__ */
|
||||
|
||||
Reference in New Issue
Block a user