Author: Fraser Cormack
Date: 2025-07-07T10:20:28+01:00
New Revision: ea685890b8b22c401bd7c5ec0b233349b479a029

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

LOG: [libclc] Reduce include usage in OpenCL builtins (#146840)

This commit starts the process of reducing the amount of code included
by OpenCL builtins, hopefully reducing build times in the process.

It introduces a minimal OpenCL header - opencl-base.h - which includes
only the OpenCL type definitions and the macros necessary for
declaring/defining functions.

Where the OpenCL builtin implementations would currently include the
whole of <clc/opencl/clc.h>, which defines *all* OpenCL builtins, now
they include only the specific declaration they need.

This mirrors how the CLC builtins are defined.

Added: 
    libclc/opencl/include/clc/opencl/opencl-base.h

Modified: 
    libclc/opencl/include/clc/opencl/clc.h
    libclc/opencl/include/clc/opencl/integer/abs.h
    libclc/opencl/include/clc/opencl/integer/abs_diff.h
    libclc/opencl/include/clc/opencl/integer/add_sat.h
    libclc/opencl/include/clc/opencl/integer/clz.h
    libclc/opencl/include/clc/opencl/integer/ctz.h
    libclc/opencl/include/clc/opencl/integer/hadd.h
    libclc/opencl/include/clc/opencl/integer/mad24.h
    libclc/opencl/include/clc/opencl/integer/mad_hi.h
    libclc/opencl/include/clc/opencl/integer/mad_sat.h
    libclc/opencl/include/clc/opencl/integer/mul24.h
    libclc/opencl/include/clc/opencl/integer/mul_hi.h
    libclc/opencl/include/clc/opencl/integer/popcount.h
    libclc/opencl/include/clc/opencl/integer/rhadd.h
    libclc/opencl/include/clc/opencl/integer/rotate.h
    libclc/opencl/include/clc/opencl/integer/sub_sat.h
    libclc/opencl/include/clc/opencl/integer/upsample.h
    libclc/opencl/lib/generic/integer/abs.cl
    libclc/opencl/lib/generic/integer/abs_diff.cl
    libclc/opencl/lib/generic/integer/add_sat.cl
    libclc/opencl/lib/generic/integer/clz.cl
    libclc/opencl/lib/generic/integer/ctz.cl
    libclc/opencl/lib/generic/integer/hadd.cl
    libclc/opencl/lib/generic/integer/mad24.cl
    libclc/opencl/lib/generic/integer/mad_hi.cl
    libclc/opencl/lib/generic/integer/mad_sat.cl
    libclc/opencl/lib/generic/integer/mul24.cl
    libclc/opencl/lib/generic/integer/mul_hi.cl
    libclc/opencl/lib/generic/integer/popcount.cl
    libclc/opencl/lib/generic/integer/rhadd.cl
    libclc/opencl/lib/generic/integer/rotate.cl
    libclc/opencl/lib/generic/integer/sub_sat.cl
    libclc/opencl/lib/generic/integer/upsample.cl

Removed: 
    


################################################################################
diff  --git a/libclc/opencl/include/clc/opencl/clc.h 
b/libclc/opencl/include/clc/opencl/clc.h
index 5859a00c3158b..7d34f00113517 100644
--- a/libclc/opencl/include/clc/opencl/clc.h
+++ b/libclc/opencl/include/clc/opencl/clc.h
@@ -15,19 +15,7 @@
 
 #pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable
 
-#ifdef cl_khr_fp64
-#pragma OPENCL EXTENSION cl_khr_fp64 : enable
-#endif
-
-#ifdef cl_khr_fp16
-#pragma OPENCL EXTENSION cl_khr_fp16 : enable
-#endif
-
-/* Function Attributes */
-#include <clc/clcfunc.h>
-
-/* 6.1 Supported Data Types */
-#include <clc/clctypes.h>
+#include <clc/opencl/opencl-base.h>
 
 /* 6.2.3 Explicit Conversions */
 #include <clc/opencl/convert.h>

diff  --git a/libclc/opencl/include/clc/opencl/integer/abs.h 
b/libclc/opencl/include/clc/opencl/integer/abs.h
index 22ba40fb40d42..3059bef9a7e4f 100644
--- a/libclc/opencl/include/clc/opencl/integer/abs.h
+++ b/libclc/opencl/include/clc/opencl/integer/abs.h
@@ -6,5 +6,12 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_ABS_H__
+#define __CLC_OPENCL_INTEGER_ABS_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define __CLC_BODY <clc/opencl/integer/abs.inc>
 #include <clc/integer/gentype.inc>
+
+#endif // __CLC_OPENCL_INTEGER_ABS_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/abs_
diff .h b/libclc/opencl/include/clc/opencl/integer/abs_
diff .h
index f22cc4d88afcf..9e8fe2b31fed7 100644
--- a/libclc/opencl/include/clc/opencl/integer/abs_
diff .h
+++ b/libclc/opencl/include/clc/opencl/integer/abs_
diff .h
@@ -6,5 +6,12 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_ABS_DIFF_H__
+#define __CLC_OPENCL_INTEGER_ABS_DIFF_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define __CLC_BODY <clc/opencl/integer/abs_
diff .inc>
 #include <clc/integer/gentype.inc>
+
+#endif // __CLC_OPENCL_INTEGER_ABS_DIFF_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/add_sat.h 
b/libclc/opencl/include/clc/opencl/integer/add_sat.h
index c0acb63e945d5..cd2c17a096299 100644
--- a/libclc/opencl/include/clc/opencl/integer/add_sat.h
+++ b/libclc/opencl/include/clc/opencl/integer/add_sat.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_ADD_SAT_H__
+#define __CLC_OPENCL_INTEGER_ADD_SAT_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION add_sat
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_ADD_SAT_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/clz.h 
b/libclc/opencl/include/clc/opencl/integer/clz.h
index b05f8b27b0541..77032ceeaf0f4 100644
--- a/libclc/opencl/include/clc/opencl/integer/clz.h
+++ b/libclc/opencl/include/clc/opencl/integer/clz.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_CLZ_H__
+#define __CLC_OPENCL_INTEGER_CLZ_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION clz
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_CLZ_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/ctz.h 
b/libclc/opencl/include/clc/opencl/integer/ctz.h
index 44ca8fe541ef9..b861225846ee4 100644
--- a/libclc/opencl/include/clc/opencl/integer/ctz.h
+++ b/libclc/opencl/include/clc/opencl/integer/ctz.h
@@ -6,8 +6,13 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_CTZ_H__
+#define __CLC_OPENCL_INTEGER_CTZ_H__
+
 #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
 
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION ctz
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
@@ -16,3 +21,5 @@
 #undef FUNCTION
 
 #endif // __OPENCL_C_VERSION__ >= CL_VERSION_2_0
+
+#endif // __CLC_OPENCL_INTEGER_CTZ_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/hadd.h 
b/libclc/opencl/include/clc/opencl/integer/hadd.h
index fc66fab1bbfba..c4c8f7daf4014 100644
--- a/libclc/opencl/include/clc/opencl/integer/hadd.h
+++ b/libclc/opencl/include/clc/opencl/integer/hadd.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_HADD_H__
+#define __CLC_OPENCL_INTEGER_HADD_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION hadd
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_HADD_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/mad24.h 
b/libclc/opencl/include/clc/opencl/integer/mad24.h
index 7c5f4d478cd95..daee9a0383477 100644
--- a/libclc/opencl/include/clc/opencl/integer/mad24.h
+++ b/libclc/opencl/include/clc/opencl/integer/mad24.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_MAD24_H__
+#define __CLC_OPENCL_INTEGER_MAD24_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION mad24
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/integer/gentype24.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_MAD24_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/mad_hi.h 
b/libclc/opencl/include/clc/opencl/integer/mad_hi.h
index c68d1b65dcf24..bbcdcd9c82ebd 100644
--- a/libclc/opencl/include/clc/opencl/integer/mad_hi.h
+++ b/libclc/opencl/include/clc/opencl/integer/mad_hi.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_MAD_HI_H__
+#define __CLC_OPENCL_INTEGER_MAD_HI_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION mad_hi
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_MAD_HI_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/mad_sat.h 
b/libclc/opencl/include/clc/opencl/integer/mad_sat.h
index 02ced7a74b2b1..28045477975ed 100644
--- a/libclc/opencl/include/clc/opencl/integer/mad_sat.h
+++ b/libclc/opencl/include/clc/opencl/integer/mad_sat.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_MAD_SAT_H__
+#define __CLC_OPENCL_INTEGER_MAD_SAT_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION mad_sat
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_MAD_SAT_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/mul24.h 
b/libclc/opencl/include/clc/opencl/integer/mul24.h
index 67aebcaf2a308..6aa799a28b7ec 100644
--- a/libclc/opencl/include/clc/opencl/integer/mul24.h
+++ b/libclc/opencl/include/clc/opencl/integer/mul24.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_MUL24_H__
+#define __CLC_OPENCL_INTEGER_MUL24_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION mul24
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype24.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_MUL24_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/mul_hi.h 
b/libclc/opencl/include/clc/opencl/integer/mul_hi.h
index 24a9d1b8f8035..ed7ac7319cab8 100644
--- a/libclc/opencl/include/clc/opencl/integer/mul_hi.h
+++ b/libclc/opencl/include/clc/opencl/integer/mul_hi.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_MUL_HI_H__
+#define __CLC_OPENCL_INTEGER_MUL_HI_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION mul_hi
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_MUL_HI_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/popcount.h 
b/libclc/opencl/include/clc/opencl/integer/popcount.h
index 301f30cb7a6bf..43d5bc0f0b335 100644
--- a/libclc/opencl/include/clc/opencl/integer/popcount.h
+++ b/libclc/opencl/include/clc/opencl/integer/popcount.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_POPCOUNT_H__
+#define __CLC_OPENCL_INTEGER_POPCOUNT_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION popcount
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_POPCOUNT_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/rhadd.h 
b/libclc/opencl/include/clc/opencl/integer/rhadd.h
index b1a46e998493f..2c93c100cf02f 100644
--- a/libclc/opencl/include/clc/opencl/integer/rhadd.h
+++ b/libclc/opencl/include/clc/opencl/integer/rhadd.h
@@ -6,9 +6,14 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_RHADD_H__
+#define __CLC_OPENCL_INTEGER_RHADD_H__
+
 #define FUNCTION rhadd
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_RHADD_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/rotate.h 
b/libclc/opencl/include/clc/opencl/integer/rotate.h
index be4fe2680d34a..156155ae0638a 100644
--- a/libclc/opencl/include/clc/opencl/integer/rotate.h
+++ b/libclc/opencl/include/clc/opencl/integer/rotate.h
@@ -6,9 +6,16 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_ROTATE_H__
+#define __CLC_OPENCL_INTEGER_ROTATE_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define FUNCTION rotate
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_ROTATE_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/sub_sat.h 
b/libclc/opencl/include/clc/opencl/integer/sub_sat.h
index 65f57a17b0fee..a7861ee1ac4a1 100644
--- a/libclc/opencl/include/clc/opencl/integer/sub_sat.h
+++ b/libclc/opencl/include/clc/opencl/integer/sub_sat.h
@@ -6,9 +6,14 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_SUB_SAT_H__
+#define __CLC_OPENCL_INTEGER_SUB_SAT_H__
+
 #define FUNCTION sub_sat
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef FUNCTION
+
+#endif // __CLC_OPENCL_INTEGER_SUB_SAT_H__

diff  --git a/libclc/opencl/include/clc/opencl/integer/upsample.h 
b/libclc/opencl/include/clc/opencl/integer/upsample.h
index 0db67dfe4e973..a713f2b392f27 100644
--- a/libclc/opencl/include/clc/opencl/integer/upsample.h
+++ b/libclc/opencl/include/clc/opencl/integer/upsample.h
@@ -6,6 +6,11 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#ifndef __CLC_OPENCL_INTEGER_UPSAMPLE_H__
+#define __CLC_OPENCL_INTEGER_UPSAMPLE_H__
+
+#include <clc/opencl/opencl-base.h>
+
 #define __CLC_UPSAMPLE_DECL(BGENTYPE, GENTYPE, UGENTYPE)                       
\
   _CLC_OVERLOAD _CLC_DECL BGENTYPE upsample(GENTYPE hi, UGENTYPE lo);
 
@@ -30,3 +35,5 @@ __CLC_UPSAMPLE_TYPES()
 #undef __CLC_UPSAMPLE_TYPES
 #undef __CLC_UPSAMPLE_DECL
 #undef __CLC_UPSAMPLE_VEC
+
+#endif // __CLC_OPENCL_INTEGER_UPSAMPLE_H__

diff  --git a/libclc/opencl/include/clc/opencl/opencl-base.h 
b/libclc/opencl/include/clc/opencl/opencl-base.h
new file mode 100644
index 0000000000000..ac0dd0f129707
--- /dev/null
+++ b/libclc/opencl/include/clc/opencl/opencl-base.h
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __CLC_OPENCL_OPENCL_BASE_H__
+#define __CLC_OPENCL_OPENCL_BASE_H__
+
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#endif
+
+#ifdef cl_khr_fp16
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
+#endif
+
+/* Function Attributes */
+#include <clc/clcfunc.h>
+
+/* 6.1 Supported Data Types */
+#include <clc/clctypes.h>
+
+#endif // __CLC_OPENCL_OPENCL_BASE_H__

diff  --git a/libclc/opencl/lib/generic/integer/abs.cl 
b/libclc/opencl/lib/generic/integer/abs.cl
index 5d354d97e71c5..0771ec7934330 100644
--- a/libclc/opencl/lib/generic/integer/abs.cl
+++ b/libclc/opencl/lib/generic/integer/abs.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_abs.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/abs.h>
 
 #define __CLC_BODY <abs.inc>
 #include <clc/integer/gentype.inc>

diff  --git a/libclc/opencl/lib/generic/integer/abs_
diff .cl b/libclc/opencl/lib/generic/integer/abs_
diff .cl
index 73d6631b3a4a3..d65b0468a7f21 100644
--- a/libclc/opencl/lib/generic/integer/abs_
diff .cl
+++ b/libclc/opencl/lib/generic/integer/abs_
diff .cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_abs_
diff .h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/abs_
diff .h>
 
 #define __CLC_BODY <abs_
diff .inc>
 #include <clc/integer/gentype.inc>

diff  --git a/libclc/opencl/lib/generic/integer/add_sat.cl 
b/libclc/opencl/lib/generic/integer/add_sat.cl
index 8fe1d32a82216..50d989a47211b 100644
--- a/libclc/opencl/lib/generic/integer/add_sat.cl
+++ b/libclc/opencl/lib/generic/integer/add_sat.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_add_sat.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/add_sat.h>
 
 #define FUNCTION add_sat
 #define __CLC_BODY <clc/shared/binary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/clz.cl 
b/libclc/opencl/lib/generic/integer/clz.cl
index cf12a9838c6d7..58110df1eec24 100644
--- a/libclc/opencl/lib/generic/integer/clz.cl
+++ b/libclc/opencl/lib/generic/integer/clz.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_clz.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/clz.h>
 
 #define FUNCTION clz
 #define __CLC_BODY <clc/shared/unary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/ctz.cl 
b/libclc/opencl/lib/generic/integer/ctz.cl
index 1b0470e08fd36..cbb167275a4a6 100644
--- a/libclc/opencl/lib/generic/integer/ctz.cl
+++ b/libclc/opencl/lib/generic/integer/ctz.cl
@@ -9,7 +9,7 @@
 #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
 
 #include <clc/integer/clc_ctz.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/ctz.h>
 
 #define FUNCTION ctz
 #define __CLC_BODY <clc/shared/unary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/hadd.cl 
b/libclc/opencl/lib/generic/integer/hadd.cl
index 100cb7bf207a5..e9edc88bce02c 100644
--- a/libclc/opencl/lib/generic/integer/hadd.cl
+++ b/libclc/opencl/lib/generic/integer/hadd.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_hadd.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/hadd.h>
 
 #define FUNCTION hadd
 #define __CLC_BODY <clc/shared/binary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/mad24.cl 
b/libclc/opencl/lib/generic/integer/mad24.cl
index d42873f1dd15e..5e9dfb3b3031a 100644
--- a/libclc/opencl/lib/generic/integer/mad24.cl
+++ b/libclc/opencl/lib/generic/integer/mad24.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_mad24.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/mad24.h>
 
 #define FUNCTION mad24
 #define __CLC_BODY <clc/shared/ternary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/mad_hi.cl 
b/libclc/opencl/lib/generic/integer/mad_hi.cl
index 68e610d400cc1..786614e42bc8b 100644
--- a/libclc/opencl/lib/generic/integer/mad_hi.cl
+++ b/libclc/opencl/lib/generic/integer/mad_hi.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_mad_hi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/mad_hi.h>
 
 #define FUNCTION mad_hi
 #define __CLC_BODY <clc/shared/ternary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/mad_sat.cl 
b/libclc/opencl/lib/generic/integer/mad_sat.cl
index d9daf56632b07..54ddc0eed2d17 100644
--- a/libclc/opencl/lib/generic/integer/mad_sat.cl
+++ b/libclc/opencl/lib/generic/integer/mad_sat.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_mad_sat.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/mad_sat.h>
 
 #define FUNCTION mad_sat
 #define __CLC_BODY <clc/shared/ternary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/mul24.cl 
b/libclc/opencl/lib/generic/integer/mul24.cl
index b0a9ff80f3528..e6db6b89c5d98 100644
--- a/libclc/opencl/lib/generic/integer/mul24.cl
+++ b/libclc/opencl/lib/generic/integer/mul24.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_mul24.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/mul24.h>
 
 #define FUNCTION mul24
 #define __CLC_BODY <clc/shared/binary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/mul_hi.cl 
b/libclc/opencl/lib/generic/integer/mul_hi.cl
index 40cb359f5b296..4c7b8c2caa994 100644
--- a/libclc/opencl/lib/generic/integer/mul_hi.cl
+++ b/libclc/opencl/lib/generic/integer/mul_hi.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_mul_hi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/mul_hi.h>
 
 #define FUNCTION mul_hi
 #define __CLC_BODY <clc/shared/binary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/popcount.cl 
b/libclc/opencl/lib/generic/integer/popcount.cl
index a349f454813ef..3c33c82302c39 100644
--- a/libclc/opencl/lib/generic/integer/popcount.cl
+++ b/libclc/opencl/lib/generic/integer/popcount.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_popcount.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/popcount.h>
 
 #define FUNCTION popcount
 #define __CLC_BODY <clc/shared/unary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/rhadd.cl 
b/libclc/opencl/lib/generic/integer/rhadd.cl
index 539def845488d..f835511899429 100644
--- a/libclc/opencl/lib/generic/integer/rhadd.cl
+++ b/libclc/opencl/lib/generic/integer/rhadd.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_rhadd.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/rhadd.h>
 
 #define FUNCTION rhadd
 #define __CLC_BODY <clc/shared/binary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/rotate.cl 
b/libclc/opencl/lib/generic/integer/rotate.cl
index a340ccf77b2ea..282270f3b3ff2 100644
--- a/libclc/opencl/lib/generic/integer/rotate.cl
+++ b/libclc/opencl/lib/generic/integer/rotate.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_rotate.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/rotate.h>
 
 #define FUNCTION rotate
 #define __CLC_BODY <clc/shared/binary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/sub_sat.cl 
b/libclc/opencl/lib/generic/integer/sub_sat.cl
index 46596724358ab..0b45df1118f14 100644
--- a/libclc/opencl/lib/generic/integer/sub_sat.cl
+++ b/libclc/opencl/lib/generic/integer/sub_sat.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_sub_sat.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/sub_sat.h>
 
 #define FUNCTION sub_sat
 #define __CLC_BODY <clc/shared/binary_def.inc>

diff  --git a/libclc/opencl/lib/generic/integer/upsample.cl 
b/libclc/opencl/lib/generic/integer/upsample.cl
index 32cb3cffc9ebd..5f95c811e058d 100644
--- a/libclc/opencl/lib/generic/integer/upsample.cl
+++ b/libclc/opencl/lib/generic/integer/upsample.cl
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/integer/clc_upsample.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/integer/upsample.h>
 
 #define __CLC_UPSAMPLE_IMPL(BGENTYPE, GENTYPE, UGENTYPE)                       
\
   _CLC_OVERLOAD _CLC_DEF BGENTYPE upsample(GENTYPE hi, UGENTYPE lo) {          
\


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to