builtins: define and use ALWAYS_INLINE

Abstract out the always inline spelling similar to ASAN.  NFC.

llvm-svn: 249986
This commit is contained in:
Saleem Abdulrasool 2015-10-11 17:35:42 +00:00
parent 8b3353f20f
commit e49971517a
2 changed files with 5 additions and 4 deletions

View File

@ -43,10 +43,12 @@
#endif
#ifdef _MSC_VER
#define ALWAYS_INLINE __forceinline
#define NOINLINE __declspec(noinline)
#define NORETURN __declspec(noreturn)
#define UNUSED
#else
#define ALWAYS_INLINE __attribute__((always_inline))
#define NOINLINE __attribute__((noinline))
#define NORETURN __attribute__((noreturn))
#define UNUSED __attribute__((unused))

View File

@ -19,20 +19,19 @@ typedef union {
#define LOWORDER(xy,xHi,xLo,yHi,yLo) \
(((((xHi)*(yHi) - (xy)) + (xHi)*(yLo)) + (xLo)*(yHi)) + (xLo)*(yLo))
static __inline double __attribute__((always_inline)) local_fabs(double x) {
static __inline ALWAYS_INLINE double local_fabs(double x) {
doublebits result = {.d = x};
result.x &= UINT64_C(0x7fffffffffffffff);
return result.d;
}
static __inline double __attribute__((always_inline)) high26bits(double x) {
static __inline ALWAYS_INLINE double high26bits(double x) {
doublebits result = {.d = x};
result.x &= UINT64_C(0xfffffffff8000000);
return result.d;
}
static __inline int __attribute__((always_inline))
different_sign(double x, double y) {
static __inline ALWAYS_INLINE int different_sign(double x, double y) {
doublebits xsignbit = {.d = x}, ysignbit = {.d = y};
int result = (int)(xsignbit.x >> 63) ^ (int)(ysignbit.x >> 63);
return result;