[libclc] 4dec390 - [libclc] Have all targets build all CLC functions (#124779)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 10 02:19:26 PST 2025


Author: Fraser Cormack
Date: 2025-02-10T10:19:22Z
New Revision: 4dec3909e93c23ef1545c934f9715f9be2d7c49b

URL: https://github.com/llvm/llvm-project/commit/4dec3909e93c23ef1545c934f9715f9be2d7c49b
DIFF: https://github.com/llvm/llvm-project/commit/4dec3909e93c23ef1545c934f9715f9be2d7c49b.diff

LOG: [libclc] Have all targets build all CLC functions (#124779)

This removes all remaining SPIR-V workarounds for CLC functions, in an
effort to streamline the CLC implementation and prevent further issues
that #124614 had to fix. This commit fixes the same issue for the SPIR-V
targets.

Target-specific CLC implementations can and will exist, but for now
they're all identical and so the target-specific SOURCES files have been
removed. Target implementations now always include the 'generic' CLC
directory, meaning we can avoid unnecessary duplication of SOURCES
listings.

Added: 
    

Modified: 
    libclc/CMakeLists.txt
    libclc/clc/include/clc/integer/clc_abs.h
    libclc/clc/include/clc/integer/clc_abs_diff.h
    libclc/clc/include/clc/relational/clc_all.h
    libclc/clc/include/clc/relational/clc_any.h
    libclc/clc/include/clc/relational/clc_isequal.h
    libclc/clc/include/clc/relational/clc_isfinite.h
    libclc/clc/include/clc/relational/clc_isgreater.h
    libclc/clc/include/clc/relational/clc_isgreaterequal.h
    libclc/clc/include/clc/relational/clc_isinf.h
    libclc/clc/include/clc/relational/clc_isless.h
    libclc/clc/include/clc/relational/clc_islessequal.h
    libclc/clc/include/clc/relational/clc_islessgreater.h
    libclc/clc/include/clc/relational/clc_isnormal.h
    libclc/clc/include/clc/relational/clc_isnotequal.h
    libclc/clc/include/clc/relational/clc_isordered.h
    libclc/clc/include/clc/relational/clc_isunordered.h
    libclc/clc/include/clc/relational/clc_signbit.h
    libclc/clc/include/clc/shared/clc_max.h
    libclc/clc/include/clc/shared/clc_min.h

Removed: 
    libclc/clc/lib/clspv/SOURCES
    libclc/clc/lib/spirv/SOURCES


################################################################################
diff  --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 8e3f5097ba84a44..b28da904ef68e15 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -32,10 +32,6 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
   spirv64/lib/SOURCES;
   # CLC internal libraries
   clc/lib/generic/SOURCES;
-  clc/lib/clspv/SOURCES;
-  clc/lib/clspv64/SOURCES;
-  clc/lib/spirv/SOURCES;
-  clc/lib/spirv64/SOURCES;
 )
 
 set( LIBCLC_MIN_LLVM 3.9.0 )
@@ -266,15 +262,15 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
   list( GET TRIPLE 1 VENDOR )
   list( GET TRIPLE 2 OS )
 
-  set( dirs )
+  set( opencl_dirs )
 
   if ( NOT ${ARCH} STREQUAL spirv AND NOT ${ARCH} STREQUAL spirv64 AND
        NOT ${ARCH} STREQUAL clspv AND NOT ${ARCH} STREQUAL clspv64)
-    LIST( APPEND dirs generic )
+    LIST( APPEND opencl_dirs generic )
   endif()
 
   if( ${ARCH} STREQUAL r600 OR ${ARCH} STREQUAL amdgcn )
-    list( APPEND dirs amdgpu )
+    list( APPEND opencl_dirs amdgpu )
   endif()
 
   # Some targets' directories alias others
@@ -291,11 +287,13 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
   endif()
 
   set( clc_lib_files )
+  set( clc_dirs ${dirs} generic )
+
   libclc_configure_lib_source(
     clc_lib_files
     CLC_INTERNAL
     LIB_ROOT_DIR clc
-    DIRS ${dirs} ${DARCH} ${DARCH}-${OS} ${DARCH}-${VENDOR}-${OS}
+    DIRS ${clc_dirs} ${DARCH} ${DARCH}-${OS} ${DARCH}-${VENDOR}-${OS}
   )
 
   set( opencl_lib_files )
@@ -312,7 +310,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
 
   libclc_configure_lib_source(
     opencl_lib_files
-    DIRS ${dirs} ${DARCH} ${DARCH}-${OS} ${DARCH}-${VENDOR}-${OS}
+    DIRS ${opencl_dirs} ${DARCH} ${DARCH}-${OS} ${DARCH}-${VENDOR}-${OS}
   )
 
   foreach( d ${${t}_devices} )

diff  --git a/libclc/clc/include/clc/integer/clc_abs.h b/libclc/clc/include/clc/integer/clc_abs.h
index 31c62d311a006ea..59bd807b96060e7 100644
--- a/libclc/clc/include/clc/integer/clc_abs.h
+++ b/libclc/clc/include/clc/integer/clc_abs.h
@@ -1,14 +1,7 @@
 #ifndef __CLC_INTEGER_CLC_ABS_H__
 #define __CLC_INTEGER_CLC_ABS_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible abs
-#define __clc_abs abs
-#else
-
 #define __CLC_BODY <clc/integer/clc_abs.inc>
 #include <clc/integer/gentype.inc>
 
-#endif
-
 #endif // __CLC_INTEGER_CLC_ABS_H__

diff  --git a/libclc/clc/include/clc/integer/clc_abs_
diff .h b/libclc/clc/include/clc/integer/clc_abs_
diff .h
index 9c33fcff23b791b..021a9b6bc45a0e1 100644
--- a/libclc/clc/include/clc/integer/clc_abs_
diff .h
+++ b/libclc/clc/include/clc/integer/clc_abs_
diff .h
@@ -1,14 +1,7 @@
 #ifndef __CLC_INTEGER_CLC_ABS_DIFF_H__
 #define __CLC_INTEGER_CLC_ABS_DIFF_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible abs_
diff 
-#define __clc_abs_
diff  abs_
diff 
-#else
-
 #define __CLC_BODY <clc/integer/clc_abs_
diff .inc>
 #include <clc/integer/gentype.inc>
 
-#endif
-
 #endif // __CLC_INTEGER_CLC_ABS_DIFF_H__

diff  --git a/libclc/clc/include/clc/relational/clc_all.h b/libclc/clc/include/clc/relational/clc_all.h
index 7be3d132dd53d0f..2ffced19ba0e56e 100644
--- a/libclc/clc/include/clc/relational/clc_all.h
+++ b/libclc/clc/include/clc/relational/clc_all.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ALL_H__
 #define __CLC_RELATIONAL_CLC_ALL_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible all
-#define __clc_all all
-#else
-
 #include <clc/clcfunc.h>
 #include <clc/clctypes.h>
 
@@ -27,6 +22,4 @@ _CLC_VECTOR_ALL_DECL(long)
 #undef _CLC_ALL_DECL
 #undef _CLC_VECTOR_ALL_DECL
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ALL_H__

diff  --git a/libclc/clc/include/clc/relational/clc_any.h b/libclc/clc/include/clc/relational/clc_any.h
index 27dbffeb2eecd9f..2f554334d9bac95 100644
--- a/libclc/clc/include/clc/relational/clc_any.h
+++ b/libclc/clc/include/clc/relational/clc_any.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ANY_H__
 #define __CLC_RELATIONAL_CLC_ANY_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible any
-#define __clc_any any
-#else
-
 #include <clc/clcfunc.h>
 #include <clc/clctypes.h>
 
@@ -27,6 +22,4 @@ _CLC_VECTOR_ANY_DECL(long)
 #undef _CLC_ANY_DECL
 #undef _CLC_VECTOR_ANY_DECL
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ANY_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isequal.h b/libclc/clc/include/clc/relational/clc_isequal.h
index 0f31fb9530a14ee..84bf0974dbbf5d0 100644
--- a/libclc/clc/include/clc/relational/clc_isequal.h
+++ b/libclc/clc/include/clc/relational/clc_isequal.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISEQUAL_H__
 #define __CLC_RELATIONAL_CLC_ISEQUAL_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isequal
-#define __clc_isequal isequal
-#else
-
 #include <clc/clcfunc.h>
 #include <clc/clctypes.h>
 
@@ -37,6 +32,4 @@ _CLC_VECTOR_ISEQUAL_DECL(half, short)
 #undef _CLC_ISEQUAL_DECL
 #undef _CLC_VECTOR_ISEQUAL_DECL
 
-#endif
-
 #endif //  __CLC_RELATIONAL_CLC_ISEQUAL_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isfinite.h b/libclc/clc/include/clc/relational/clc_isfinite.h
index 3ed276e07a2f10a..82bcc6ec2da2731 100644
--- a/libclc/clc/include/clc/relational/clc_isfinite.h
+++ b/libclc/clc/include/clc/relational/clc_isfinite.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISFINITE_H__
 #define __CLC_RELATIONAL_CLC_ISFINITE_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isfinite
-#define __clc_isfinite isfinite
-#else
-
 #define __CLC_FUNCTION __clc_isfinite
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISFINITE_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isgreater.h b/libclc/clc/include/clc/relational/clc_isgreater.h
index b51d59aeb54998e..31961e4c5167911 100644
--- a/libclc/clc/include/clc/relational/clc_isgreater.h
+++ b/libclc/clc/include/clc/relational/clc_isgreater.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISGREATER_H__
 #define __CLC_RELATIONAL_CLC_ISGREATER_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isgreater
-#define __clc_isgreater isgreater
-#else
-
 #define __CLC_FUNCTION __clc_isgreater
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISGREATER_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isgreaterequal.h b/libclc/clc/include/clc/relational/clc_isgreaterequal.h
index b7ffce151847fd0..0e072fad09655ae 100644
--- a/libclc/clc/include/clc/relational/clc_isgreaterequal.h
+++ b/libclc/clc/include/clc/relational/clc_isgreaterequal.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISGREATEREQUAL_H__
 #define __CLC_RELATIONAL_CLC_ISGREATEREQUAL_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isgreaterequal
-#define __clc_isgreaterequal isgreaterequal
-#else
-
 #define __CLC_FUNCTION __clc_isgreaterequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISGREATEREQUAL_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isinf.h b/libclc/clc/include/clc/relational/clc_isinf.h
index 3f60bec5654a2e2..b666953d4a8e6c7 100644
--- a/libclc/clc/include/clc/relational/clc_isinf.h
+++ b/libclc/clc/include/clc/relational/clc_isinf.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISINF_H__
 #define __CLC_RELATIONAL_CLC_ISINF_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isinf
-#define __clc_isinf isinf
-#else
-
 #include <clc/clcfunc.h>
 #include <clc/clctypes.h>
 
@@ -37,6 +32,4 @@ _CLC_VECTOR_ISINF_DECL(short, half)
 #undef _CLC_ISINF_DECL
 #undef _CLC_VECTOR_ISINF_DECL
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISINF_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isless.h b/libclc/clc/include/clc/relational/clc_isless.h
index c6950aa61ad9081..482fddfe4f8af75 100644
--- a/libclc/clc/include/clc/relational/clc_isless.h
+++ b/libclc/clc/include/clc/relational/clc_isless.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISLESS_H__
 #define __CLC_RELATIONAL_CLC_ISLESS_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isless
-#define __clc_isless isless
-#else
-
 #define __CLC_FUNCTION __clc_isless
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISLESS_H__

diff  --git a/libclc/clc/include/clc/relational/clc_islessequal.h b/libclc/clc/include/clc/relational/clc_islessequal.h
index 7efac163e106a24..520f3d9c6ffd6a4 100644
--- a/libclc/clc/include/clc/relational/clc_islessequal.h
+++ b/libclc/clc/include/clc/relational/clc_islessequal.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISLESSEQUAL_H__
 #define __CLC_RELATIONAL_CLC_ISLESSEQUAL_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible islessequal
-#define __clc_islessequal islessequal
-#else
-
 #define __CLC_FUNCTION __clc_islessequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISLESSEQUAL_H__

diff  --git a/libclc/clc/include/clc/relational/clc_islessgreater.h b/libclc/clc/include/clc/relational/clc_islessgreater.h
index df3c5e513c86ce2..e90eadbbca5e545 100644
--- a/libclc/clc/include/clc/relational/clc_islessgreater.h
+++ b/libclc/clc/include/clc/relational/clc_islessgreater.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISLESSGREATER_H__
 #define __CLC_RELATIONAL_CLC_ISLESSGREATER_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible islessgreater
-#define __clc_islessgreater islessgreater
-#else
-
 #define __CLC_FUNCTION __clc_islessgreater
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISLESSGREATER_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isnormal.h b/libclc/clc/include/clc/relational/clc_isnormal.h
index 48ee6b83a5711bf..269abf00374115b 100644
--- a/libclc/clc/include/clc/relational/clc_isnormal.h
+++ b/libclc/clc/include/clc/relational/clc_isnormal.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISNORMAL_H__
 #define __CLC_RELATIONAL_CLC_ISNORMAL_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isnormal
-#define __clc_isnormal isnormal
-#else
-
 #define __CLC_FUNCTION __clc_isnormal
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISNORMAL_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isnotequal.h b/libclc/clc/include/clc/relational/clc_isnotequal.h
index 55c1bd91b2dd5dd..598657658ec580a 100644
--- a/libclc/clc/include/clc/relational/clc_isnotequal.h
+++ b/libclc/clc/include/clc/relational/clc_isnotequal.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISNOTEQUAL_H__
 #define __CLC_RELATIONAL_CLC_ISNOTEQUAL_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isnotequal
-#define __clc_isnotequal isnotequal
-#else
-
 #define __CLC_FUNCTION __clc_isnotequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISNOTEQUAL_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isordered.h b/libclc/clc/include/clc/relational/clc_isordered.h
index 5ce2bfe334027fe..f4363d3d8a83229 100644
--- a/libclc/clc/include/clc/relational/clc_isordered.h
+++ b/libclc/clc/include/clc/relational/clc_isordered.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISORDERED_H__
 #define __CLC_RELATIONAL_CLC_ISORDERED_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isordered
-#define __clc_isordered isordered
-#else
-
 #define __CLC_FUNCTION __clc_isordered
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISORDERED_H__

diff  --git a/libclc/clc/include/clc/relational/clc_isunordered.h b/libclc/clc/include/clc/relational/clc_isunordered.h
index 305d2b4e9131ffb..e7f01826d5cc92d 100644
--- a/libclc/clc/include/clc/relational/clc_isunordered.h
+++ b/libclc/clc/include/clc/relational/clc_isunordered.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_ISUNORDERED_H__
 #define __CLC_RELATIONAL_CLC_ISUNORDERED_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible isunordered
-#define __clc_isunordered isunordered
-#else
-
 #define __CLC_FUNCTION __clc_isunordered
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_ISUNORDERED_H__

diff  --git a/libclc/clc/include/clc/relational/clc_signbit.h b/libclc/clc/include/clc/relational/clc_signbit.h
index 45a7112c9eb9693..55561dd83487179 100644
--- a/libclc/clc/include/clc/relational/clc_signbit.h
+++ b/libclc/clc/include/clc/relational/clc_signbit.h
@@ -1,11 +1,6 @@
 #ifndef __CLC_RELATIONAL_CLC_SIGNBIT_H__
 #define __CLC_RELATIONAL_CLC_SIGNBIT_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible signbit
-#define __clc_signbit signbit
-#else
-
 #define __CLC_FUNCTION __clc_signbit
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
@@ -14,6 +9,4 @@
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
 
-#endif
-
 #endif // __CLC_RELATIONAL_CLC_SIGNBIT_H__

diff  --git a/libclc/clc/include/clc/shared/clc_max.h b/libclc/clc/include/clc/shared/clc_max.h
index 388f001a277823d..9bfa05552a39903 100644
--- a/libclc/clc/include/clc/shared/clc_max.h
+++ b/libclc/clc/include/clc/shared/clc_max.h
@@ -1,17 +1,10 @@
 #ifndef __CLC_SHARED_CLC_MAX_H__
 #define __CLC_SHARED_CLC_MAX_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible max
-#define __clc_max max
-#else
-
 #define __CLC_BODY <clc/shared/clc_max.inc>
 #include <clc/integer/gentype.inc>
 
 #define __CLC_BODY <clc/shared/clc_max.inc>
 #include <clc/math/gentype.inc>
 
-#endif
-
 #endif // __CLC_SHARED_CLC_MAX_H__

diff  --git a/libclc/clc/include/clc/shared/clc_min.h b/libclc/clc/include/clc/shared/clc_min.h
index c8d920e1b4eb883..a10193885328fa6 100644
--- a/libclc/clc/include/clc/shared/clc_min.h
+++ b/libclc/clc/include/clc/shared/clc_min.h
@@ -1,17 +1,10 @@
 #ifndef __CLC_SHARED_CLC_MIN_H__
 #define __CLC_SHARED_CLC_MIN_H__
 
-#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
-// clspv and spir-v targets provide their own OpenCL-compatible min
-#define __clc_min min
-#else
-
 #define __CLC_BODY <clc/shared/clc_min.inc>
 #include <clc/integer/gentype.inc>
 
 #define __CLC_BODY <clc/shared/clc_min.inc>
 #include <clc/math/gentype.inc>
 
-#endif
-
 #endif // __CLC_SHARED_CLC_MIN_H__

diff  --git a/libclc/clc/lib/clspv/SOURCES b/libclc/clc/lib/clspv/SOURCES
deleted file mode 100644
index 2fe07f62a328ca0..000000000000000
--- a/libclc/clc/lib/clspv/SOURCES
+++ /dev/null
@@ -1,23 +0,0 @@
-../generic/integer/clc_add_sat.cl
-../generic/integer/clc_clz.cl
-../generic/integer/clc_hadd.cl
-../generic/integer/clc_mad24.cl
-../generic/integer/clc_mad_sat.cl
-../generic/integer/clc_mul24.cl
-../generic/integer/clc_mul_hi.cl
-../generic/integer/clc_popcount.cl
-../generic/integer/clc_rhadd.cl
-../generic/integer/clc_rotate.cl
-../generic/integer/clc_sub_sat.cl
-../generic/integer/clc_upsample.cl
-../generic/math/clc_ceil.cl
-../generic/math/clc_copysign.cl
-../generic/math/clc_fabs.cl
-../generic/math/clc_floor.cl
-../generic/math/clc_mad.cl
-../generic/math/clc_nextafter.cl
-../generic/math/clc_rint.cl
-../generic/math/clc_trunc.cl
-../generic/relational/clc_isnan.cl
-../generic/relational/clc_select.cl
-../generic/shared/clc_clamp.cl

diff  --git a/libclc/clc/lib/spirv/SOURCES b/libclc/clc/lib/spirv/SOURCES
deleted file mode 100644
index 96040a3aebd8355..000000000000000
--- a/libclc/clc/lib/spirv/SOURCES
+++ /dev/null
@@ -1,26 +0,0 @@
-../generic/common/clc_degrees.cl
-../generic/common/clc_radians.cl
-../generic/common/clc_smoothstep.cl
-../generic/geometric/clc_dot.cl
-../generic/integer/clc_add_sat.cl
-../generic/integer/clc_clz.cl
-../generic/integer/clc_hadd.cl
-../generic/integer/clc_mad24.cl
-../generic/integer/clc_mad_sat.cl
-../generic/integer/clc_mul24.cl
-../generic/integer/clc_mul_hi.cl
-../generic/integer/clc_popcount.cl
-../generic/integer/clc_rhadd.cl
-../generic/integer/clc_rotate.cl
-../generic/integer/clc_sub_sat.cl
-../generic/integer/clc_upsample.cl
-../generic/math/clc_ceil.cl
-../generic/math/clc_copysign.cl
-../generic/math/clc_fabs.cl
-../generic/math/clc_floor.cl
-../generic/math/clc_mad.cl
-../generic/math/clc_nextafter.cl
-../generic/math/clc_rint.cl
-../generic/math/clc_trunc.cl
-../generic/relational/clc_select.cl
-../generic/shared/clc_clamp.cl


        


More information about the cfe-commits mailing list