[compiler-rt] r249986 - builtins: define and use ALWAYS_INLINE

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 10:35:42 PDT 2015


Author: compnerd
Date: Sun Oct 11 12:35:42 2015
New Revision: 249986

URL: http://llvm.org/viewvc/llvm-project?rev=249986&view=rev
Log:
builtins: define and use ALWAYS_INLINE

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

Modified:
    compiler-rt/trunk/lib/builtins/int_lib.h
    compiler-rt/trunk/lib/builtins/ppc/DD.h

Modified: compiler-rt/trunk/lib/builtins/int_lib.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/int_lib.h?rev=249986&r1=249985&r2=249986&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/int_lib.h (original)
+++ compiler-rt/trunk/lib/builtins/int_lib.h Sun Oct 11 12:35:42 2015
@@ -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))

Modified: compiler-rt/trunk/lib/builtins/ppc/DD.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/ppc/DD.h?rev=249986&r1=249985&r2=249986&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/ppc/DD.h (original)
+++ compiler-rt/trunk/lib/builtins/ppc/DD.h Sun Oct 11 12:35:42 2015
@@ -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;




More information about the llvm-commits mailing list