[libclc] [libclc] Reduce include usage in OpenCL builtins (PR #146840)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 3 02:48:11 PDT 2025
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/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.
>From 809436c048edefdccb75a68b6c8ba334bd4c2401 Mon Sep 17 00:00:00 2001
From: Fraser Cormack <fraser at codeplay.com>
Date: Thu, 3 Jul 2025 10:45:05 +0100
Subject: [PATCH] [libclc] Reduce include usage in OpenCL builtins
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.
---
libclc/opencl/include/clc/opencl/clc.h | 14 +---------
.../opencl/include/clc/opencl/integer/abs.h | 7 +++++
.../include/clc/opencl/integer/abs_diff.h | 7 +++++
.../include/clc/opencl/integer/add_sat.h | 7 +++++
.../opencl/include/clc/opencl/integer/clz.h | 7 +++++
.../opencl/include/clc/opencl/integer/ctz.h | 7 +++++
.../opencl/include/clc/opencl/integer/hadd.h | 7 +++++
.../opencl/include/clc/opencl/integer/mad24.h | 7 +++++
.../include/clc/opencl/integer/mad_hi.h | 7 +++++
.../include/clc/opencl/integer/mad_sat.h | 7 +++++
.../opencl/include/clc/opencl/integer/mul24.h | 5 ++++
.../include/clc/opencl/integer/mul_hi.h | 7 +++++
.../include/clc/opencl/integer/popcount.h | 7 +++++
.../include/clc/opencl/integer/rotate.h | 7 +++++
.../include/clc/opencl/integer/upsample.h | 7 +++++
.../opencl/include/clc/opencl/opencl-base.h | 26 +++++++++++++++++++
libclc/opencl/lib/generic/integer/abs.cl | 2 +-
libclc/opencl/lib/generic/integer/abs_diff.cl | 2 +-
libclc/opencl/lib/generic/integer/add_sat.cl | 2 +-
libclc/opencl/lib/generic/integer/clz.cl | 2 +-
libclc/opencl/lib/generic/integer/ctz.cl | 2 +-
libclc/opencl/lib/generic/integer/hadd.cl | 2 +-
libclc/opencl/lib/generic/integer/mad24.cl | 2 +-
libclc/opencl/lib/generic/integer/mad_hi.cl | 2 +-
libclc/opencl/lib/generic/integer/mad_sat.cl | 2 +-
libclc/opencl/lib/generic/integer/mul24.cl | 2 +-
libclc/opencl/lib/generic/integer/mul_hi.cl | 2 +-
libclc/opencl/lib/generic/integer/popcount.cl | 2 +-
libclc/opencl/lib/generic/integer/rotate.cl | 2 +-
libclc/opencl/lib/generic/integer/upsample.cl | 2 +-
30 files changed, 137 insertions(+), 27 deletions(-)
create mode 100644 libclc/opencl/include/clc/opencl/opencl-base.h
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..be064fa33afbc 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_OPENCL_INTEGER_ABS_H__
+#define __CLC_OPENCL_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_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..1716eb24df614 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_OPENCL_INTEGER_ABS_DIFF_H__
+#define __CLC_OPENCL_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_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 1982d11908008..ff6feb08321a1 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_OPENCL_INTEGER_ADD_SAT_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_ADD_SAT_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION add_sat
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/integer/gentype.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_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 b215fc1d0bc94..3d7e184e36229 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_OPENCL_INTEGER_CLZ_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_CLZ_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION clz
#define __CLC_BODY <clc/shared/unary_decl.inc>
#include <clc/integer/gentype.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_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 2ab6436440853..06167d7eb226a 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_OPENCL_INTEGER_CTZ_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_CTZ_H__
+
#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION ctz
#define __CLC_BODY <clc/shared/unary_decl.inc>
@@ -16,3 +21,5 @@
#undef __CLC_FUNCTION
#endif // __OPENCL_C_VERSION__ >= CL_VERSION_2_0
+
+#endif // __CLC_OPENCL_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 c05c9d50e67d3..10720c0285afe 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_OPENCL_INTEGER_HADD_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_HADD_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION hadd
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/integer/gentype.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_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 9ff998a8604d4..3502636882f33 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_OPENCL_INTEGER_MAD24_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_MAD24_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION mad24
#define __CLC_BODY <clc/shared/ternary_decl.inc>
#include <clc/integer/gentype24.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_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 e06ab8f3c11f1..a1a28b270a709 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_OPENCL_INTEGER_MAD_HI_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_MAD_HI_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION mad_hi
#define __CLC_BODY <clc/shared/ternary_decl.inc>
#include <clc/integer/gentype.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_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 0a9fd7869a6f4..2db4f0bb8c80b 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_OPENCL_INTEGER_MAD_SAT_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_MAD_SAT_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION mad_sat
#define __CLC_BODY <clc/shared/ternary_decl.inc>
#include <clc/integer/gentype.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_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 d2aca25fc3140..9eb7e8f2dba1f 100644
--- a/libclc/opencl/include/clc/opencl/integer/mul24.h
+++ b/libclc/opencl/include/clc/opencl/integer/mul24.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_OPENCL_INTEGER_MUL24_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_MUL24_H__
+
#define __CLC_FUNCTION mul24
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/integer/gentype24.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_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 4374ec73be32a..e5139599c521f 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_OPENCL_INTEGER_MUL_HI_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_MUL_HI_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION mul_hi
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/integer/gentype.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_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 4d43f26f489e6..fac9c7327a09a 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_OPENCL_INTEGER_POPCOUNT_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_POPCOUNT_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION popcount
#define __CLC_BODY <clc/shared/unary_decl.inc>
#include <clc/integer/gentype.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_OPENCL_INTEGER_POPCOUNT_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/rotate.h b/libclc/opencl/include/clc/opencl/integer/rotate.h
index 1e4de24cbf313..70a7135c21e10 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_OPENCL_INTEGER_ROTATE_H__
+#define __CLC_OPENCL_OPENCL_INTEGER_ROTATE_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_FUNCTION rotate
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/integer/gentype.inc>
#undef __CLC_FUNCTION
+
+#endif // __CLC_OPENCL_OPENCL_INTEGER_ROTATE_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/upsample.h b/libclc/opencl/include/clc/opencl/integer/upsample.h
index 0db67dfe4e973..c277d3dbc9c4c 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_OPENCL_INTEGER_UPSAMPLE_H__
+#define __CLC_OPENCL_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_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/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/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) { \
More information about the cfe-commits
mailing list