diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-07 21:08:15 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-07 21:08:15 +0000 |
commit | fe608c938cae0bc3422f2337774c01a2910f406c (patch) | |
tree | 0b651b2499d4abe2ff5e08e1ef6f2004c928ad6f /clang/lib/Headers/openmp_wrappers | |
parent | b9c57683026e51f5b0a1f779c95895b16e8de04c (diff) | |
download | bcm5719-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/openmp_wrappers')
-rw-r--r-- | clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h | 47 | ||||
-rw-r--r-- | clang/lib/Headers/openmp_wrappers/cmath | 16 | ||||
-rw-r--r-- | clang/lib/Headers/openmp_wrappers/math.h | 17 |
3 files changed, 0 insertions, 80 deletions
diff --git a/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h b/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h deleted file mode 100644 index 2f7e5c3ead5..00000000000 --- a/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h +++ /dev/null @@ -1,47 +0,0 @@ -/*===---- __clang_openmp_math.h - OpenMP target math support ---------------=== - * - * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. - * See https://llvm.org/LICENSE.txt for license information. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - * - *===-----------------------------------------------------------------------=== - */ - -#if defined(__NVPTX__) && defined(_OPENMP) -/// TODO: -/// We are currently reusing the functionality of the Clang-CUDA code path -/// as an alternative to the host declarations provided by math.h and cmath. -/// This is suboptimal. -/// -/// We should instead declare the device functions in a similar way, e.g., -/// through OpenMP 5.0 variants, and afterwards populate the module with the -/// host declarations by unconditionally including the host math.h or cmath, -/// respectively. This is actually what the Clang-CUDA code path does, using -/// __device__ instead of variants to avoid redeclarations and get the desired -/// overload resolution. - -#define __CUDA__ - -#if defined(__cplusplus) - #include <__clang_cuda_math_forward_declares.h> - #include <stdlib.h> -#else - #include <stddef.h> -#endif - -/// Include declarations for libdevice functions. -#include <__clang_cuda_libdevice_declares.h> -/// Provide definitions for these functions. -#include <__clang_cuda_device_functions.h> - -#if defined(__cplusplus) - #include <__clang_cuda_cmath.h> -#endif - -#undef __CUDA__ - -/// Magic macro for stopping the math.h/cmath host header from being included. -#define __CLANG_NO_HOST_MATH__ - -#endif - diff --git a/clang/lib/Headers/openmp_wrappers/cmath b/clang/lib/Headers/openmp_wrappers/cmath deleted file mode 100644 index a5183a1d8d1..00000000000 --- a/clang/lib/Headers/openmp_wrappers/cmath +++ /dev/null @@ -1,16 +0,0 @@ -/*===-------------- cmath - Alternative cmath header -----------------------=== - * - * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. - * See https://llvm.org/LICENSE.txt for license information. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - * - *===-----------------------------------------------------------------------=== - */ - -#include <__clang_openmp_math.h> - -#ifndef __CLANG_NO_HOST_MATH__ -#include_next <cmath> -#else -#undef __CLANG_NO_HOST_MATH__ -#endif diff --git a/clang/lib/Headers/openmp_wrappers/math.h b/clang/lib/Headers/openmp_wrappers/math.h deleted file mode 100644 index d2786ecb242..00000000000 --- a/clang/lib/Headers/openmp_wrappers/math.h +++ /dev/null @@ -1,17 +0,0 @@ -/*===------------- math.h - Alternative math.h header ----------------------=== - * - * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. - * See https://llvm.org/LICENSE.txt for license information. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - * - *===-----------------------------------------------------------------------=== - */ - -#include <__clang_openmp_math.h> - -#ifndef __CLANG_NO_HOST_MATH__ -#include_next <math.h> -#else -#undef __CLANG_NO_HOST_MATH__ -#endif - |