-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[libc] Cleanup unimplemented math functions #143173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary: This patch cleans up the leftoever files that were either implemented or are still unimplemented stubs.
|
@llvm/pr-subscribers-libc Author: Joseph Huber (jhuber6) ChangesSummary: Patch is 147.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/143173.diff 161 Files Affected:
diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index 80351792fb18a..b464c189420b7 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -19,8 +19,7 @@ function(collect_object_file_deps target result)
return()
endif()
- if(${target_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
- ${target_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
+ if(${target_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE})
set(entrypoint_target ${target})
get_target_property(is_alias ${entrypoint_target} "IS_ALIAS")
if(is_alias)
@@ -55,8 +54,7 @@ function(get_all_object_file_deps result fq_deps_list)
foreach(dep ${fq_deps_list})
get_target_property(dep_type ${dep} "TARGET_TYPE")
if(NOT ((${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE}) OR
- (${dep_type} STREQUAL ${ENTRYPOINT_EXT_TARGET_TYPE}) OR
- (${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})))
+ (${dep_type} STREQUAL ${ENTRYPOINT_EXT_TARGET_TYPE})))
message(FATAL_ERROR "Dependency '${dep}' of 'add_entrypoint_collection' is "
"not an 'add_entrypoint_object' or 'add_entrypoint_external' target.")
endif()
@@ -64,8 +62,7 @@ function(get_all_object_file_deps result fq_deps_list)
list(APPEND all_deps ${recursive_deps})
# Add the entrypoint object target explicitly as collect_object_file_deps
# only collects object files from non-entrypoint targets.
- if(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
- ${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
+ if(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE})
set(entrypoint_target ${dep})
get_target_property(is_alias ${entrypoint_target} "IS_ALIAS")
if(is_alias)
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 142778d9ea1cc..805da91284ce8 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -111,7 +111,6 @@ function(add_object_library target_name)
endfunction(add_object_library)
set(ENTRYPOINT_OBJ_TARGET_TYPE "ENTRYPOINT_OBJ")
-set(ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE "ENTRYPOINT_OBJ_VENDOR")
# A rule for entrypoint object targets.
# Usage:
@@ -129,20 +128,13 @@ set(ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE "ENTRYPOINT_OBJ_VENDOR")
function(create_entrypoint_object fq_target_name)
cmake_parse_arguments(
"ADD_ENTRYPOINT_OBJ"
- "ALIAS;REDIRECTED;VENDOR" # Optional argument
+ "ALIAS;REDIRECTED" # Optional argument
"NAME;CXX_STANDARD" # Single value arguments
"SRCS;HDRS;DEPENDS;COMPILE_OPTIONS;FLAGS" # Multi value arguments
${ARGN}
)
set(entrypoint_target_type ${ENTRYPOINT_OBJ_TARGET_TYPE})
- if(${ADD_ENTRYPOINT_OBJ_VENDOR})
- # TODO: We currently rely on external definitions of certain math functions
- # provided by GPU vendors like AMD or Nvidia. We need to mark these so we
- # don't end up running tests on these. In the future all of these should be
- # implemented and this can be removed.
- set(entrypoint_target_type ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
- endif()
list(FIND TARGET_ENTRYPOINT_NAME_LIST ${ADD_ENTRYPOINT_OBJ_NAME} entrypoint_name_index)
if(${entrypoint_name_index} EQUAL -1)
add_custom_target(${fq_target_name})
@@ -186,8 +178,8 @@ function(create_entrypoint_object fq_target_name)
endif()
get_target_property(obj_type ${fq_dep_name} "TARGET_TYPE")
- if((NOT obj_type) OR (NOT (${obj_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
- ${obj_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})))
+ if((NOT obj_type) OR (NOT ${obj_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE}))
+
message(FATAL_ERROR "The aliasee of an entrypoint alias should be an entrypoint.")
endif()
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 54f337ecf0999..1cd09816e223f 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -168,10 +168,6 @@ function(get_object_files_for_test result skipped_entrypoints_list)
endif()
list(APPEND dep_obj ${object_file_raw})
endif()
- elseif(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
- # Skip tests for externally implemented entrypoints.
- list(APPEND dep_skip ${dep})
- list(REMOVE_ITEM dep_obj ${dep})
endif()
set_target_properties(${dep} PROPERTIES
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index 15c4b51cb2410..f41ebdc59f6b2 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -282,18 +282,14 @@ set(TARGET_LIBM_ENTRYPOINTS
# math.h entrypoints
libc.src.math.acos
libc.src.math.acosf
- libc.src.math.acosh
- libc.src.math.acoshf
libc.src.math.asin
libc.src.math.asinf
- libc.src.math.asinh
libc.src.math.asinhf
libc.src.math.atan
libc.src.math.atan2
libc.src.math.atan2f
libc.src.math.atan2l
libc.src.math.atanf
- libc.src.math.atanh
libc.src.math.atanhf
libc.src.math.canonicalize
libc.src.math.canonicalizef
@@ -308,14 +304,12 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.copysignl
libc.src.math.cos
libc.src.math.cosf
- libc.src.math.cosh
libc.src.math.coshf
libc.src.math.cospif
libc.src.math.ddivl
libc.src.math.dfmal
libc.src.math.dmull
libc.src.math.dsqrtl
- libc.src.math.erf
libc.src.math.erff
libc.src.math.exp
libc.src.math.exp10
@@ -456,8 +450,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.nextupl
libc.src.math.pow
libc.src.math.powf
- libc.src.math.powi
- libc.src.math.powif
libc.src.math.remainder
libc.src.math.remainderf
libc.src.math.remainderl
@@ -489,7 +481,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.sincos
libc.src.math.sincosf
libc.src.math.sinf
- libc.src.math.sinh
libc.src.math.sinhf
libc.src.math.sinpif
libc.src.math.sqrt
@@ -497,7 +488,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.sqrtl
libc.src.math.tan
libc.src.math.tanf
- libc.src.math.tanh
libc.src.math.tanhf
libc.src.math.tgamma
libc.src.math.tgammaf
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 36c5ce193a57c..2b8c29fda3dc8 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -280,20 +280,16 @@ set(TARGET_LIBC_ENTRYPOINTS
set(TARGET_LIBM_ENTRYPOINTS
# math.h entrypoints
- libc.src.math.acos
libc.src.math.acosf
- libc.src.math.acosh
libc.src.math.acoshf
libc.src.math.asin
libc.src.math.asinf
- libc.src.math.asinh
libc.src.math.asinhf
libc.src.math.atan
libc.src.math.atan2
libc.src.math.atan2f
libc.src.math.atan2l
libc.src.math.atanf
- libc.src.math.atanh
libc.src.math.atanhf
libc.src.math.canonicalize
libc.src.math.canonicalizef
@@ -308,14 +304,12 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.copysignl
libc.src.math.cos
libc.src.math.cosf
- libc.src.math.cosh
libc.src.math.coshf
libc.src.math.cospif
libc.src.math.ddivl
libc.src.math.dfmal
libc.src.math.dmull
libc.src.math.dsqrtl
- libc.src.math.erf
libc.src.math.erff
libc.src.math.exp
libc.src.math.exp10
@@ -457,8 +451,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.nextupl
libc.src.math.pow
libc.src.math.powf
- libc.src.math.powi
- libc.src.math.powif
libc.src.math.remainder
libc.src.math.remainderf
libc.src.math.remainderl
@@ -490,7 +482,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.sincos
libc.src.math.sincosf
libc.src.math.sinf
- libc.src.math.sinh
libc.src.math.sinhf
libc.src.math.sinpif
libc.src.math.sqrt
@@ -498,7 +489,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.sqrtl
libc.src.math.tan
libc.src.math.tanf
- libc.src.math.tanh
libc.src.math.tanhf
libc.src.math.tgamma
libc.src.math.tgammaf
diff --git a/libc/src/math/amdgpu/CMakeLists.txt b/libc/src/math/amdgpu/CMakeLists.txt
index 23fd3169fddfe..4d81b7654f826 100644
--- a/libc/src/math/amdgpu/CMakeLists.txt
+++ b/libc/src/math/amdgpu/CMakeLists.txt
@@ -346,152 +346,6 @@ add_entrypoint_object(
-O2
)
-# The following functions currently are not implemented natively and borrow from
-# existing implementations. This will be removed in the future.
-add_entrypoint_object(
- acos
- SRCS
- acos.cpp
- HDRS
- ../acos.h
- VENDOR
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
-)
-
-add_entrypoint_object(
- acosh
- SRCS
- acosh.cpp
- HDRS
- ../acosh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- asin
- SRCS
- asin.cpp
- HDRS
- ../asin.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- asinh
- SRCS
- asinh.cpp
- HDRS
- ../asinh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- atan
- SRCS
- atan.cpp
- HDRS
- ../atan.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- atanh
- SRCS
- atanh.cpp
- HDRS
- ../atanh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- cosh
- SRCS
- cosh.cpp
- HDRS
- ../cosh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- erf
- SRCS
- erf.cpp
- HDRS
- ../erf.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- powi
- SRCS
- powi.cpp
- HDRS
- ../powi.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- powif
- SRCS
- powif.cpp
- HDRS
- ../powif.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- sinh
- SRCS
- sinh.cpp
- HDRS
- ../sinh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- tanh
- SRCS
- tanh.cpp
- HDRS
- ../tanh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
add_entrypoint_object(
tgamma
SRCS
@@ -501,7 +355,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -513,7 +366,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -525,7 +377,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -537,5 +388,4 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
diff --git a/libc/src/math/amdgpu/acos.cpp b/libc/src/math/amdgpu/acos.cpp
deleted file mode 100644
index de870f207326e..0000000000000
--- a/libc/src/math/amdgpu/acos.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acos function ---------------------------===//
-//
-// 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 "src/math/acos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acos, (double x)) { return __ocml_acos_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acosf.cpp b/libc/src/math/amdgpu/acosf.cpp
deleted file mode 100644
index 0a72a70a3ee9d..0000000000000
--- a/libc/src/math/amdgpu/acosf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acosf function for GPU ----------------------===//
-//
-// 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 "src/math/acosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acosf, (float x)) { return __ocml_acos_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acosh.cpp b/libc/src/math/amdgpu/acosh.cpp
deleted file mode 100644
index 15c9734499832..0000000000000
--- a/libc/src/math/amdgpu/acosh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acosh function --------------------------===//
-//
-// 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 "src/math/acosh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acosh, (double x)) { return __ocml_acosh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acoshf.cpp b/libc/src/math/amdgpu/acoshf.cpp
deleted file mode 100644
index 79e71b02e7198..0000000000000
--- a/libc/src/math/amdgpu/acoshf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acoshf function for GPU ---------------------===//
-//
-// 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 "src/math/acoshf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acoshf, (float x)) { return __ocml_acosh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asin.cpp b/libc/src/math/amdgpu/asin.cpp
deleted file mode 100644
index a79641e1977cb..0000000000000
--- a/libc/src/math/amdgpu/asin.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asin function ---------------------------===//
-//
-// 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 "src/math/asin.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asin, (double x)) { return __ocml_asin_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinf.cpp b/libc/src/math/amdgpu/asinf.cpp
deleted file mode 100644
index e70944a4d9890..0000000000000
--- a/libc/src/math/amdgpu/asinf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinf function for GPU ----------------------===//
-//
-// 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 "src/math/asinf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinf, (float x)) { return __ocml_asin_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinh.cpp b/libc/src/math/amdgpu/asinh.cpp
deleted file mode 100644
index 642368592a99b..0000000000000
--- a/libc/src/math/amdgpu/asinh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asinh function --------------------------===//
-//
-// 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 "src/math/asinh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asinh, (double x)) { return __ocml_asinh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinhf.cpp b/libc/src/math/amdgpu/asinhf.cpp
deleted file mode 100644
index bafa77f946000..0000000000000
--- a/libc/src/math/amdgpu/asinhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinhf function for GPU ---------------------===//
-//
-// 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 "src/math/asinhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinhf, (float x)) { return __ocml_asinh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan.cpp b/libc/src/math/amdgpu/atan.cpp
deleted file mode 100644
index 49941e97096f7..0000000000000
--- a/libc/src/math/amdgpu/atan.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU atan function ---------------------------===//
-//
-// 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 "src/math/atan.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan, (double x)) { return __ocml_atan_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan2.cpp b/libc/src/math/amdgpu/atan2.cpp
deleted file mode 100644
index f5907504cb364..0000000000000
--- a/libc/src/math/amdgpu/atan2.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2 function --------------------------===//
-//
-// 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 "src/math/atan2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan2, (double x, double y)) {
- return __ocml_atan2_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan2f.cpp b/libc/src/math/amdgpu/atan2f.cpp
deleted file mode 100644
index 736c77d1cbce9..0000000000000
--- a/libc/src/math/amdgpu/atan2f.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2f function -------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#inclu...
[truncated]
|
|
@llvm/pr-subscribers-backend-amdgpu Author: Joseph Huber (jhuber6) ChangesSummary: Patch is 147.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/143173.diff 161 Files Affected:
diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index 80351792fb18a..b464c189420b7 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -19,8 +19,7 @@ function(collect_object_file_deps target result)
return()
endif()
- if(${target_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
- ${target_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
+ if(${target_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE})
set(entrypoint_target ${target})
get_target_property(is_alias ${entrypoint_target} "IS_ALIAS")
if(is_alias)
@@ -55,8 +54,7 @@ function(get_all_object_file_deps result fq_deps_list)
foreach(dep ${fq_deps_list})
get_target_property(dep_type ${dep} "TARGET_TYPE")
if(NOT ((${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE}) OR
- (${dep_type} STREQUAL ${ENTRYPOINT_EXT_TARGET_TYPE}) OR
- (${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})))
+ (${dep_type} STREQUAL ${ENTRYPOINT_EXT_TARGET_TYPE})))
message(FATAL_ERROR "Dependency '${dep}' of 'add_entrypoint_collection' is "
"not an 'add_entrypoint_object' or 'add_entrypoint_external' target.")
endif()
@@ -64,8 +62,7 @@ function(get_all_object_file_deps result fq_deps_list)
list(APPEND all_deps ${recursive_deps})
# Add the entrypoint object target explicitly as collect_object_file_deps
# only collects object files from non-entrypoint targets.
- if(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
- ${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
+ if(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE})
set(entrypoint_target ${dep})
get_target_property(is_alias ${entrypoint_target} "IS_ALIAS")
if(is_alias)
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 142778d9ea1cc..805da91284ce8 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -111,7 +111,6 @@ function(add_object_library target_name)
endfunction(add_object_library)
set(ENTRYPOINT_OBJ_TARGET_TYPE "ENTRYPOINT_OBJ")
-set(ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE "ENTRYPOINT_OBJ_VENDOR")
# A rule for entrypoint object targets.
# Usage:
@@ -129,20 +128,13 @@ set(ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE "ENTRYPOINT_OBJ_VENDOR")
function(create_entrypoint_object fq_target_name)
cmake_parse_arguments(
"ADD_ENTRYPOINT_OBJ"
- "ALIAS;REDIRECTED;VENDOR" # Optional argument
+ "ALIAS;REDIRECTED" # Optional argument
"NAME;CXX_STANDARD" # Single value arguments
"SRCS;HDRS;DEPENDS;COMPILE_OPTIONS;FLAGS" # Multi value arguments
${ARGN}
)
set(entrypoint_target_type ${ENTRYPOINT_OBJ_TARGET_TYPE})
- if(${ADD_ENTRYPOINT_OBJ_VENDOR})
- # TODO: We currently rely on external definitions of certain math functions
- # provided by GPU vendors like AMD or Nvidia. We need to mark these so we
- # don't end up running tests on these. In the future all of these should be
- # implemented and this can be removed.
- set(entrypoint_target_type ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
- endif()
list(FIND TARGET_ENTRYPOINT_NAME_LIST ${ADD_ENTRYPOINT_OBJ_NAME} entrypoint_name_index)
if(${entrypoint_name_index} EQUAL -1)
add_custom_target(${fq_target_name})
@@ -186,8 +178,8 @@ function(create_entrypoint_object fq_target_name)
endif()
get_target_property(obj_type ${fq_dep_name} "TARGET_TYPE")
- if((NOT obj_type) OR (NOT (${obj_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
- ${obj_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})))
+ if((NOT obj_type) OR (NOT ${obj_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE}))
+
message(FATAL_ERROR "The aliasee of an entrypoint alias should be an entrypoint.")
endif()
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 54f337ecf0999..1cd09816e223f 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -168,10 +168,6 @@ function(get_object_files_for_test result skipped_entrypoints_list)
endif()
list(APPEND dep_obj ${object_file_raw})
endif()
- elseif(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
- # Skip tests for externally implemented entrypoints.
- list(APPEND dep_skip ${dep})
- list(REMOVE_ITEM dep_obj ${dep})
endif()
set_target_properties(${dep} PROPERTIES
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index 15c4b51cb2410..f41ebdc59f6b2 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -282,18 +282,14 @@ set(TARGET_LIBM_ENTRYPOINTS
# math.h entrypoints
libc.src.math.acos
libc.src.math.acosf
- libc.src.math.acosh
- libc.src.math.acoshf
libc.src.math.asin
libc.src.math.asinf
- libc.src.math.asinh
libc.src.math.asinhf
libc.src.math.atan
libc.src.math.atan2
libc.src.math.atan2f
libc.src.math.atan2l
libc.src.math.atanf
- libc.src.math.atanh
libc.src.math.atanhf
libc.src.math.canonicalize
libc.src.math.canonicalizef
@@ -308,14 +304,12 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.copysignl
libc.src.math.cos
libc.src.math.cosf
- libc.src.math.cosh
libc.src.math.coshf
libc.src.math.cospif
libc.src.math.ddivl
libc.src.math.dfmal
libc.src.math.dmull
libc.src.math.dsqrtl
- libc.src.math.erf
libc.src.math.erff
libc.src.math.exp
libc.src.math.exp10
@@ -456,8 +450,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.nextupl
libc.src.math.pow
libc.src.math.powf
- libc.src.math.powi
- libc.src.math.powif
libc.src.math.remainder
libc.src.math.remainderf
libc.src.math.remainderl
@@ -489,7 +481,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.sincos
libc.src.math.sincosf
libc.src.math.sinf
- libc.src.math.sinh
libc.src.math.sinhf
libc.src.math.sinpif
libc.src.math.sqrt
@@ -497,7 +488,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.sqrtl
libc.src.math.tan
libc.src.math.tanf
- libc.src.math.tanh
libc.src.math.tanhf
libc.src.math.tgamma
libc.src.math.tgammaf
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 36c5ce193a57c..2b8c29fda3dc8 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -280,20 +280,16 @@ set(TARGET_LIBC_ENTRYPOINTS
set(TARGET_LIBM_ENTRYPOINTS
# math.h entrypoints
- libc.src.math.acos
libc.src.math.acosf
- libc.src.math.acosh
libc.src.math.acoshf
libc.src.math.asin
libc.src.math.asinf
- libc.src.math.asinh
libc.src.math.asinhf
libc.src.math.atan
libc.src.math.atan2
libc.src.math.atan2f
libc.src.math.atan2l
libc.src.math.atanf
- libc.src.math.atanh
libc.src.math.atanhf
libc.src.math.canonicalize
libc.src.math.canonicalizef
@@ -308,14 +304,12 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.copysignl
libc.src.math.cos
libc.src.math.cosf
- libc.src.math.cosh
libc.src.math.coshf
libc.src.math.cospif
libc.src.math.ddivl
libc.src.math.dfmal
libc.src.math.dmull
libc.src.math.dsqrtl
- libc.src.math.erf
libc.src.math.erff
libc.src.math.exp
libc.src.math.exp10
@@ -457,8 +451,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.nextupl
libc.src.math.pow
libc.src.math.powf
- libc.src.math.powi
- libc.src.math.powif
libc.src.math.remainder
libc.src.math.remainderf
libc.src.math.remainderl
@@ -490,7 +482,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.sincos
libc.src.math.sincosf
libc.src.math.sinf
- libc.src.math.sinh
libc.src.math.sinhf
libc.src.math.sinpif
libc.src.math.sqrt
@@ -498,7 +489,6 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.sqrtl
libc.src.math.tan
libc.src.math.tanf
- libc.src.math.tanh
libc.src.math.tanhf
libc.src.math.tgamma
libc.src.math.tgammaf
diff --git a/libc/src/math/amdgpu/CMakeLists.txt b/libc/src/math/amdgpu/CMakeLists.txt
index 23fd3169fddfe..4d81b7654f826 100644
--- a/libc/src/math/amdgpu/CMakeLists.txt
+++ b/libc/src/math/amdgpu/CMakeLists.txt
@@ -346,152 +346,6 @@ add_entrypoint_object(
-O2
)
-# The following functions currently are not implemented natively and borrow from
-# existing implementations. This will be removed in the future.
-add_entrypoint_object(
- acos
- SRCS
- acos.cpp
- HDRS
- ../acos.h
- VENDOR
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
-)
-
-add_entrypoint_object(
- acosh
- SRCS
- acosh.cpp
- HDRS
- ../acosh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- asin
- SRCS
- asin.cpp
- HDRS
- ../asin.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- asinh
- SRCS
- asinh.cpp
- HDRS
- ../asinh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- atan
- SRCS
- atan.cpp
- HDRS
- ../atan.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- atanh
- SRCS
- atanh.cpp
- HDRS
- ../atanh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- cosh
- SRCS
- cosh.cpp
- HDRS
- ../cosh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- erf
- SRCS
- erf.cpp
- HDRS
- ../erf.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- powi
- SRCS
- powi.cpp
- HDRS
- ../powi.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- powif
- SRCS
- powif.cpp
- HDRS
- ../powif.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- sinh
- SRCS
- sinh.cpp
- HDRS
- ../sinh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- tanh
- SRCS
- tanh.cpp
- HDRS
- ../tanh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
add_entrypoint_object(
tgamma
SRCS
@@ -501,7 +355,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -513,7 +366,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -525,7 +377,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -537,5 +388,4 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
diff --git a/libc/src/math/amdgpu/acos.cpp b/libc/src/math/amdgpu/acos.cpp
deleted file mode 100644
index de870f207326e..0000000000000
--- a/libc/src/math/amdgpu/acos.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acos function ---------------------------===//
-//
-// 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 "src/math/acos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acos, (double x)) { return __ocml_acos_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acosf.cpp b/libc/src/math/amdgpu/acosf.cpp
deleted file mode 100644
index 0a72a70a3ee9d..0000000000000
--- a/libc/src/math/amdgpu/acosf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acosf function for GPU ----------------------===//
-//
-// 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 "src/math/acosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acosf, (float x)) { return __ocml_acos_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acosh.cpp b/libc/src/math/amdgpu/acosh.cpp
deleted file mode 100644
index 15c9734499832..0000000000000
--- a/libc/src/math/amdgpu/acosh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acosh function --------------------------===//
-//
-// 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 "src/math/acosh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acosh, (double x)) { return __ocml_acosh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acoshf.cpp b/libc/src/math/amdgpu/acoshf.cpp
deleted file mode 100644
index 79e71b02e7198..0000000000000
--- a/libc/src/math/amdgpu/acoshf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acoshf function for GPU ---------------------===//
-//
-// 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 "src/math/acoshf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acoshf, (float x)) { return __ocml_acosh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asin.cpp b/libc/src/math/amdgpu/asin.cpp
deleted file mode 100644
index a79641e1977cb..0000000000000
--- a/libc/src/math/amdgpu/asin.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asin function ---------------------------===//
-//
-// 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 "src/math/asin.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asin, (double x)) { return __ocml_asin_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinf.cpp b/libc/src/math/amdgpu/asinf.cpp
deleted file mode 100644
index e70944a4d9890..0000000000000
--- a/libc/src/math/amdgpu/asinf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinf function for GPU ----------------------===//
-//
-// 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 "src/math/asinf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinf, (float x)) { return __ocml_asin_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinh.cpp b/libc/src/math/amdgpu/asinh.cpp
deleted file mode 100644
index 642368592a99b..0000000000000
--- a/libc/src/math/amdgpu/asinh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asinh function --------------------------===//
-//
-// 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 "src/math/asinh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asinh, (double x)) { return __ocml_asinh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinhf.cpp b/libc/src/math/amdgpu/asinhf.cpp
deleted file mode 100644
index bafa77f946000..0000000000000
--- a/libc/src/math/amdgpu/asinhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinhf function for GPU ---------------------===//
-//
-// 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 "src/math/asinhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinhf, (float x)) { return __ocml_asinh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan.cpp b/libc/src/math/amdgpu/atan.cpp
deleted file mode 100644
index 49941e97096f7..0000000000000
--- a/libc/src/math/amdgpu/atan.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU atan function ---------------------------===//
-//
-// 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 "src/math/atan.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan, (double x)) { return __ocml_atan_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan2.cpp b/libc/src/math/amdgpu/atan2.cpp
deleted file mode 100644
index f5907504cb364..0000000000000
--- a/libc/src/math/amdgpu/atan2.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2 function --------------------------===//
-//
-// 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 "src/math/atan2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan2, (double x, double y)) {
- return __ocml_atan2_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan2f.cpp b/libc/src/math/amdgpu/atan2f.cpp
deleted file mode 100644
index 736c77d1cbce9..0000000000000
--- a/libc/src/math/amdgpu/atan2f.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2f function -------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#inclu...
[truncated]
|
JonChesterfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice, forgot about this. If we take another shot at spirv this will also make that patch much cleaner.
Summary: This patch cleans up the leftoever files that were either implemented or are still unimplemented stubs.
Summary:
This patch cleans up the leftoever files that were either implemented or
are still unimplemented stubs.