summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers/__clang_cuda_cmath.h
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-05-07 21:08:15 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-05-07 21:08:15 +0000
commitfe608c938cae0bc3422f2337774c01a2910f406c (patch)
tree0b651b2499d4abe2ff5e08e1ef6f2004c928ad6f /clang/lib/Headers/__clang_cuda_cmath.h
parentb9c57683026e51f5b0a1f779c95895b16e8de04c (diff)
downloadbcm5719-llvm-fe608c938cae0bc3422f2337774c01a2910f406c.tar.gz
bcm5719-llvm-fe608c938cae0bc3422f2337774c01a2910f406c.zip
Revert "[OpenMP][Clang] Support for target math functions"
This commit appears to be breaking stage-2 builds on GreenDragon. The OpenMP wrappers for cmath and math.h are copied into the root of the resource directory and cause a cyclic dependency in module 'Darwin': Darwin -> std -> Darwin. This blows up when CMake is testing for modules support and breaks all stage 2 module builds, including the ThinLTO bot and all LLDB bots. CMake Error at cmake/modules/HandleLLVMOptions.cmake:497 (message): LLVM_ENABLE_MODULES is not supported by this compiler llvm-svn: 360192
Diffstat (limited to 'clang/lib/Headers/__clang_cuda_cmath.h')
-rw-r--r--clang/lib/Headers/__clang_cuda_cmath.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/lib/Headers/__clang_cuda_cmath.h b/clang/lib/Headers/__clang_cuda_cmath.h
index 82e52d1466a..cbcef0f5653 100644
--- a/clang/lib/Headers/__clang_cuda_cmath.h
+++ b/clang/lib/Headers/__clang_cuda_cmath.h
@@ -30,11 +30,7 @@
// implementation. Declaring in the global namespace and pulling into namespace
// std covers all of the known knowns.
-#ifdef _OPENMP
-#define __DEVICE__ static __attribute__((always_inline))
-#else
#define __DEVICE__ static __device__ __inline__ __attribute__((always_inline))
-#endif
__DEVICE__ long long abs(long long __n) { return ::llabs(__n); }
__DEVICE__ long abs(long __n) { return ::labs(__n); }
@@ -51,8 +47,6 @@ __DEVICE__ float exp(float __x) { return ::expf(__x); }
__DEVICE__ float fabs(float __x) { return ::fabsf(__x); }
__DEVICE__ float floor(float __x) { return ::floorf(__x); }
__DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); }
-// TODO: remove when variant is supported
-#ifndef _OPENMP
__DEVICE__ int fpclassify(float __x) {
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
FP_ZERO, __x);
@@ -61,7 +55,6 @@ __DEVICE__ int fpclassify(double __x) {
return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
FP_ZERO, __x);
}
-#endif
__DEVICE__ float frexp(float __arg, int *__exp) {
return ::frexpf(__arg, __exp);
}
@@ -441,10 +434,7 @@ using ::remainderf;
using ::remquof;
using ::rintf;
using ::roundf;
-// TODO: remove once variant is supported
-#ifndef _OPENMP
using ::scalblnf;
-#endif
using ::scalbnf;
using ::sinf;
using ::sinhf;
OpenPOWER on IntegriCloud