[libclc] [NFC][libclc] Delete OpenCL builtin declarations (PR #170803)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 4 22:03:36 PST 2025
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/170803
This is follow-up of comment
https://github.com/llvm/llvm-project/pull/168318#discussion_r2588117855
libclc OpenCL library is already compiled with flag `-fdeclare-opencl-builtins -finclude-default-header`.
>From b8aa3ecef7e92cfdb893ee55716a0e3f7201bd6c Mon Sep 17 00:00:00 2001
From: Wenju He <wenju.he at intel.com>
Date: Fri, 5 Dec 2025 06:58:53 +0100
Subject: [PATCH] [NFC][libclc] Delete OpenCL builtin declarations
This is follow-up of comment
https://github.com/llvm/llvm-project/pull/168318#discussion_r2588117855
libclc OpenCL library is already compiled with flag
`-fdeclare-opencl-builtins -finclude-default-header`.
---
.../clc/opencl/async/async_work_group_copy.h | 30 ----
.../opencl/async/async_work_group_copy.inc | 12 --
.../async/async_work_group_strided_copy.h | 30 ----
.../async/async_work_group_strided_copy.inc | 12 --
.../include/clc/opencl/async/prefetch.h | 18 ---
.../include/clc/opencl/async/prefetch.inc | 10 --
.../clc/opencl/async/wait_group_events.h | 17 ---
.../include/clc/opencl/atomic/atom_add.h | 31 ----
.../include/clc/opencl/atomic/atom_and.h | 31 ----
.../include/clc/opencl/atomic/atom_cmpxchg.h | 46 ------
.../include/clc/opencl/atomic/atom_dec.h | 35 -----
.../clc/opencl/atomic/atom_decl_int32.inc | 18 ---
.../clc/opencl/atomic/atom_decl_int64.inc | 19 ---
.../include/clc/opencl/atomic/atom_inc.h | 35 -----
.../include/clc/opencl/atomic/atom_max.h | 31 ----
.../include/clc/opencl/atomic/atom_min.h | 31 ----
.../include/clc/opencl/atomic/atom_or.h | 31 ----
.../include/clc/opencl/atomic/atom_sub.h | 31 ----
.../include/clc/opencl/atomic/atom_xchg.h | 31 ----
.../include/clc/opencl/atomic/atom_xor.h | 31 ----
.../include/clc/opencl/atomic/atomic_add.h | 17 ---
.../include/clc/opencl/atomic/atomic_and.h | 17 ---
.../clc/opencl/atomic/atomic_cmpxchg.h | 19 ---
.../atomic/atomic_compare_exchange_strong.h | 26 ----
.../atomic/atomic_compare_exchange_weak.h | 26 ----
.../include/clc/opencl/atomic/atomic_dec.h | 19 ---
.../include/clc/opencl/atomic/atomic_decl.inc | 134 ------------------
.../clc/opencl/atomic/atomic_decl_legacy.inc | 22 ---
.../clc/opencl/atomic/atomic_exchange.h | 24 ----
.../clc/opencl/atomic/atomic_fetch_add.h | 24 ----
.../clc/opencl/atomic/atomic_fetch_and.h | 21 ---
.../clc/opencl/atomic/atomic_fetch_max.h | 24 ----
.../clc/opencl/atomic/atomic_fetch_min.h | 24 ----
.../clc/opencl/atomic/atomic_fetch_or.h | 21 ---
.../clc/opencl/atomic/atomic_fetch_sub.h | 24 ----
.../clc/opencl/atomic/atomic_fetch_xor.h | 21 ---
.../clc/opencl/atomic/atomic_flag_clear.h | 45 ------
.../opencl/atomic/atomic_flag_test_and_set.h | 49 -------
.../include/clc/opencl/atomic/atomic_inc.h | 19 ---
.../include/clc/opencl/atomic/atomic_init.h | 24 ----
.../include/clc/opencl/atomic/atomic_init.inc | 44 ------
.../include/clc/opencl/atomic/atomic_load.h | 26 ----
.../include/clc/opencl/atomic/atomic_max.h | 17 ---
.../include/clc/opencl/atomic/atomic_min.h | 17 ---
.../include/clc/opencl/atomic/atomic_or.h | 17 ---
.../include/clc/opencl/atomic/atomic_store.h | 26 ----
.../include/clc/opencl/atomic/atomic_sub.h | 17 ---
.../include/clc/opencl/atomic/atomic_xchg.h | 20 ---
.../include/clc/opencl/atomic/atomic_xor.h | 17 ---
.../include/clc/opencl/common/degrees.h | 19 ---
libclc/opencl/include/clc/opencl/common/mix.h | 15 --
.../opencl/include/clc/opencl/common/mix.inc | 17 ---
.../include/clc/opencl/common/radians.h | 19 ---
.../opencl/include/clc/opencl/common/sign.h | 17 ---
.../include/clc/opencl/common/smoothstep.h | 15 --
.../include/clc/opencl/common/smoothstep.inc | 20 ---
.../opencl/include/clc/opencl/common/step.h | 15 --
.../opencl/include/clc/opencl/common/step.inc | 15 --
.../explicit_fence/explicit_memory_fence.h | 18 ---
.../include/clc/opencl/geometric/cross.h | 20 ---
.../include/clc/opencl/geometric/distance.h | 19 ---
.../opencl/include/clc/opencl/geometric/dot.h | 19 ---
.../clc/opencl/geometric/fast_distance.h | 20 ---
.../clc/opencl/geometric/fast_length.h | 20 ---
.../clc/opencl/geometric/fast_normalize.h | 22 ---
.../include/clc/opencl/geometric/length.h | 19 ---
.../include/clc/opencl/geometric/normalize.h | 21 ---
.../opencl/include/clc/opencl/image/image.h | 55 -------
.../include/clc/opencl/image/image_defines.h | 62 --------
.../opencl/include/clc/opencl/integer/abs.h | 17 ---
.../opencl/include/clc/opencl/integer/abs.inc | 9 --
.../include/clc/opencl/integer/abs_diff.h | 17 ---
.../include/clc/opencl/integer/abs_diff.inc | 10 --
.../include/clc/opencl/integer/add_sat.h | 21 ---
.../include/clc/opencl/integer/bit_reverse.h | 25 ----
.../opencl/integer/bitfield_extract_signed.h | 27 ----
.../integer/bitfield_extract_unsigned.h | 27 ----
.../clc/opencl/integer/bitfield_insert.h | 23 ---
.../opencl/include/clc/opencl/integer/clz.h | 21 ---
.../opencl/include/clc/opencl/integer/ctz.h | 25 ----
.../opencl/include/clc/opencl/integer/hadd.h | 21 ---
.../opencl/include/clc/opencl/integer/mad24.h | 21 ---
.../include/clc/opencl/integer/mad_hi.h | 21 ---
.../include/clc/opencl/integer/mad_sat.h | 21 ---
.../opencl/include/clc/opencl/integer/mul24.h | 21 ---
.../include/clc/opencl/integer/mul_hi.h | 21 ---
.../include/clc/opencl/integer/popcount.h | 21 ---
.../opencl/include/clc/opencl/integer/rhadd.h | 19 ---
.../include/clc/opencl/integer/rotate.h | 21 ---
.../include/clc/opencl/integer/sub_sat.h | 19 ---
.../include/clc/opencl/integer/upsample.h | 39 -----
libclc/opencl/include/clc/opencl/math/acos.h | 19 ---
libclc/opencl/include/clc/opencl/math/acosh.h | 19 ---
.../opencl/include/clc/opencl/math/acospi.h | 19 ---
libclc/opencl/include/clc/opencl/math/asin.h | 19 ---
libclc/opencl/include/clc/opencl/math/asinh.h | 19 ---
.../opencl/include/clc/opencl/math/asinpi.h | 19 ---
libclc/opencl/include/clc/opencl/math/atan.h | 19 ---
libclc/opencl/include/clc/opencl/math/atan2.h | 19 ---
.../opencl/include/clc/opencl/math/atan2pi.h | 19 ---
libclc/opencl/include/clc/opencl/math/atanh.h | 19 ---
.../opencl/include/clc/opencl/math/atanpi.h | 19 ---
libclc/opencl/include/clc/opencl/math/cbrt.h | 19 ---
libclc/opencl/include/clc/opencl/math/ceil.h | 19 ---
.../opencl/include/clc/opencl/math/copysign.h | 19 ---
libclc/opencl/include/clc/opencl/math/cos.h | 19 ---
libclc/opencl/include/clc/opencl/math/cosh.h | 19 ---
libclc/opencl/include/clc/opencl/math/cospi.h | 19 ---
libclc/opencl/include/clc/opencl/math/erf.h | 21 ---
libclc/opencl/include/clc/opencl/math/erfc.h | 21 ---
libclc/opencl/include/clc/opencl/math/exp.h | 21 ---
libclc/opencl/include/clc/opencl/math/exp10.h | 21 ---
libclc/opencl/include/clc/opencl/math/exp2.h | 19 ---
libclc/opencl/include/clc/opencl/math/expm1.h | 21 ---
libclc/opencl/include/clc/opencl/math/fabs.h | 19 ---
libclc/opencl/include/clc/opencl/math/fdim.h | 19 ---
libclc/opencl/include/clc/opencl/math/floor.h | 19 ---
libclc/opencl/include/clc/opencl/math/fma.h | 19 ---
libclc/opencl/include/clc/opencl/math/fmax.h | 19 ---
libclc/opencl/include/clc/opencl/math/fmin.h | 19 ---
libclc/opencl/include/clc/opencl/math/fmod.h | 17 ---
libclc/opencl/include/clc/opencl/math/fract.h | 17 ---
libclc/opencl/include/clc/opencl/math/frexp.h | 18 ---
.../opencl/include/clc/opencl/math/half_cos.h | 20 ---
.../include/clc/opencl/math/half_divide.h | 19 ---
.../opencl/include/clc/opencl/math/half_exp.h | 20 ---
.../include/clc/opencl/math/half_exp10.h | 20 ---
.../include/clc/opencl/math/half_exp2.h | 20 ---
.../opencl/include/clc/opencl/math/half_log.h | 20 ---
.../include/clc/opencl/math/half_log10.h | 20 ---
.../include/clc/opencl/math/half_log2.h | 20 ---
.../include/clc/opencl/math/half_powr.h | 19 ---
.../include/clc/opencl/math/half_recip.h | 20 ---
.../include/clc/opencl/math/half_rsqrt.h | 18 ---
.../opencl/include/clc/opencl/math/half_sin.h | 20 ---
.../include/clc/opencl/math/half_sqrt.h | 18 ---
.../opencl/include/clc/opencl/math/half_tan.h | 20 ---
libclc/opencl/include/clc/opencl/math/hypot.h | 19 ---
libclc/opencl/include/clc/opencl/math/ilogb.h | 19 ---
libclc/opencl/include/clc/opencl/math/ldexp.h | 20 ---
.../opencl/include/clc/opencl/math/ldexp.inc | 13 --
.../opencl/include/clc/opencl/math/lgamma.h | 19 ---
.../opencl/include/clc/opencl/math/lgamma_r.h | 19 ---
libclc/opencl/include/clc/opencl/math/log.h | 19 ---
libclc/opencl/include/clc/opencl/math/log10.h | 19 ---
libclc/opencl/include/clc/opencl/math/log1p.h | 19 ---
libclc/opencl/include/clc/opencl/math/log2.h | 19 ---
libclc/opencl/include/clc/opencl/math/logb.h | 19 ---
libclc/opencl/include/clc/opencl/math/mad.h | 19 ---
.../opencl/include/clc/opencl/math/maxmag.h | 19 ---
.../opencl/include/clc/opencl/math/minmag.h | 19 ---
libclc/opencl/include/clc/opencl/math/modf.h | 18 ---
libclc/opencl/include/clc/opencl/math/nan.h | 15 --
libclc/opencl/include/clc/opencl/math/nan.inc | 9 --
.../include/clc/opencl/math/native_cos.h | 20 ---
.../include/clc/opencl/math/native_divide.h | 19 ---
.../include/clc/opencl/math/native_exp.h | 20 ---
.../include/clc/opencl/math/native_exp10.h | 20 ---
.../include/clc/opencl/math/native_exp2.h | 20 ---
.../include/clc/opencl/math/native_log.h | 20 ---
.../include/clc/opencl/math/native_log10.h | 20 ---
.../include/clc/opencl/math/native_log2.h | 20 ---
.../include/clc/opencl/math/native_powr.h | 19 ---
.../include/clc/opencl/math/native_recip.h | 20 ---
.../include/clc/opencl/math/native_rsqrt.h | 20 ---
.../include/clc/opencl/math/native_sin.h | 20 ---
.../include/clc/opencl/math/native_sqrt.h | 20 ---
.../include/clc/opencl/math/native_tan.h | 20 ---
.../include/clc/opencl/math/nextafter.h | 19 ---
libclc/opencl/include/clc/opencl/math/pow.h | 17 ---
libclc/opencl/include/clc/opencl/math/pown.h | 19 ---
libclc/opencl/include/clc/opencl/math/powr.h | 17 ---
.../include/clc/opencl/math/remainder.h | 17 ---
.../opencl/include/clc/opencl/math/remquo.h | 26 ----
libclc/opencl/include/clc/opencl/math/rint.h | 19 ---
libclc/opencl/include/clc/opencl/math/rootn.h | 19 ---
libclc/opencl/include/clc/opencl/math/round.h | 19 ---
libclc/opencl/include/clc/opencl/math/rsqrt.h | 19 ---
libclc/opencl/include/clc/opencl/math/sin.h | 19 ---
.../opencl/include/clc/opencl/math/sincos.h | 17 ---
libclc/opencl/include/clc/opencl/math/sinh.h | 19 ---
libclc/opencl/include/clc/opencl/math/sinpi.h | 19 ---
libclc/opencl/include/clc/opencl/math/sqrt.h | 19 ---
libclc/opencl/include/clc/opencl/math/tan.h | 19 ---
libclc/opencl/include/clc/opencl/math/tanh.h | 19 ---
libclc/opencl/include/clc/opencl/math/tanpi.h | 19 ---
.../opencl/include/clc/opencl/math/tgamma.h | 19 ---
libclc/opencl/include/clc/opencl/math/trunc.h | 19 ---
.../opencl/include/clc/opencl/misc/shuffle.h | 24 ----
.../opencl/include/clc/opencl/misc/shuffle2.h | 24 ----
.../include/clc/opencl/relational/all.h | 32 -----
.../include/clc/opencl/relational/any.h | 32 -----
.../include/clc/opencl/relational/bitselect.h | 19 ---
.../clc/opencl/relational/bitselect.inc | 11 --
.../include/clc/opencl/relational/isequal.h | 39 -----
.../include/clc/opencl/relational/isfinite.h | 21 ---
.../include/clc/opencl/relational/isgreater.h | 21 ---
.../clc/opencl/relational/isgreaterequal.h | 21 ---
.../include/clc/opencl/relational/isinf.h | 40 ------
.../include/clc/opencl/relational/isless.h | 21 ---
.../clc/opencl/relational/islessequal.h | 21 ---
.../clc/opencl/relational/islessgreater.h | 21 ---
.../include/clc/opencl/relational/isnan.h | 40 ------
.../include/clc/opencl/relational/isnormal.h | 21 ---
.../clc/opencl/relational/isnotequal.h | 21 ---
.../include/clc/opencl/relational/isordered.h | 21 ---
.../clc/opencl/relational/isunordered.h | 21 ---
.../include/clc/opencl/relational/select.h | 23 ---
.../include/clc/opencl/relational/signbit.h | 21 ---
.../opencl/include/clc/opencl/shared/clamp.h | 18 ---
.../include/clc/opencl/shared/clamp.inc | 17 ---
libclc/opencl/include/clc/opencl/shared/max.h | 18 ---
.../opencl/include/clc/opencl/shared/max.inc | 15 --
libclc/opencl/include/clc/opencl/shared/min.h | 18 ---
.../opencl/include/clc/opencl/shared/min.inc | 15 --
.../opencl/include/clc/opencl/shared/vload.h | 88 ------------
.../opencl/include/clc/opencl/shared/vstore.h | 91 ------------
.../clc/opencl/synchronization/barrier.h | 16 ---
.../clc/opencl/workitem/get_global_id.h | 16 ---
.../clc/opencl/workitem/get_global_offset.h | 16 ---
.../clc/opencl/workitem/get_global_size.h | 16 ---
.../clc/opencl/workitem/get_group_id.h | 16 ---
.../clc/opencl/workitem/get_local_id.h | 16 ---
.../clc/opencl/workitem/get_local_linear_id.h | 16 ---
.../clc/opencl/workitem/get_local_size.h | 16 ---
.../opencl/workitem/get_max_sub_group_size.h | 16 ---
.../clc/opencl/workitem/get_num_groups.h | 16 ---
.../clc/opencl/workitem/get_num_sub_groups.h | 16 ---
.../clc/opencl/workitem/get_sub_group_id.h | 16 ---
.../opencl/workitem/get_sub_group_local_id.h | 16 ---
.../clc/opencl/workitem/get_sub_group_size.h | 16 ---
.../clc/opencl/workitem/get_work_dim.h | 16 ---
.../amdgcn-amdhsa/workitem/get_global_size.cl | 2 +-
.../amdgcn-amdhsa/workitem/get_local_size.cl | 2 +-
.../amdgcn-amdhsa/workitem/get_num_groups.cl | 4 +-
libclc/opencl/lib/amdgcn/mem_fence/fence.cl | 1 -
.../lib/amdgcn/synchronization/barrier.cl | 1 -
.../lib/amdgcn/workitem/get_global_offset.cl | 1 -
.../lib/amdgcn/workitem/get_global_size.cl | 1 -
.../lib/amdgcn/workitem/get_group_id.cl | 1 -
.../lib/amdgcn/workitem/get_local_id.cl | 1 -
.../lib/amdgcn/workitem/get_local_size.cl | 2 +-
.../lib/amdgcn/workitem/get_num_groups.cl | 2 +-
.../lib/amdgcn/workitem/get_work_dim.cl | 1 -
libclc/opencl/lib/clspv/math/fma.cl | 1 -
libclc/opencl/lib/clspv/shared/vstore_half.cl | 8 +-
.../generic/async/async_work_group_copy.cl | 3 +-
.../async/async_work_group_strided_copy.cl | 4 +-
libclc/opencl/lib/generic/async/prefetch.cl | 1 -
.../lib/generic/async/wait_group_events.cl | 3 +-
libclc/opencl/lib/generic/atomic/atom_add.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_and.cl | 1 -
.../opencl/lib/generic/atomic/atom_cmpxchg.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_dec.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_inc.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_max.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_min.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_or.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_sub.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_xchg.cl | 1 -
libclc/opencl/lib/generic/atomic/atom_xor.cl | 1 -
.../opencl/lib/generic/atomic/atomic_add.cl | 1 -
.../opencl/lib/generic/atomic/atomic_and.cl | 1 -
.../lib/generic/atomic/atomic_cmpxchg.cl | 1 -
.../atomic/atomic_compare_exchange_strong.cl | 1 -
.../atomic/atomic_compare_exchange_weak.cl | 1 -
.../opencl/lib/generic/atomic/atomic_dec.cl | 1 -
.../lib/generic/atomic/atomic_exchange.cl | 1 -
.../lib/generic/atomic/atomic_fetch_add.cl | 1 -
.../lib/generic/atomic/atomic_fetch_and.cl | 1 -
.../lib/generic/atomic/atomic_fetch_max.cl | 1 -
.../lib/generic/atomic/atomic_fetch_min.cl | 1 -
.../lib/generic/atomic/atomic_fetch_or.cl | 1 -
.../lib/generic/atomic/atomic_fetch_sub.cl | 1 -
.../lib/generic/atomic/atomic_fetch_xor.cl | 1 -
.../lib/generic/atomic/atomic_flag_clear.cl | 1 -
.../atomic/atomic_flag_test_and_set.cl | 1 -
.../opencl/lib/generic/atomic/atomic_inc.cl | 1 -
.../opencl/lib/generic/atomic/atomic_init.cl | 1 -
.../opencl/lib/generic/atomic/atomic_load.cl | 1 -
.../opencl/lib/generic/atomic/atomic_max.cl | 1 -
.../opencl/lib/generic/atomic/atomic_min.cl | 1 -
libclc/opencl/lib/generic/atomic/atomic_or.cl | 1 -
.../opencl/lib/generic/atomic/atomic_store.cl | 1 -
.../opencl/lib/generic/atomic/atomic_sub.cl | 1 -
.../opencl/lib/generic/atomic/atomic_xchg.cl | 1 -
.../opencl/lib/generic/atomic/atomic_xor.cl | 1 -
libclc/opencl/lib/generic/common/degrees.cl | 1 -
libclc/opencl/lib/generic/common/mix.cl | 1 -
libclc/opencl/lib/generic/common/radians.cl | 1 -
libclc/opencl/lib/generic/common/sign.cl | 1 -
.../opencl/lib/generic/common/smoothstep.cl | 1 -
libclc/opencl/lib/generic/common/step.cl | 1 -
libclc/opencl/lib/generic/geometric/cross.cl | 1 -
.../opencl/lib/generic/geometric/distance.cl | 1 -
libclc/opencl/lib/generic/geometric/dot.cl | 1 -
.../lib/generic/geometric/fast_distance.cl | 1 -
.../lib/generic/geometric/fast_length.cl | 1 -
.../lib/generic/geometric/fast_normalize.cl | 1 -
libclc/opencl/lib/generic/geometric/length.cl | 1 -
.../opencl/lib/generic/geometric/normalize.cl | 1 -
libclc/opencl/lib/generic/integer/abs.cl | 1 -
libclc/opencl/lib/generic/integer/abs_diff.cl | 1 -
libclc/opencl/lib/generic/integer/add_sat.cl | 1 -
.../opencl/lib/generic/integer/bit_reverse.cl | 1 -
.../integer/bitfield_extract_signed.cl | 1 -
.../integer/bitfield_extract_unsigned.cl | 1 -
.../lib/generic/integer/bitfield_insert.cl | 1 -
libclc/opencl/lib/generic/integer/clz.cl | 1 -
libclc/opencl/lib/generic/integer/ctz.cl | 1 -
libclc/opencl/lib/generic/integer/hadd.cl | 1 -
libclc/opencl/lib/generic/integer/mad24.cl | 1 -
libclc/opencl/lib/generic/integer/mad_hi.cl | 1 -
libclc/opencl/lib/generic/integer/mad_sat.cl | 1 -
libclc/opencl/lib/generic/integer/mul24.cl | 1 -
libclc/opencl/lib/generic/integer/mul_hi.cl | 1 -
libclc/opencl/lib/generic/integer/popcount.cl | 1 -
libclc/opencl/lib/generic/integer/rhadd.cl | 1 -
libclc/opencl/lib/generic/integer/rotate.cl | 1 -
libclc/opencl/lib/generic/integer/sub_sat.cl | 1 -
libclc/opencl/lib/generic/integer/upsample.cl | 1 -
libclc/opencl/lib/generic/math/acos.cl | 1 -
libclc/opencl/lib/generic/math/acosh.cl | 1 -
libclc/opencl/lib/generic/math/acospi.cl | 1 -
libclc/opencl/lib/generic/math/asin.cl | 1 -
libclc/opencl/lib/generic/math/asinh.cl | 1 -
libclc/opencl/lib/generic/math/asinpi.cl | 1 -
libclc/opencl/lib/generic/math/atan.cl | 1 -
libclc/opencl/lib/generic/math/atan2.cl | 1 -
libclc/opencl/lib/generic/math/atan2pi.cl | 1 -
libclc/opencl/lib/generic/math/atanh.cl | 1 -
libclc/opencl/lib/generic/math/atanpi.cl | 1 -
libclc/opencl/lib/generic/math/cbrt.cl | 1 -
libclc/opencl/lib/generic/math/ceil.cl | 1 -
libclc/opencl/lib/generic/math/copysign.cl | 1 -
libclc/opencl/lib/generic/math/cos.cl | 1 -
libclc/opencl/lib/generic/math/cosh.cl | 1 -
libclc/opencl/lib/generic/math/cospi.cl | 1 -
libclc/opencl/lib/generic/math/erf.cl | 1 -
libclc/opencl/lib/generic/math/erfc.cl | 1 -
libclc/opencl/lib/generic/math/exp.cl | 1 -
libclc/opencl/lib/generic/math/exp10.cl | 1 -
libclc/opencl/lib/generic/math/exp2.cl | 1 -
libclc/opencl/lib/generic/math/expm1.cl | 1 -
libclc/opencl/lib/generic/math/fabs.cl | 1 -
libclc/opencl/lib/generic/math/fdim.cl | 1 -
libclc/opencl/lib/generic/math/floor.cl | 1 -
libclc/opencl/lib/generic/math/fma.cl | 1 -
libclc/opencl/lib/generic/math/fmax.cl | 1 -
libclc/opencl/lib/generic/math/fmin.cl | 1 -
libclc/opencl/lib/generic/math/fmod.cl | 1 -
libclc/opencl/lib/generic/math/fract.cl | 1 -
libclc/opencl/lib/generic/math/frexp.cl | 1 -
libclc/opencl/lib/generic/math/half_cos.cl | 1 -
libclc/opencl/lib/generic/math/half_divide.cl | 1 -
libclc/opencl/lib/generic/math/half_exp.cl | 1 -
libclc/opencl/lib/generic/math/half_exp10.cl | 1 -
libclc/opencl/lib/generic/math/half_exp2.cl | 1 -
libclc/opencl/lib/generic/math/half_log.cl | 1 -
libclc/opencl/lib/generic/math/half_log10.cl | 1 -
libclc/opencl/lib/generic/math/half_log2.cl | 1 -
libclc/opencl/lib/generic/math/half_powr.cl | 1 -
libclc/opencl/lib/generic/math/half_recip.cl | 1 -
libclc/opencl/lib/generic/math/half_rsqrt.cl | 1 -
libclc/opencl/lib/generic/math/half_sin.cl | 1 -
libclc/opencl/lib/generic/math/half_sqrt.cl | 1 -
libclc/opencl/lib/generic/math/half_tan.cl | 1 -
libclc/opencl/lib/generic/math/hypot.cl | 1 -
libclc/opencl/lib/generic/math/ilogb.cl | 1 -
libclc/opencl/lib/generic/math/ldexp.cl | 1 -
libclc/opencl/lib/generic/math/lgamma.cl | 1 -
libclc/opencl/lib/generic/math/lgamma_r.cl | 1 -
libclc/opencl/lib/generic/math/log.cl | 1 -
libclc/opencl/lib/generic/math/log10.cl | 1 -
libclc/opencl/lib/generic/math/log1p.cl | 1 -
libclc/opencl/lib/generic/math/log2.cl | 1 -
libclc/opencl/lib/generic/math/logb.cl | 1 -
libclc/opencl/lib/generic/math/mad.cl | 1 -
libclc/opencl/lib/generic/math/maxmag.cl | 1 -
libclc/opencl/lib/generic/math/minmag.cl | 1 -
libclc/opencl/lib/generic/math/modf.cl | 1 -
libclc/opencl/lib/generic/math/native_cos.cl | 1 -
.../opencl/lib/generic/math/native_divide.cl | 1 -
libclc/opencl/lib/generic/math/native_exp.cl | 1 -
.../opencl/lib/generic/math/native_exp10.cl | 1 -
libclc/opencl/lib/generic/math/native_exp2.cl | 1 -
libclc/opencl/lib/generic/math/native_log.cl | 1 -
.../opencl/lib/generic/math/native_log10.cl | 1 -
libclc/opencl/lib/generic/math/native_log2.cl | 1 -
libclc/opencl/lib/generic/math/native_powr.cl | 1 -
.../opencl/lib/generic/math/native_recip.cl | 1 -
.../opencl/lib/generic/math/native_rsqrt.cl | 1 -
libclc/opencl/lib/generic/math/native_sin.cl | 1 -
libclc/opencl/lib/generic/math/native_sqrt.cl | 1 -
libclc/opencl/lib/generic/math/native_tan.cl | 1 -
libclc/opencl/lib/generic/math/nextafter.cl | 1 -
libclc/opencl/lib/generic/math/pow.cl | 1 -
libclc/opencl/lib/generic/math/pown.cl | 1 -
libclc/opencl/lib/generic/math/powr.cl | 1 -
libclc/opencl/lib/generic/math/remainder.cl | 1 -
libclc/opencl/lib/generic/math/remquo.cl | 1 -
libclc/opencl/lib/generic/math/rint.cl | 1 -
libclc/opencl/lib/generic/math/rootn.cl | 1 -
libclc/opencl/lib/generic/math/round.cl | 1 -
libclc/opencl/lib/generic/math/rsqrt.cl | 1 -
libclc/opencl/lib/generic/math/sin.cl | 1 -
libclc/opencl/lib/generic/math/sincos.cl | 1 -
libclc/opencl/lib/generic/math/sinh.cl | 1 -
libclc/opencl/lib/generic/math/sinpi.cl | 1 -
libclc/opencl/lib/generic/math/sqrt.cl | 1 -
libclc/opencl/lib/generic/math/tan.cl | 1 -
libclc/opencl/lib/generic/math/tanh.cl | 1 -
libclc/opencl/lib/generic/math/tanpi.cl | 1 -
libclc/opencl/lib/generic/math/tgamma.cl | 1 -
libclc/opencl/lib/generic/math/trunc.cl | 1 -
libclc/opencl/lib/generic/misc/shuffle.cl | 1 -
libclc/opencl/lib/generic/misc/shuffle2.cl | 1 -
libclc/opencl/lib/generic/relational/all.cl | 1 -
libclc/opencl/lib/generic/relational/any.cl | 1 -
.../lib/generic/relational/bitselect.cl | 1 -
.../opencl/lib/generic/relational/isequal.cl | 1 -
.../opencl/lib/generic/relational/isfinite.cl | 1 -
.../lib/generic/relational/isgreater.cl | 1 -
.../lib/generic/relational/isgreaterequal.cl | 1 -
libclc/opencl/lib/generic/relational/isinf.cl | 1 -
.../opencl/lib/generic/relational/isless.cl | 1 -
.../lib/generic/relational/islessequal.cl | 1 -
.../lib/generic/relational/islessgreater.cl | 1 -
libclc/opencl/lib/generic/relational/isnan.cl | 1 -
.../opencl/lib/generic/relational/isnormal.cl | 1 -
.../lib/generic/relational/isnotequal.cl | 1 -
.../lib/generic/relational/isordered.cl | 1 -
.../lib/generic/relational/isunordered.cl | 1 -
.../opencl/lib/generic/relational/select.cl | 1 -
.../opencl/lib/generic/relational/signbit.cl | 1 -
libclc/opencl/lib/generic/shared/clamp.cl | 1 -
libclc/opencl/lib/generic/shared/max.cl | 1 -
libclc/opencl/lib/generic/shared/min.cl | 1 -
libclc/opencl/lib/generic/shared/vload.cl | 1 -
libclc/opencl/lib/generic/shared/vstore.cl | 1 -
.../lib/generic/workitem/get_global_id.cl | 6 +-
.../lib/generic/workitem/get_global_size.cl | 4 +-
.../lib/ptx-nvidiacl/mem_fence/fence.cl | 1 -
.../ptx-nvidiacl/synchronization/barrier.cl | 1 -
.../ptx-nvidiacl/workitem/get_global_id.cl | 1 -
.../lib/ptx-nvidiacl/workitem/get_group_id.cl | 1 -
.../lib/ptx-nvidiacl/workitem/get_local_id.cl | 1 -
.../workitem/get_local_linear_id.cl | 1 -
.../ptx-nvidiacl/workitem/get_local_size.cl | 1 -
.../workitem/get_max_sub_group_size.cl | 1 -
.../ptx-nvidiacl/workitem/get_num_groups.cl | 1 -
.../workitem/get_num_sub_groups.cl | 1 -
.../ptx-nvidiacl/workitem/get_sub_group_id.cl | 1 -
.../workitem/get_sub_group_local_id.cl | 1 -
.../workitem/get_sub_group_size.cl | 1 -
.../r600/image/get_image_channel_data_type.cl | 2 +-
.../lib/r600/image/get_image_channel_order.cl | 2 +-
.../opencl/lib/r600/image/get_image_depth.cl | 2 +-
libclc/opencl/lib/r600/image/get_image_dim.cl | 2 +-
.../opencl/lib/r600/image/get_image_height.cl | 2 +-
.../opencl/lib/r600/image/get_image_width.cl | 2 +-
libclc/opencl/lib/r600/image/read_imagef.cl | 2 +-
libclc/opencl/lib/r600/image/read_imagei.cl | 2 +-
libclc/opencl/lib/r600/image/read_imageui.cl | 2 +-
libclc/opencl/lib/r600/image/write_imagef.cl | 2 +-
libclc/opencl/lib/r600/image/write_imagei.cl | 2 +-
libclc/opencl/lib/r600/image/write_imageui.cl | 2 +-
.../lib/r600/synchronization/barrier.cl | 2 +-
.../lib/r600/workitem/get_global_offset.cl | 2 +-
.../lib/r600/workitem/get_global_size.cl | 2 +-
.../opencl/lib/r600/workitem/get_group_id.cl | 2 +-
.../opencl/lib/r600/workitem/get_local_id.cl | 2 +-
.../lib/r600/workitem/get_local_size.cl | 2 +-
.../lib/r600/workitem/get_num_groups.cl | 2 +-
.../opencl/lib/r600/workitem/get_work_dim.cl | 2 +-
libclc/opencl/lib/spirv/math/fma.cl | 1 -
476 files changed, 31 insertions(+), 5389 deletions(-)
delete mode 100644 libclc/opencl/include/clc/opencl/async/async_work_group_copy.h
delete mode 100644 libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc
delete mode 100644 libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h
delete mode 100644 libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc
delete mode 100644 libclc/opencl/include/clc/opencl/async/prefetch.h
delete mode 100644 libclc/opencl/include/clc/opencl/async/prefetch.inc
delete mode 100644 libclc/opencl/include/clc/opencl/async/wait_group_events.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_add.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_and.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_dec.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_inc.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_max.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_min.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_or.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_sub.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_xchg.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_xor.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_add.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_and.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_strong.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_weak.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_dec.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_decl_legacy.inc
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_exchange.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_add.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_and.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_max.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_min.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_or.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_sub.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_xor.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_flag_clear.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_flag_test_and_set.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_inc.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_init.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_init.inc
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_load.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_max.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_min.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_or.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_store.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_sub.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h
delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_xor.h
delete mode 100644 libclc/opencl/include/clc/opencl/common/degrees.h
delete mode 100644 libclc/opencl/include/clc/opencl/common/mix.h
delete mode 100644 libclc/opencl/include/clc/opencl/common/mix.inc
delete mode 100644 libclc/opencl/include/clc/opencl/common/radians.h
delete mode 100644 libclc/opencl/include/clc/opencl/common/sign.h
delete mode 100644 libclc/opencl/include/clc/opencl/common/smoothstep.h
delete mode 100644 libclc/opencl/include/clc/opencl/common/smoothstep.inc
delete mode 100644 libclc/opencl/include/clc/opencl/common/step.h
delete mode 100644 libclc/opencl/include/clc/opencl/common/step.inc
delete mode 100644 libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h
delete mode 100644 libclc/opencl/include/clc/opencl/geometric/cross.h
delete mode 100644 libclc/opencl/include/clc/opencl/geometric/distance.h
delete mode 100644 libclc/opencl/include/clc/opencl/geometric/dot.h
delete mode 100644 libclc/opencl/include/clc/opencl/geometric/fast_distance.h
delete mode 100644 libclc/opencl/include/clc/opencl/geometric/fast_length.h
delete mode 100644 libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
delete mode 100644 libclc/opencl/include/clc/opencl/geometric/length.h
delete mode 100644 libclc/opencl/include/clc/opencl/geometric/normalize.h
delete mode 100644 libclc/opencl/include/clc/opencl/image/image.h
delete mode 100644 libclc/opencl/include/clc/opencl/image/image_defines.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/abs.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/abs.inc
delete mode 100644 libclc/opencl/include/clc/opencl/integer/abs_diff.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/abs_diff.inc
delete mode 100644 libclc/opencl/include/clc/opencl/integer/add_sat.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/bit_reverse.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/bitfield_extract_signed.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/bitfield_extract_unsigned.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/bitfield_insert.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/clz.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/ctz.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/hadd.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/mad24.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/mad_hi.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/mad_sat.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/mul24.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/mul_hi.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/popcount.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/rhadd.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/rotate.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/sub_sat.h
delete mode 100644 libclc/opencl/include/clc/opencl/integer/upsample.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/acos.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/acosh.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/acospi.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/asin.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/asinh.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/asinpi.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/atan.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/atan2.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/atan2pi.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/atanh.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/atanpi.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/cbrt.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/ceil.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/copysign.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/cos.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/cosh.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/cospi.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/erf.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/erfc.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/exp.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/exp10.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/exp2.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/expm1.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/fabs.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/fdim.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/floor.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/fma.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/fmax.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/fmin.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/fmod.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/fract.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/frexp.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_cos.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_divide.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_exp.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_exp10.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_exp2.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_log.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_log10.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_log2.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_powr.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_recip.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_rsqrt.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_sin.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_sqrt.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/half_tan.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/hypot.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/ilogb.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/ldexp.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/ldexp.inc
delete mode 100644 libclc/opencl/include/clc/opencl/math/lgamma.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/lgamma_r.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/log.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/log10.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/log1p.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/log2.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/logb.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/mad.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/maxmag.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/minmag.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/modf.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/nan.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/nan.inc
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_cos.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_divide.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_exp.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_exp10.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_exp2.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_log.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_log10.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_log2.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_powr.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_recip.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_rsqrt.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_sin.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_sqrt.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/native_tan.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/nextafter.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/pow.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/pown.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/powr.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/remainder.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/remquo.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/rint.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/rootn.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/round.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/rsqrt.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/sin.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/sincos.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/sinh.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/sinpi.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/sqrt.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/tan.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/tanh.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/tanpi.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/tgamma.h
delete mode 100644 libclc/opencl/include/clc/opencl/math/trunc.h
delete mode 100644 libclc/opencl/include/clc/opencl/misc/shuffle.h
delete mode 100644 libclc/opencl/include/clc/opencl/misc/shuffle2.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/all.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/any.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/bitselect.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/bitselect.inc
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isequal.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isfinite.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isgreater.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isinf.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isless.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/islessequal.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/islessgreater.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isnan.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isnormal.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isnotequal.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isordered.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/isunordered.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/select.h
delete mode 100644 libclc/opencl/include/clc/opencl/relational/signbit.h
delete mode 100644 libclc/opencl/include/clc/opencl/shared/clamp.h
delete mode 100644 libclc/opencl/include/clc/opencl/shared/clamp.inc
delete mode 100644 libclc/opencl/include/clc/opencl/shared/max.h
delete mode 100644 libclc/opencl/include/clc/opencl/shared/max.inc
delete mode 100644 libclc/opencl/include/clc/opencl/shared/min.h
delete mode 100644 libclc/opencl/include/clc/opencl/shared/min.inc
delete mode 100644 libclc/opencl/include/clc/opencl/shared/vload.h
delete mode 100644 libclc/opencl/include/clc/opencl/shared/vstore.h
delete mode 100644 libclc/opencl/include/clc/opencl/synchronization/barrier.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_global_id.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_global_offset.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_global_size.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_group_id.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_local_id.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_local_linear_id.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_local_size.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_max_sub_group_size.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_num_groups.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_num_sub_groups.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_sub_group_id.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_sub_group_local_id.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_sub_group_size.h
delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_work_dim.h
diff --git a/libclc/opencl/include/clc/opencl/async/async_work_group_copy.h b/libclc/opencl/include/clc/opencl/async/async_work_group_copy.h
deleted file mode 100644
index 1bd16a411554a..0000000000000
--- a/libclc/opencl/include/clc/opencl/async/async_work_group_copy.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ASYNC_ASYNC_WORK_GROUP_COPY_H__
-#define __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_COPY_H__
-
-#define __CLC_DST_ADDR_SPACE local
-#define __CLC_SRC_ADDR_SPACE global
-#define __CLC_BODY <clc/opencl/async/async_work_group_copy.inc>
-#include <clc/integer/gentype.inc>
-#define __CLC_BODY <clc/opencl/async/async_work_group_copy.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_DST_ADDR_SPACE
-#undef __CLC_SRC_ADDR_SPACE
-
-#define __CLC_DST_ADDR_SPACE global
-#define __CLC_SRC_ADDR_SPACE local
-#define __CLC_BODY <clc/opencl/async/async_work_group_copy.inc>
-#include <clc/integer/gentype.inc>
-#define __CLC_BODY <clc/opencl/async/async_work_group_copy.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_DST_ADDR_SPACE
-#undef __CLC_SRC_ADDR_SPACE
-
-#endif // __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_COPY_H__
diff --git a/libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc b/libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc
deleted file mode 100644
index cc4174970cb25..0000000000000
--- a/libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_DECL event_t
-async_work_group_copy(__CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst,
- const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src,
- size_t num_gentypes, event_t event);
diff --git a/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h b/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h
deleted file mode 100644
index 5929ce73a9317..0000000000000
--- a/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__
-#define __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__
-
-#define __CLC_DST_ADDR_SPACE local
-#define __CLC_SRC_ADDR_SPACE global
-#define __CLC_BODY <clc/opencl/async/async_work_group_strided_copy.inc>
-#include <clc/integer/gentype.inc>
-#define __CLC_BODY <clc/opencl/async/async_work_group_strided_copy.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_DST_ADDR_SPACE
-#undef __CLC_SRC_ADDR_SPACE
-
-#define __CLC_DST_ADDR_SPACE global
-#define __CLC_SRC_ADDR_SPACE local
-#define __CLC_BODY <clc/opencl/async/async_work_group_strided_copy.inc>
-#include <clc/integer/gentype.inc>
-#define __CLC_BODY <clc/opencl/async/async_work_group_strided_copy.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_DST_ADDR_SPACE
-#undef __CLC_SRC_ADDR_SPACE
-
-#endif // __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__
diff --git a/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc b/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc
deleted file mode 100644
index 9df894e4fa29e..0000000000000
--- a/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_DECL event_t async_work_group_strided_copy(
- __CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst,
- const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src, size_t num_gentypes,
- size_t stride, event_t event);
diff --git a/libclc/opencl/include/clc/opencl/async/prefetch.h b/libclc/opencl/include/clc/opencl/async/prefetch.h
deleted file mode 100644
index 1ba4414d9eb10..0000000000000
--- a/libclc/opencl/include/clc/opencl/async/prefetch.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ASYNC_PREFETCH_H__
-#define __CLC_OPENCL_ASYNC_PREFETCH_H__
-
-#define __CLC_BODY <clc/opencl/async/prefetch.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/async/prefetch.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_ASYNC_PREFETCH_H__
diff --git a/libclc/opencl/include/clc/opencl/async/prefetch.inc b/libclc/opencl/include/clc/opencl/async/prefetch.inc
deleted file mode 100644
index 4a78778fa7604..0000000000000
--- a/libclc/opencl/include/clc/opencl/async/prefetch.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_DECL void prefetch(const global __CLC_GENTYPE *p,
- size_t num_gentypes);
diff --git a/libclc/opencl/include/clc/opencl/async/wait_group_events.h b/libclc/opencl/include/clc/opencl/async/wait_group_events.h
deleted file mode 100644
index d3ace9c34a25d..0000000000000
--- a/libclc/opencl/include/clc/opencl/async/wait_group_events.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ASYNC_WAIT_GROUP_EVENTS_H__
-#define __CLC_OPENCL_ASYNC_WAIT_GROUP_EVENTS_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_DECL _CLC_OVERLOAD void wait_group_events(int num_events,
- event_t *event_list);
-
-#endif // __CLC_OPENCL_ASYNC_WAIT_GROUP_EVENTS_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_add.h b/libclc/opencl/include/clc/opencl/atomic/atom_add.h
deleted file mode 100644
index b26a2a5361b6f..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_add.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_ADD_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_ADD_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#ifdef cl_khr_global_int32_base_atomics
-#define __CLC_FUNCTION atom_add
-#define __CLC_ADDRESS_SPACE global
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_global_int32_base_atomics
-
-#ifdef cl_khr_local_int32_base_atomics
-#define __CLC_FUNCTION atom_add
-#define __CLC_ADDRESS_SPACE local
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_local_int32_base_atomics
-
-#ifdef cl_khr_int64_base_atomics
-#define __CLC_FUNCTION atom_add
-#include <clc/opencl/atomic/atom_decl_int64.inc>
-#endif // cl_khr_int64_base_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_ADD_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_and.h b/libclc/opencl/include/clc/opencl/atomic/atom_and.h
deleted file mode 100644
index eacbd7a33b6ee..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_and.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_AND_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_AND_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_and
-#define __CLC_ADDRESS_SPACE global
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_global_int32_extended_atomics
-
-#ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_and
-#define __CLC_ADDRESS_SPACE local
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_local_int32_extended_atomics
-
-#ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_and
-#include <clc/opencl/atomic/atom_decl_int64.inc>
-#endif // cl_khr_int64_extended_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_AND_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h b/libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h
deleted file mode 100644
index 83ee99f414241..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_CMPXCHG_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_CMPXCHG_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#include <clc/clcfunc.h>
-#include <clc/clctypes.h>
-
-#ifdef cl_khr_global_int32_base_atomics
-_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(volatile global int *p, int cmp,
- int val);
-_CLC_OVERLOAD _CLC_DECL unsigned int
-atom_cmpxchg(volatile global unsigned int *p, unsigned int cmp,
- unsigned int val);
-#endif // cl_khr_global_int32_base_atomics
-
-#ifdef cl_khr_local_int32_base_atomics
-_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(volatile local int *p, int cmp,
- int val);
-_CLC_OVERLOAD _CLC_DECL unsigned int
-atom_cmpxchg(volatile local unsigned int *p, unsigned int cmp,
- unsigned int val);
-#endif // cl_khr_local_int32_base_atomics
-
-#ifdef cl_khr_int64_base_atomics
-_CLC_OVERLOAD _CLC_DECL long atom_cmpxchg(volatile global long *p, long cmp,
- long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long
-atom_cmpxchg(volatile global unsigned long *p, unsigned long cmp,
- unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_cmpxchg(volatile local long *p, long cmp,
- long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long
-atom_cmpxchg(volatile local unsigned long *p, unsigned long cmp,
- unsigned long val);
-#endif // cl_khr_int64_base_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_CMPXCHG_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_dec.h b/libclc/opencl/include/clc/opencl/atomic/atom_dec.h
deleted file mode 100644
index f57d9c6afca5d..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_dec.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_DEC_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_DEC_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#include <clc/clcfunc.h>
-#include <clc/clctypes.h>
-
-#ifdef cl_khr_global_int32_base_atomics
-_CLC_OVERLOAD _CLC_DECL int atom_dec(volatile global int *p);
-_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec(volatile global unsigned int *p);
-#endif // cl_khr_global_int32_base_atomics
-
-#ifdef cl_khr_local_int32_base_atomics
-_CLC_OVERLOAD _CLC_DECL int atom_dec(volatile local int *p);
-_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec(volatile local unsigned int *p);
-#endif // cl_khr_local_int32_base_atomics
-
-#ifdef cl_khr_int64_base_atomics
-_CLC_OVERLOAD _CLC_DECL long atom_dec(volatile global long *p);
-_CLC_OVERLOAD _CLC_DECL unsigned long
-atom_dec(volatile global unsigned long *p);
-_CLC_OVERLOAD _CLC_DECL long atom_dec(volatile local long *p);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_dec(volatile local unsigned long *p);
-#endif // cl_khr_int64_base_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_DEC_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc
deleted file mode 100644
index 8a0ec9481c595..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#define __CLC_DECLARE_ATOM(ADDRSPACE, TYPE) \
- _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE);
-
-__CLC_DECLARE_ATOM(__CLC_ADDRESS_SPACE, int)
-__CLC_DECLARE_ATOM(__CLC_ADDRESS_SPACE, uint)
-
-#undef __CLC_DECLARE_ATOM
-
-#undef __CLC_FUNCTION
-#undef __CLC_ADDRESS_SPACE
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc
deleted file mode 100644
index 45489df0609ca..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#define __CLC_DECLARE_ATOM(ADDRSPACE, TYPE) \
- _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE);
-
-__CLC_DECLARE_ATOM(local, long)
-__CLC_DECLARE_ATOM(local, ulong)
-__CLC_DECLARE_ATOM(global, long)
-__CLC_DECLARE_ATOM(global, ulong)
-
-#undef __CLC_DECLARE_ATOM
-
-#undef __CLC_FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_inc.h b/libclc/opencl/include/clc/opencl/atomic/atom_inc.h
deleted file mode 100644
index 96d3faa593fc9..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_inc.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_INC_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_INC_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#include <clc/clcfunc.h>
-#include <clc/clctypes.h>
-
-#ifdef cl_khr_global_int32_base_atomics
-_CLC_OVERLOAD _CLC_DECL int atom_inc(volatile global int *p);
-_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc(volatile global unsigned int *p);
-#endif // cl_khr_global_int32_base_atomics
-
-#ifdef cl_khr_local_int32_base_atomics
-_CLC_OVERLOAD _CLC_DECL int atom_inc(volatile local int *p);
-_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc(volatile local unsigned int *p);
-#endif // cl_khr_local_int32_base_atomics
-
-#ifdef cl_khr_int64_base_atomics
-_CLC_OVERLOAD _CLC_DECL long atom_inc(volatile global long *p);
-_CLC_OVERLOAD _CLC_DECL unsigned long
-atom_inc(volatile global unsigned long *p);
-_CLC_OVERLOAD _CLC_DECL long atom_inc(volatile local long *p);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_inc(volatile local unsigned long *p);
-#endif // cl_khr_int64_base_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_INC_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_max.h b/libclc/opencl/include/clc/opencl/atomic/atom_max.h
deleted file mode 100644
index 35a1e2aa06d48..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_max.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_MAX_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_MAX_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_max
-#define __CLC_ADDRESS_SPACE global
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_global_int32_extended_atomics
-
-#ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_max
-#define __CLC_ADDRESS_SPACE local
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_local_int32_extended_atomics
-
-#ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_max
-#include <clc/opencl/atomic/atom_decl_int64.inc>
-#endif // cl_khr_int64_extended_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_MAX_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_min.h b/libclc/opencl/include/clc/opencl/atomic/atom_min.h
deleted file mode 100644
index ded96a5b29a48..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_min.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_MIN_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_MIN_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_min
-#define __CLC_ADDRESS_SPACE global
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_global_int32_extended_atomics
-
-#ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_min
-#define __CLC_ADDRESS_SPACE local
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_local_int32_extended_atomics
-
-#ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_min
-#include <clc/opencl/atomic/atom_decl_int64.inc>
-#endif // cl_khr_int64_extended_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_MIN_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_or.h b/libclc/opencl/include/clc/opencl/atomic/atom_or.h
deleted file mode 100644
index 42a69bd3f7b46..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_or.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_OR_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_OR_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_or
-#define __CLC_ADDRESS_SPACE global
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_global_int32_extended_atomics
-
-#ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_or
-#define __CLC_ADDRESS_SPACE local
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_local_int32_extended_atomics
-
-#ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_or
-#include <clc/opencl/atomic/atom_decl_int64.inc>
-#endif // cl_khr_int64_extended_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_OR_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_sub.h b/libclc/opencl/include/clc/opencl/atomic/atom_sub.h
deleted file mode 100644
index 9763ee6033410..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_sub.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_SUB_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_SUB_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#ifdef cl_khr_global_int32_base_atomics
-#define __CLC_FUNCTION atom_sub
-#define __CLC_ADDRESS_SPACE global
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_global_int32_base_atomics
-
-#ifdef cl_khr_local_int32_base_atomics
-#define __CLC_FUNCTION atom_sub
-#define __CLC_ADDRESS_SPACE local
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_local_int32_base_atomics
-
-#ifdef cl_khr_int64_base_atomics
-#define __CLC_FUNCTION atom_sub
-#include <clc/opencl/atomic/atom_decl_int64.inc>
-#endif // cl_khr_int64_base_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_SUB_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h b/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h
deleted file mode 100644
index ab2c5b5156d68..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_XCHG_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_XCHG_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#ifdef cl_khr_global_int32_base_atomics
-#define __CLC_FUNCTION atom_xchg
-#define __CLC_ADDRESS_SPACE global
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_global_int32_base_atomics
-
-#ifdef cl_khr_local_int32_base_atomics
-#define __CLC_FUNCTION atom_xchg
-#define __CLC_ADDRESS_SPACE local
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_local_int32_base_atomics
-
-#ifdef cl_khr_int64_base_atomics
-#define __CLC_FUNCTION atom_xchg
-#include <clc/opencl/atomic/atom_decl_int64.inc>
-#endif // cl_khr_int64_base_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_XCHG_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_xor.h b/libclc/opencl/include/clc/opencl/atomic/atom_xor.h
deleted file mode 100644
index b33168db72cf0..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atom_xor.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOM_XOR_H__
-#define __CLC_OPENCL_ATOMIC_ATOM_XOR_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_xor
-#define __CLC_ADDRESS_SPACE global
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_global_int32_extended_atomics
-
-#ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_xor
-#define __CLC_ADDRESS_SPACE local
-#include <clc/opencl/atomic/atom_decl_int32.inc>
-#endif // cl_khr_local_int32_extended_atomics
-
-#ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_xor
-#include <clc/opencl/atomic/atom_decl_int64.inc>
-#endif // cl_khr_int64_extended_atomics
-
-#endif // __CLC_OPENCL_ATOMIC_ATOM_XOR_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_add.h b/libclc/opencl/include/clc/opencl/atomic/atomic_add.h
deleted file mode 100644
index edb13bd6bde49..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_add.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_ADD_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_ADD_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_add
-#include <clc/opencl/atomic/atomic_decl_legacy.inc>
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_ADD_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_and.h b/libclc/opencl/include/clc/opencl/atomic/atomic_and.h
deleted file mode 100644
index 4875f5374c692..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_and.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_AND_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_AND_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_and
-#include <clc/opencl/atomic/atomic_decl_legacy.inc>
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_AND_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h b/libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h
deleted file mode 100644
index f784984299344..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_CMPXCHG_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_CMPXCHG_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg(volatile local int *, int, int);
-_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg(volatile global int *, int, int);
-_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg(volatile local uint *, uint, uint);
-_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg(volatile global uint *, uint, uint);
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_CMPXCHG_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_strong.h b/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_strong.h
deleted file mode 100644
index cae033b17173a..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_strong.h
+++ /dev/null
@@ -1,26 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_COMPARE_EXCHANGE_STRONG_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_STRONG_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_compare_exchange_strong
-#define __CLC_COMPARE_EXCHANGE
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_COMPARE_EXCHANGE
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_STRONG_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_weak.h b/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_weak.h
deleted file mode 100644
index e8d9f8728bc6a..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_weak.h
+++ /dev/null
@@ -1,26 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_COMPARE_EXCHANGE_WEAK_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_WEAK_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_compare_exchange_weak
-#define __CLC_COMPARE_EXCHANGE
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_COMPARE_EXCHANGE
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_WEAK_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h b/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h
deleted file mode 100644
index 253a64f491fb4..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_DEC_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_DEC_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_DECL int atomic_dec(volatile local int *);
-_CLC_OVERLOAD _CLC_DECL int atomic_dec(volatile global int *);
-_CLC_OVERLOAD _CLC_DECL uint atomic_dec(volatile local uint *);
-_CLC_OVERLOAD _CLC_DECL uint atomic_dec(volatile global uint *);
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_DEC_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc b/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc
deleted file mode 100644
index a36e68bca86a2..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc
+++ /dev/null
@@ -1,134 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#ifdef __CLC_SCALAR
-
-#if defined(__opencl_c_fp64) && (defined(cl_khr_int64_base_atomics) && \
- defined(cl_khr_int64_extended_atomics))
-#define __CLC_HAVE_64_ATOMIC
-#endif
-#if defined(__CLC_FPSIZE) && \
- (__CLC_FPSIZE < 64 || defined(__CLC_HAVE_64_ATOMIC))
-#define __CLC_HAVE_FP_ATOMIC
-#endif
-#if defined(__CLC_GENSIZE) && \
- ((__CLC_GENSIZE == 32) || \
- (__CLC_GENSIZE == 64 && defined(__CLC_HAVE_64_ATOMIC)))
-#define __CLC_HAVE_INT_ATOMIC
-#endif
-#if defined(__CLC_HAVE_FP_ATOMIC) || defined(__CLC_HAVE_INT_ATOMIC)
-
-#define __CLC_ATOMIC_GENTYPE __CLC_XCONCAT(atomic_, __CLC_GENTYPE)
-
-#define __CLC_FUNCTION_EXPLICIT __CLC_XCONCAT(__CLC_FUNCTION, _explicit)
-
-#ifdef __CLC_NO_VALUE_ARG
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION_EXPLICIT( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, memory_order Order, \
- memory_scope Scope);
-#elif defined(__CLC_RETURN_VOID)
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL void __CLC_FUNCTION_EXPLICIT( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value, \
- memory_order Order, memory_scope Scope);
-#elif defined(__CLC_COMPARE_EXCHANGE)
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL bool __CLC_FUNCTION_EXPLICIT( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, \
- ADDRSPACE __CLC_GENTYPE *Expected, __CLC_GENTYPE Desired, \
- memory_order Order, memory_scope Scope);
-#else
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION_EXPLICIT( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value, \
- memory_order Order, memory_scope Scope);
-#endif
-
-__CLC_DECL_ATOMIC(global)
-__CLC_DECL_ATOMIC(local)
-#if _CLC_GENERIC_AS_SUPPORTED
-__CLC_DECL_ATOMIC()
-#endif
-
-#undef __CLC_DECL_ATOMIC
-
-#if defined(__opencl_c_atomic_scope_device)
-
-#ifdef __CLC_NO_VALUE_ARG
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION_EXPLICIT( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, memory_order Order);
-#elif defined(__CLC_RETURN_VOID)
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL void __CLC_FUNCTION_EXPLICIT( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value, \
- memory_order Order);
-#elif defined(__CLC_COMPARE_EXCHANGE)
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL bool __CLC_FUNCTION_EXPLICIT( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, \
- ADDRSPACE __CLC_GENTYPE *Expected, __CLC_GENTYPE Desired, \
- memory_order Success, memory_order Failure);
-#else
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION_EXPLICIT( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value, \
- memory_order Order);
-#endif
-
-__CLC_DECL_ATOMIC(global)
-__CLC_DECL_ATOMIC(local)
-#if _CLC_GENERIC_AS_SUPPORTED
-__CLC_DECL_ATOMIC()
-#endif
-
-#undef __CLC_DECL_ATOMIC
-
-#endif // defined(__opencl_c_atomic_scope_device)
-
-#if defined(__opencl_c_atomic_order_seq_cst) && \
- defined(__opencl_c_atomic_scope_device)
-
-#ifdef __CLC_NO_VALUE_ARG
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr);
-#elif defined(__CLC_RETURN_VOID)
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL void __CLC_FUNCTION( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value);
-#elif defined(__CLC_COMPARE_EXCHANGE)
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL bool __CLC_FUNCTION( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, \
- ADDRSPACE __CLC_GENTYPE *Expected, __CLC_GENTYPE Desired);
-#else
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value);
-#endif
-
-__CLC_DECL_ATOMIC(global)
-__CLC_DECL_ATOMIC(local)
-#if _CLC_GENERIC_AS_SUPPORTED
-__CLC_DECL_ATOMIC()
-#endif
-
-#undef __CLC_DECL_ATOMIC
-
-#endif // defined(__opencl_c_atomic_order_seq_cst) &&
- // defined(__opencl_c_atomic_scope_device)
-
-#endif // __CLC_HAVE_FP_ATOMIC || __CLC_HAVE_INT_ATOMIC
-
-#undef __CLC_HAVE_INT_ATOMIC
-#undef __CLC_HAVE_FP_ATOMIC
-#undef __CLC_HAVE_64_ATOMIC
-
-#endif // __CLC_SCALAR
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_decl_legacy.inc b/libclc/opencl/include/clc/opencl/atomic/atomic_decl_legacy.inc
deleted file mode 100644
index 0cfd4c3eab5f6..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_decl_legacy.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#define __CLC_DECLARE_ATOMIC(ADDRSPACE, TYPE) \
- _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE);
-
-#define __CLC_DECLARE_ATOMIC_ADDRSPACE(TYPE) \
- __CLC_DECLARE_ATOMIC(global, TYPE) \
- __CLC_DECLARE_ATOMIC(local, TYPE)
-
-__CLC_DECLARE_ATOMIC_ADDRSPACE(int)
-__CLC_DECLARE_ATOMIC_ADDRSPACE(uint)
-
-#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
-#undef __CLC_DECLARE_ATOMIC
-
-#undef __CLC_FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_exchange.h b/libclc/opencl/include/clc/opencl/atomic/atomic_exchange.h
deleted file mode 100644
index 117355c216cc0..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_exchange.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_EXCHANGE_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_EXCHANGE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_exchange
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_EXCHANGE_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_add.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_add.h
deleted file mode 100644
index bca0831d3063b..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_add.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FETCH_ADD_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_ADD_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_fetch_add
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_ADD_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_and.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_and.h
deleted file mode 100644
index 32919bf5ebe25..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_and.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FETCH_AND_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_AND_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_fetch_and
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_AND_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_max.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_max.h
deleted file mode 100644
index b6df519dcd016..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_max.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FETCH_MAX_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_MAX_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_fetch_max
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_MAX_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_min.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_min.h
deleted file mode 100644
index fde0162427e43..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_min.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FETCH_MIN_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_MIN_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_fetch_min
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_MIN_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_or.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_or.h
deleted file mode 100644
index 10ed38ec660e5..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_or.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FETCH_OR_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_OR_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_fetch_or
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_OR_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_sub.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_sub.h
deleted file mode 100644
index afd56a62e990a..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_sub.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FETCH_SUB_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_SUB_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_fetch_sub
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_SUB_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_xor.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_xor.h
deleted file mode 100644
index 372250ecf5df5..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_xor.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FETCH_XOR_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_XOR_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_fetch_xor
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_XOR_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_flag_clear.h b/libclc/opencl/include/clc/opencl/atomic/atomic_flag_clear.h
deleted file mode 100644
index 646fedde6f503..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_flag_clear.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FLAG_CLEAR_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FLAG_CLEAR_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#if defined(__opencl_c_atomic_order_seq_cst) && \
- defined(__opencl_c_atomic_scope_device)
-_CLC_OVERLOAD _CLC_DECL void atomic_flag_clear(volatile __global atomic_flag *);
-_CLC_OVERLOAD _CLC_DECL void atomic_flag_clear(volatile __local atomic_flag *);
-#if defined(__opencl_c_generic_address_space)
-_CLC_OVERLOAD _CLC_DECL void atomic_flag_clear(volatile atomic_flag *);
-#endif // defined(__opencl_c_generic_address_space)
-#endif
-
-#if defined(__opencl_c_atomic_scope_device)
-_CLC_OVERLOAD _CLC_DECL void
-atomic_flag_clear_explicit(volatile __global atomic_flag *, memory_order);
-_CLC_OVERLOAD _CLC_DECL void
-atomic_flag_clear_explicit(volatile __local atomic_flag *, memory_order);
-#if defined(__opencl_c_generic_address_space)
-_CLC_OVERLOAD _CLC_DECL void atomic_flag_clear_explicit(volatile atomic_flag *,
- memory_order);
-#endif // defined(__opencl_c_generic_address_space)
-#endif
-
-_CLC_OVERLOAD _CLC_DECL void
-atomic_flag_clear_explicit(volatile __global atomic_flag *, memory_order,
- memory_scope);
-_CLC_OVERLOAD _CLC_DECL void
-atomic_flag_clear_explicit(volatile __local atomic_flag *, memory_order,
- memory_scope);
-#if defined(__opencl_c_generic_address_space)
-_CLC_OVERLOAD _CLC_DECL void
-atomic_flag_clear_explicit(volatile atomic_flag *, memory_order, memory_scope);
-#endif // defined(__opencl_c_generic_address_space)
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FLAG_CLEAR_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_flag_test_and_set.h b/libclc/opencl/include/clc/opencl/atomic/atomic_flag_test_and_set.h
deleted file mode 100644
index fe180b04632ba..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_flag_test_and_set.h
+++ /dev/null
@@ -1,49 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_FLAG_TEST_AND_SET_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_FLAG_TEST_AND_SET_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#if defined(__opencl_c_atomic_order_seq_cst) && \
- defined(__opencl_c_atomic_scope_device)
-_CLC_OVERLOAD _CLC_DECL bool
-atomic_flag_test_and_set(volatile __global atomic_flag *);
-_CLC_OVERLOAD _CLC_DECL bool
-atomic_flag_test_and_set(volatile __local atomic_flag *);
-#if defined(__opencl_c_generic_address_space)
-_CLC_OVERLOAD _CLC_DECL bool atomic_flag_test_and_set(volatile atomic_flag *);
-#endif // defined(__opencl_c_generic_address_space)
-#endif
-
-#if defined(__opencl_c_atomic_scope_device)
-_CLC_OVERLOAD _CLC_DECL bool
-atomic_flag_test_and_set_explicit(volatile __global atomic_flag *,
- memory_order);
-_CLC_OVERLOAD _CLC_DECL bool
-atomic_flag_test_and_set_explicit(volatile __local atomic_flag *, memory_order);
-#if defined(__opencl_c_generic_address_space)
-_CLC_OVERLOAD _CLC_DECL bool
-atomic_flag_test_and_set_explicit(volatile atomic_flag *, memory_order);
-#endif // defined(__opencl_c_generic_address_space)
-#endif
-
-_CLC_OVERLOAD _CLC_DECL bool
-atomic_flag_test_and_set_explicit(volatile __global atomic_flag *, memory_order,
- memory_scope);
-_CLC_OVERLOAD _CLC_DECL bool
-atomic_flag_test_and_set_explicit(volatile __local atomic_flag *, memory_order,
- memory_scope);
-#if defined(__opencl_c_generic_address_space)
-_CLC_OVERLOAD _CLC_DECL bool
-atomic_flag_test_and_set_explicit(volatile atomic_flag *, memory_order,
- memory_scope);
-#endif // defined(__opencl_c_generic_address_space)
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FLAG_TEST_AND_SET_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h b/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h
deleted file mode 100644
index 75b3fe076cf21..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_INC_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_INC_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_DECL int atomic_inc(volatile local int *);
-_CLC_OVERLOAD _CLC_DECL int atomic_inc(volatile global int *);
-_CLC_OVERLOAD _CLC_DECL uint atomic_inc(volatile local uint *);
-_CLC_OVERLOAD _CLC_DECL uint atomic_inc(volatile global uint *);
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_INC_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_init.h b/libclc/opencl/include/clc/opencl/atomic/atomic_init.h
deleted file mode 100644
index 6a2b938fdd52f..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_init.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_INIT_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_INIT_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_ATOMIC_GENTYPE __CLC_XCONCAT(atomic_, __CLC_GENTYPE)
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_init.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_init.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_ATOMIC_GENTYPE
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_INIT_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_init.inc b/libclc/opencl/include/clc/opencl/atomic/atomic_init.inc
deleted file mode 100644
index 80135fae4b39d..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_init.inc
+++ /dev/null
@@ -1,44 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#ifdef __CLC_SCALAR
-
-#if defined(__opencl_c_fp64) && (defined(cl_khr_int64_base_atomics) && \
- defined(cl_khr_int64_extended_atomics))
-#define __CLC_HAVE_64_ATOMIC
-#endif
-#if defined(__CLC_FPSIZE) && \
- (__CLC_FPSIZE < 64 || defined(__CLC_HAVE_64_ATOMIC))
-#define __CLC_HAVE_FP_ATOMIC
-#endif
-#if defined(__CLC_GENSIZE) && \
- ((__CLC_GENSIZE == 32) || \
- (__CLC_GENSIZE == 64 && defined(__CLC_HAVE_64_ATOMIC)))
-#define __CLC_HAVE_INT_ATOMIC
-#endif
-#if defined(__CLC_HAVE_FP_ATOMIC) || defined(__CLC_HAVE_INT_ATOMIC)
-
-#define __CLC_DECL_ATOMIC(ADDRSPACE) \
- _CLC_OVERLOAD _CLC_DECL void atomic_init( \
- volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value);
-
-__CLC_DECL_ATOMIC(global)
-__CLC_DECL_ATOMIC(local)
-#if _CLC_GENERIC_AS_SUPPORTED
-__CLC_DECL_ATOMIC()
-#endif
-
-#undef __CLC_DECL_ATOMIC
-
-#endif // __CLC_HAVE_FP_ATOMIC || __CLC_HAVE_INT_ATOMIC
-
-#undef __CLC_HAVE_INT_ATOMIC
-#undef __CLC_HAVE_FP_ATOMIC
-#undef __CLC_HAVE_64_ATOMIC
-
-#endif // __CLC_SCALAR
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_load.h b/libclc/opencl/include/clc/opencl/atomic/atomic_load.h
deleted file mode 100644
index 8d891098825ec..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_load.h
+++ /dev/null
@@ -1,26 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_LOAD_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_LOAD_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_load
-#define __CLC_NO_VALUE_ARG
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_NO_VALUE_ARG
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_LOAD_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_max.h b/libclc/opencl/include/clc/opencl/atomic/atomic_max.h
deleted file mode 100644
index e16f4ba7122dc..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_max.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_MAX_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_MAX_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_max
-#include <clc/opencl/atomic/atomic_decl_legacy.inc>
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_MAX_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_min.h b/libclc/opencl/include/clc/opencl/atomic/atomic_min.h
deleted file mode 100644
index d422388614c2a..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_min.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_MIN_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_MIN_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_min
-#include <clc/opencl/atomic/atomic_decl_legacy.inc>
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_MIN_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_or.h b/libclc/opencl/include/clc/opencl/atomic/atomic_or.h
deleted file mode 100644
index 53c9b1e3e89b3..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_or.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_OR_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_OR_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_or
-#include <clc/opencl/atomic/atomic_decl_legacy.inc>
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_OR_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_store.h b/libclc/opencl/include/clc/opencl/atomic/atomic_store.h
deleted file mode 100644
index 2f9ab96f671d3..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_store.h
+++ /dev/null
@@ -1,26 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_STORE_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_STORE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_store
-#define __CLC_RETURN_VOID
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/atomic/atomic_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_RETURN_VOID
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_STORE_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h b/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h
deleted file mode 100644
index 1b77bd7ced462..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_SUB_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_SUB_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_sub
-#include <clc/opencl/atomic/atomic_decl_legacy.inc>
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_SUB_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h b/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h
deleted file mode 100644
index 47d4a4638db34..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_XCHG_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_XCHG_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_xchg
-
-_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION(volatile local float *, float);
-_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION(volatile global float *, float);
-#include <clc/opencl/atomic/atomic_decl_legacy.inc>
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_XCHG_H__
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h b/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h
deleted file mode 100644
index 9c808d802594e..0000000000000
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_ATOMIC_ATOMIC_XOR_H__
-#define __CLC_OPENCL_ATOMIC_ATOMIC_XOR_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION atomic_xor
-#include <clc/opencl/atomic/atomic_decl_legacy.inc>
-
-#endif // __CLC_OPENCL_ATOMIC_ATOMIC_XOR_H__
diff --git a/libclc/opencl/include/clc/opencl/common/degrees.h b/libclc/opencl/include/clc/opencl/common/degrees.h
deleted file mode 100644
index 8a3e77e559cfa..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/degrees.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_COMMON_DEGREES_H__
-#define __CLC_OPENCL_COMMON_DEGREES_H__
-
-#define __CLC_FUNCTION degrees
-#define __CLC_BODY <clc/math/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_COMMON_DEGREES_H__
diff --git a/libclc/opencl/include/clc/opencl/common/mix.h b/libclc/opencl/include/clc/opencl/common/mix.h
deleted file mode 100644
index 75863cf69946f..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/mix.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_COMMON_MIX_H__
-#define __CLC_OPENCL_COMMON_MIX_H__
-
-#define __CLC_BODY <clc/opencl/common/mix.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_COMMON_MIX_H__
diff --git a/libclc/opencl/include/clc/opencl/common/mix.inc b/libclc/opencl/include/clc/opencl/common/mix.inc
deleted file mode 100644
index cd32085467bbf..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/mix.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a,
- __CLC_GENTYPE b,
- __CLC_GENTYPE c);
-
-#ifndef __CLC_SCALAR
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a,
- __CLC_GENTYPE b,
- __CLC_SCALAR_GENTYPE c);
-#endif
diff --git a/libclc/opencl/include/clc/opencl/common/radians.h b/libclc/opencl/include/clc/opencl/common/radians.h
deleted file mode 100644
index accef6eb62609..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/radians.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_COMMON_RADIANS_H__
-#define __CLC_OPENCL_COMMON_RADIANS_H__
-
-#define __CLC_FUNCTION radians
-#define __CLC_BODY <clc/math/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_COMMON_RADIANS_H__
diff --git a/libclc/opencl/include/clc/opencl/common/sign.h b/libclc/opencl/include/clc/opencl/common/sign.h
deleted file mode 100644
index 58669b4e1fc9a..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/sign.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_COMMON_SIGN_H__
-#define __CLC_OPENCL_COMMON_SIGN_H__
-
-#define __CLC_FUNCTION sign
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_COMMON_SIGN_H__
diff --git a/libclc/opencl/include/clc/opencl/common/smoothstep.h b/libclc/opencl/include/clc/opencl/common/smoothstep.h
deleted file mode 100644
index 79fe7d37fc1be..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/smoothstep.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_COMMON_SMOOTHSTEP_H__
-#define __CLC_OPENCL_COMMON_SMOOTHSTEP_H__
-
-#define __CLC_BODY <clc/opencl/common/smoothstep.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_COMMON_SMOOTHSTEP_H__
diff --git a/libclc/opencl/include/clc/opencl/common/smoothstep.inc b/libclc/opencl/include/clc/opencl/common/smoothstep.inc
deleted file mode 100644
index f1402e3c80017..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/smoothstep.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE smoothstep(__CLC_GENTYPE edge0,
- __CLC_GENTYPE edge1,
- __CLC_GENTYPE x);
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE smoothstep(float edge0,
- float edge1,
- __CLC_GENTYPE x);
-
-#ifdef cl_khr_fp64
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE smoothstep(double edge0,
- double edge1,
- __CLC_GENTYPE x);
-#endif
diff --git a/libclc/opencl/include/clc/opencl/common/step.h b/libclc/opencl/include/clc/opencl/common/step.h
deleted file mode 100644
index aa3882a9f1abf..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/step.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_COMMON_STEP_H__
-#define __CLC_OPENCL_COMMON_STEP_H__
-
-#define __CLC_BODY <clc/opencl/common/step.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_COMMON_STEP_H__
diff --git a/libclc/opencl/include/clc/opencl/common/step.inc b/libclc/opencl/include/clc/opencl/common/step.inc
deleted file mode 100644
index ab4b61e606feb..0000000000000
--- a/libclc/opencl/include/clc/opencl/common/step.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE step(__CLC_GENTYPE edge,
- __CLC_GENTYPE x);
-
-#ifndef __CLC_SCALAR
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE step(__CLC_SCALAR_GENTYPE edge,
- __CLC_GENTYPE x);
-#endif
diff --git a/libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h b/libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h
deleted file mode 100644
index 7e0c7cabafda7..0000000000000
--- a/libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_EXPLICIT_FENCE_EXPLICIT_MEMORY_FENCE_H__
-#define __CLC_OPENCL_EXPLICIT_FENCE_EXPLICIT_MEMORY_FENCE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_DECL _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags);
-_CLC_DECL _CLC_OVERLOAD void read_mem_fence(cl_mem_fence_flags flags);
-_CLC_DECL _CLC_OVERLOAD void write_mem_fence(cl_mem_fence_flags flags);
-
-#endif // __CLC_OPENCL_EXPLICIT_FENCE_EXPLICIT_MEMORY_FENCE_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/cross.h b/libclc/opencl/include/clc/opencl/geometric/cross.h
deleted file mode 100644
index 10e8f5641e730..0000000000000
--- a/libclc/opencl/include/clc/opencl/geometric/cross.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_GEOMETRIC_CROSS_H__
-#define __CLC_OPENCL_GEOMETRIC_CROSS_H__
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL float3 cross(float3 p0, float3 p1);
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL float4 cross(float4 p0, float4 p1);
-
-#ifdef cl_khr_fp64
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL double3 cross(double3 p0, double3 p1);
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL double4 cross(double4 p0, double4 p1);
-#endif
-
-#endif // __CLC_OPENCL_GEOMETRIC_CROSS_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/distance.h b/libclc/opencl/include/clc/opencl/geometric/distance.h
deleted file mode 100644
index dc5abf11c10c0..0000000000000
--- a/libclc/opencl/include/clc/opencl/geometric/distance.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_GEOMETRIC_DISTANCE_H__
-#define __CLC_OPENCL_GEOMETRIC_DISTANCE_H__
-
-#define __CLC_FUNCTION distance
-#define __CLC_BODY <clc/geometric/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_GEOMETRIC_DISTANCE_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/dot.h b/libclc/opencl/include/clc/opencl/geometric/dot.h
deleted file mode 100644
index 8cd702961fa41..0000000000000
--- a/libclc/opencl/include/clc/opencl/geometric/dot.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_GEOMETRIC_DOT_H__
-#define __CLC_OPENCL_GEOMETRIC_DOT_H__
-
-#define __CLC_FUNCTION dot
-#define __CLC_BODY <clc/geometric/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_GEOMETRIC_DOT_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_distance.h b/libclc/opencl/include/clc/opencl/geometric/fast_distance.h
deleted file mode 100644
index 3eb7d70cdddd2..0000000000000
--- a/libclc/opencl/include/clc/opencl/geometric/fast_distance.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_GEOMETRIC_FAST_DISTANCE_H__
-#define __CLC_OPENCL_GEOMETRIC_FAST_DISTANCE_H__
-
-#define __CLC_FLOAT_ONLY
-#define __CLC_FUNCTION fast_distance
-#define __CLC_BODY <clc/geometric/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_GEOMETRIC_FAST_DISTANCE_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_length.h b/libclc/opencl/include/clc/opencl/geometric/fast_length.h
deleted file mode 100644
index ff383de9ec72d..0000000000000
--- a/libclc/opencl/include/clc/opencl/geometric/fast_length.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_GEOMETRIC_FAST_LENGTH_H__
-#define __CLC_OPENCL_GEOMETRIC_FAST_LENGTH_H__
-
-#define __CLC_FLOAT_ONLY
-#define __CLC_FUNCTION fast_length
-#define __CLC_BODY <clc/geometric/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_GEOMETRIC_FAST_LENGTH_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h b/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
deleted file mode 100644
index fb677d7d3f791..0000000000000
--- a/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
+++ /dev/null
@@ -1,22 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_GEOMETRIC_FAST_NORMALIZE_H__
-#define __CLC_OPENCL_GEOMETRIC_FAST_NORMALIZE_H__
-
-#define __CLC_FLOAT_ONLY
-#define __CLC_FUNCTION fast_normalize
-#define __CLC_GEOMETRIC_RET_GENTYPE
-#define __CLC_BODY <clc/geometric/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-#undef __CLC_GEOMETRIC_RET_GENTYPE
-
-#endif // __CLC_OPENCL_GEOMETRIC_FAST_NORMALIZE_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/length.h b/libclc/opencl/include/clc/opencl/geometric/length.h
deleted file mode 100644
index 686d554d60420..0000000000000
--- a/libclc/opencl/include/clc/opencl/geometric/length.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_GEOMETRIC_LENGTH_H__
-#define __CLC_OPENCL_GEOMETRIC_LENGTH_H__
-
-#define __CLC_FUNCTION length
-#define __CLC_BODY <clc/geometric/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_GEOMETRIC_LENGTH_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/normalize.h b/libclc/opencl/include/clc/opencl/geometric/normalize.h
deleted file mode 100644
index 3ed6dae53269e..0000000000000
--- a/libclc/opencl/include/clc/opencl/geometric/normalize.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_GEOMETRIC_NORMALIZE_H__
-#define __CLC_OPENCL_GEOMETRIC_NORMALIZE_H__
-
-#define __CLC_FUNCTION normalize
-#define __CLC_GEOMETRIC_RET_GENTYPE
-#define __CLC_BODY <clc/geometric/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_GEOMETRIC_RET_GENTYPE
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_GEOMETRIC_NORMALIZE_H__
diff --git a/libclc/opencl/include/clc/opencl/image/image.h b/libclc/opencl/include/clc/opencl/image/image.h
deleted file mode 100644
index 7a248304acff5..0000000000000
--- a/libclc/opencl/include/clc/opencl/image/image.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_IMAGE_H__
-#define __CLC_OPENCL_IMAGE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#if defined(__opencl_c_images)
-
-_CLC_OVERLOAD _CLC_DECL int get_image_width(image2d_t image);
-_CLC_OVERLOAD _CLC_DECL int get_image_width(image3d_t image);
-
-_CLC_OVERLOAD _CLC_DECL int get_image_height(image2d_t image);
-_CLC_OVERLOAD _CLC_DECL int get_image_height(image3d_t image);
-
-_CLC_OVERLOAD _CLC_DECL int get_image_depth(image3d_t image);
-
-_CLC_OVERLOAD _CLC_DECL int get_image_channel_data_type(image2d_t image);
-_CLC_OVERLOAD _CLC_DECL int get_image_channel_data_type(image3d_t image);
-
-_CLC_OVERLOAD _CLC_DECL int get_image_channel_order(image2d_t image);
-_CLC_OVERLOAD _CLC_DECL int get_image_channel_order(image3d_t image);
-
-_CLC_OVERLOAD _CLC_DECL int2 get_image_dim(image2d_t image);
-_CLC_OVERLOAD _CLC_DECL int4 get_image_dim(image3d_t image);
-
-_CLC_OVERLOAD _CLC_DECL void write_imagef(image2d_t image, int2 coord,
- float4 color);
-_CLC_OVERLOAD _CLC_DECL void write_imagei(image2d_t image, int2 coord,
- int4 color);
-_CLC_OVERLOAD _CLC_DECL void write_imageui(image2d_t image, int2 coord,
- uint4 color);
-
-_CLC_OVERLOAD _CLC_DECL float4 read_imagef(image2d_t image, sampler_t sampler,
- int2 coord);
-_CLC_OVERLOAD _CLC_DECL float4 read_imagef(image2d_t image, sampler_t sampler,
- float2 coord);
-_CLC_OVERLOAD _CLC_DECL int4 read_imagei(image2d_t image, sampler_t sampler,
- int2 coord);
-_CLC_OVERLOAD _CLC_DECL int4 read_imagei(image2d_t image, sampler_t sampler,
- float2 coord);
-_CLC_OVERLOAD _CLC_DECL uint4 read_imageui(image2d_t image, sampler_t sampler,
- int2 coord);
-_CLC_OVERLOAD _CLC_DECL uint4 read_imageui(image2d_t image, sampler_t sampler,
- float2 coord);
-
-#endif
-
-#endif // __CLC_OPENCL_IMAGE_H__
diff --git a/libclc/opencl/include/clc/opencl/image/image_defines.h b/libclc/opencl/include/clc/opencl/image/image_defines.h
deleted file mode 100644
index 75e08dec3f044..0000000000000
--- a/libclc/opencl/include/clc/opencl/image/image_defines.h
+++ /dev/null
@@ -1,62 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_IMAGE_IMAGE_DEFINES_H__
-#define __CLC_OPENCL_IMAGE_IMAGE_DEFINES_H__
-
-/* get_image_channel_data_type flags */
-#define CLK_SNORM_INT8 0x10D0
-#define CLK_SNORM_INT16 0x10D1
-#define CLK_UNORM_INT8 0x10D2
-#define CLK_UNORM_INT16 0x10D3
-#define CLK_UNORM_SHORT_565 0x10D4
-#define CLK_UNORM_SHORT_555 0x10D5
-#define CLK_UNORM_SHORT_101010 0x10D6
-#define CLK_SIGNED_INT8 0x10D7
-#define CLK_SIGNED_INT16 0x10D8
-#define CLK_SIGNED_INT32 0x10D9
-#define CLK_UNSIGNED_INT8 0x10DA
-#define CLK_UNSIGNED_INT16 0x10DB
-#define CLK_UNSIGNED_INT32 0x10DC
-#define CLK_HALF_FLOAT 0x10DD
-#define CLK_FLOAT 0x10DE
-
-/* get_image_channel_order flags */
-#define CLK_R 0x10B0
-#define CLK_A 0x10B1
-#define CLK_RG 0x10B2
-#define CLK_RA 0x10B3
-#define CLK_RGB 0x10B4
-#define CLK_RGBA 0x10B5
-#define CLK_BGRA 0x10B6
-#define CLK_ARGB 0x10B7
-#define CLK_INTENSITY 0x10B8
-#define CLK_LUMINANCE 0x10B9
-#define CLK_Rx 0x10BA
-#define CLK_RGx 0x10BB
-#define CLK_RGBx 0x10BC
-
-/* sampler normalized coords */
-#define CLK_NORMALIZED_COORDS_FALSE 0x0000
-#define CLK_NORMALIZED_COORDS_TRUE 0x0001
-#define __CLC_NORMALIZED_COORDS_MASK 0x0001
-
-/* sampler addressing mode */
-#define CLK_ADDRESS_NONE 0x0000
-#define CLK_ADDRESS_CLAMP_TO_EDGE 0x0002
-#define CLK_ADDRESS_CLAMP 0x0004
-#define CLK_ADDRESS_REPEAT 0x0006
-#define CLK_ADDRESS_MIRRORED_REPEAT 0x0008
-#define __CLC_ADDRESS_MASK 0x000E
-
-/* sampler filter mode */
-#define CLK_FILTER_NEAREST 0x0000
-#define CLK_FILTER_LINEAR 0x0010
-#define __CLC_FILTER_MASK 0x0010
-
-#endif // __CLC_OPENCL_IMAGE_IMAGE_DEFINES_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/abs.h b/libclc/opencl/include/clc/opencl/integer/abs.h
deleted file mode 100644
index 3059bef9a7e4f..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/abs.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_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.inc b/libclc/opencl/include/clc/opencl/integer/abs.inc
deleted file mode 100644
index 352babb393212..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/abs.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_U_GENTYPE abs(__CLC_GENTYPE x);
diff --git a/libclc/opencl/include/clc/opencl/integer/abs_diff.h b/libclc/opencl/include/clc/opencl/integer/abs_diff.h
deleted file mode 100644
index 9e8fe2b31fed7..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/abs_diff.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_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/abs_diff.inc b/libclc/opencl/include/clc/opencl/integer/abs_diff.inc
deleted file mode 100644
index 1f8fd635fad9e..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/abs_diff.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_U_GENTYPE abs_diff(__CLC_GENTYPE x,
- __CLC_GENTYPE y);
diff --git a/libclc/opencl/include/clc/opencl/integer/add_sat.h b/libclc/opencl/include/clc/opencl/integer/add_sat.h
deleted file mode 100644
index e77eee0c0b05a..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/add_sat.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_ADD_SAT_H__
-#define __CLC_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_INTEGER_ADD_SAT_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/bit_reverse.h b/libclc/opencl/include/clc/opencl/integer/bit_reverse.h
deleted file mode 100644
index 9c3e45d08519a..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/bit_reverse.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_BIT_REVERSE_H__
-#define __CLC_OPENCL_INTEGER_BIT_REVERSE_H__
-
-#ifdef cl_khr_extended_bit_ops
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION bit_reverse
-#define __CLC_BODY <clc/shared/unary_decl.inc>
-
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // cl_khr_extended_bit_ops
-
-#endif // __CLC_OPENCL_INTEGER_BIT_REVERSE_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/bitfield_extract_signed.h b/libclc/opencl/include/clc/opencl/integer/bitfield_extract_signed.h
deleted file mode 100644
index c6e48d9820dba..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/bitfield_extract_signed.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_BITFIELD_EXTRACT_SIGNED_H__
-#define __CLC_OPENCL_INTEGER_BITFIELD_EXTRACT_SIGNED_H__
-
-#ifdef cl_khr_extended_bit_ops
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION bitfield_extract_signed
-#define __CLC_RETTYPE __CLC_S_GENTYPE
-
-#define __CLC_BODY <clc/integer/clc_bitfield_extract_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_RETTYPE
-#undef __CLC_FUNCTION
-
-#endif // cl_khr_extended_bit_ops
-
-#endif // __CLC_OPENCL_INTEGER_BITFIELD_EXTRACT_SIGNED_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/bitfield_extract_unsigned.h b/libclc/opencl/include/clc/opencl/integer/bitfield_extract_unsigned.h
deleted file mode 100644
index 63dd4368f97a6..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/bitfield_extract_unsigned.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_BITFIELD_EXTRACT_UNSIGNED_H__
-#define __CLC_OPENCL_INTEGER_BITFIELD_EXTRACT_UNSIGNED_H__
-
-#ifdef cl_khr_extended_bit_ops
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION bitfield_extract_unsigned
-#define __CLC_RETTYPE __CLC_U_GENTYPE
-
-#define __CLC_BODY <clc/integer/clc_bitfield_extract_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_RETTYPE
-#undef __CLC_FUNCTION
-
-#endif // cl_khr_extended_bit_ops
-
-#endif // __CLC_OPENCL_INTEGER_BITFIELD_EXTRACT_UNSIGNED_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/bitfield_insert.h b/libclc/opencl/include/clc/opencl/integer/bitfield_insert.h
deleted file mode 100644
index 40c7d59825852..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/bitfield_insert.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_BITFIELD_INSERT_H__
-#define __CLC_OPENCL_INTEGER_BITFIELD_INSERT_H__
-
-#ifdef cl_khr_extended_bit_ops
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_BODY <clc/integer/clc_bitfield_insert.inc>
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // cl_khr_extended_bit_ops
-
-#endif // __CLC_OPENCL_INTEGER_BITFIELD_INSERT_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/clz.h b/libclc/opencl/include/clc/opencl/integer/clz.h
deleted file mode 100644
index 1b47e975b52a1..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/clz.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_CLZ_H__
-#define __CLC_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_INTEGER_CLZ_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/ctz.h b/libclc/opencl/include/clc/opencl/integer/ctz.h
deleted file mode 100644
index ba01161407303..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/ctz.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_CTZ_H__
-#define __CLC_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>
-
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_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
deleted file mode 100644
index f200c7019435b..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/hadd.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_HADD_H__
-#define __CLC_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_INTEGER_HADD_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/mad24.h b/libclc/opencl/include/clc/opencl/integer/mad24.h
deleted file mode 100644
index 5bf3d385a432b..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/mad24.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_MAD24_H__
-#define __CLC_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_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
deleted file mode 100644
index 98b525ba82689..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/mad_hi.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_MAD_HI_H__
-#define __CLC_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_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
deleted file mode 100644
index 9e2afe4f1d9f1..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/mad_sat.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_MAD_SAT_H__
-#define __CLC_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_INTEGER_MAD_SAT_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/mul24.h b/libclc/opencl/include/clc/opencl/integer/mul24.h
deleted file mode 100644
index 434da55a71731..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/mul24.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_MUL24_H__
-#define __CLC_OPENCL_INTEGER_MUL24_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION mul24
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/integer/gentype24.inc>
-
-#undef __CLC_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
deleted file mode 100644
index 7a9317f94cd24..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/mul_hi.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_MUL_HI_H__
-#define __CLC_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_INTEGER_MUL_HI_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/popcount.h b/libclc/opencl/include/clc/opencl/integer/popcount.h
deleted file mode 100644
index 112640c7ce635..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/popcount.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_POPCOUNT_H__
-#define __CLC_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_INTEGER_POPCOUNT_H__
diff --git a/libclc/opencl/include/clc/opencl/integer/rhadd.h b/libclc/opencl/include/clc/opencl/integer/rhadd.h
deleted file mode 100644
index 5ed8b27df8fce..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/rhadd.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_RHADD_H__
-#define __CLC_OPENCL_INTEGER_RHADD_H__
-
-#define __CLC_FUNCTION rhadd
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_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
deleted file mode 100644
index cc92a1254fed3..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/rotate.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_ROTATE_H__
-#define __CLC_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_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
deleted file mode 100644
index 1ff26d94778cb..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/sub_sat.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_INTEGER_SUB_SAT_H__
-#define __CLC_OPENCL_INTEGER_SUB_SAT_H__
-
-#define __CLC_FUNCTION sub_sat
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_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
deleted file mode 100644
index 4432d49ccb062..0000000000000
--- a/libclc/opencl/include/clc/opencl/integer/upsample.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_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_CONST _CLC_DECL BGENTYPE upsample(GENTYPE hi, UGENTYPE lo);
-
-#define __CLC_UPSAMPLE_VEC(BGENTYPE, GENTYPE, UGENTYPE) \
- __CLC_UPSAMPLE_DECL(BGENTYPE, GENTYPE, UGENTYPE) \
- __CLC_UPSAMPLE_DECL(BGENTYPE##2, GENTYPE##2, UGENTYPE##2) \
- __CLC_UPSAMPLE_DECL(BGENTYPE##3, GENTYPE##3, UGENTYPE##3) \
- __CLC_UPSAMPLE_DECL(BGENTYPE##4, GENTYPE##4, UGENTYPE##4) \
- __CLC_UPSAMPLE_DECL(BGENTYPE##8, GENTYPE##8, UGENTYPE##8) \
- __CLC_UPSAMPLE_DECL(BGENTYPE##16, GENTYPE##16, UGENTYPE##16)
-
-#define __CLC_UPSAMPLE_TYPES() \
- __CLC_UPSAMPLE_VEC(short, char, uchar) \
- __CLC_UPSAMPLE_VEC(ushort, uchar, uchar) \
- __CLC_UPSAMPLE_VEC(int, short, ushort) \
- __CLC_UPSAMPLE_VEC(uint, ushort, ushort) \
- __CLC_UPSAMPLE_VEC(long, int, uint) \
- __CLC_UPSAMPLE_VEC(ulong, uint, uint)
-
-__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/math/acos.h b/libclc/opencl/include/clc/opencl/math/acos.h
deleted file mode 100644
index aa0d7af13ee9a..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/acos.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ACOS_H__
-#define __CLC_OPENCL_MATH_ACOS_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION acos
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ACOS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/acosh.h b/libclc/opencl/include/clc/opencl/math/acosh.h
deleted file mode 100644
index 333ab6986d8c3..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/acosh.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ACOSH_H__
-#define __CLC_OPENCL_MATH_ACOSH_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION acosh
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ACOSH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/acospi.h b/libclc/opencl/include/clc/opencl/math/acospi.h
deleted file mode 100644
index fd838acd5e522..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/acospi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ACOSPI_H__
-#define __CLC_OPENCL_MATH_ACOSPI_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION acospi
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ACOSPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/asin.h b/libclc/opencl/include/clc/opencl/math/asin.h
deleted file mode 100644
index de3b8ad219d1b..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/asin.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ASIN_H__
-#define __CLC_OPENCL_MATH_ASIN_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION asin
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ASIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/asinh.h b/libclc/opencl/include/clc/opencl/math/asinh.h
deleted file mode 100644
index a550ec8dee4ca..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/asinh.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ASINH_H__
-#define __CLC_OPENCL_MATH_ASINH_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION asinh
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ASINH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/asinpi.h b/libclc/opencl/include/clc/opencl/math/asinpi.h
deleted file mode 100644
index cb6133ddc3f51..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/asinpi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ASINPI_H__
-#define __CLC_OPENCL_MATH_ASINPI_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION asinpi
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ASINPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atan.h b/libclc/opencl/include/clc/opencl/math/atan.h
deleted file mode 100644
index 165bbc3dfb18e..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/atan.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ATAN_H__
-#define __CLC_OPENCL_MATH_ATAN_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION atan
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ATAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atan2.h b/libclc/opencl/include/clc/opencl/math/atan2.h
deleted file mode 100644
index 2874876707098..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/atan2.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ATAN2_H__
-#define __CLC_OPENCL_MATH_ATAN2_H__
-
-#define __CLC_FUNCTION atan2
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ATAN2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atan2pi.h b/libclc/opencl/include/clc/opencl/math/atan2pi.h
deleted file mode 100644
index 7c09a94fffa82..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/atan2pi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ATAN2PI_H__
-#define __CLC_OPENCL_MATH_ATAN2PI_H__
-
-#define __CLC_FUNCTION atan2pi
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ATAN2PI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atanh.h b/libclc/opencl/include/clc/opencl/math/atanh.h
deleted file mode 100644
index ccfe41fdb2cf1..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/atanh.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ATANH_H__
-#define __CLC_OPENCL_MATH_ATANH_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION atanh
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ATANH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atanpi.h b/libclc/opencl/include/clc/opencl/math/atanpi.h
deleted file mode 100644
index 8041cc3e813e7..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/atanpi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ATANPI_H__
-#define __CLC_OPENCL_MATH_ATANPI_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION atanpi
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ATANPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/cbrt.h b/libclc/opencl/include/clc/opencl/math/cbrt.h
deleted file mode 100644
index 3beb5b4b596af..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/cbrt.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_CBRT_H__
-#define __CLC_OPENCL_MATH_CBRT_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION cbrt
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_CBRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/ceil.h b/libclc/opencl/include/clc/opencl/math/ceil.h
deleted file mode 100644
index ab32419225ce9..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/ceil.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_CEIL_H__
-#define __CLC_OPENCL_MATH_CEIL_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION ceil
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_CEIL_H__
diff --git a/libclc/opencl/include/clc/opencl/math/copysign.h b/libclc/opencl/include/clc/opencl/math/copysign.h
deleted file mode 100644
index 626ce2e01cc34..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/copysign.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_COPYSIGN_H__
-#define __CLC_OPENCL_MATH_COPYSIGN_H__
-
-#define __CLC_FUNCTION copysign
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_COPYSIGN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/cos.h b/libclc/opencl/include/clc/opencl/math/cos.h
deleted file mode 100644
index 8d26f0f78d2d8..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/cos.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_COS_H__
-#define __CLC_OPENCL_MATH_COS_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION cos
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_COS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/cosh.h b/libclc/opencl/include/clc/opencl/math/cosh.h
deleted file mode 100644
index 2afe77fae6c70..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/cosh.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_COSH_H__
-#define __CLC_OPENCL_MATH_COSH_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION cosh
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_COSH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/cospi.h b/libclc/opencl/include/clc/opencl/math/cospi.h
deleted file mode 100644
index 8e848ac0f883b..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/cospi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_COSPI_H__
-#define __CLC_OPENCL_MATH_COSPI_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION cospi
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_COSPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/erf.h b/libclc/opencl/include/clc/opencl/math/erf.h
deleted file mode 100644
index 71c211e693bde..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/erf.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ERF_H__
-#define __CLC_OPENCL_MATH_ERF_H__
-
-#undef erfc
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION erf
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ERF_H__
diff --git a/libclc/opencl/include/clc/opencl/math/erfc.h b/libclc/opencl/include/clc/opencl/math/erfc.h
deleted file mode 100644
index 3939108820451..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/erfc.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ERFC_H__
-#define __CLC_OPENCL_MATH_ERFC_H__
-
-#undef erfc
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION erfc
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ERFC_H__
diff --git a/libclc/opencl/include/clc/opencl/math/exp.h b/libclc/opencl/include/clc/opencl/math/exp.h
deleted file mode 100644
index acf6d4885dbd3..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/exp.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_EXP_H__
-#define __CLC_OPENCL_MATH_EXP_H__
-
-#undef exp
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION exp
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_EXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/exp10.h b/libclc/opencl/include/clc/opencl/math/exp10.h
deleted file mode 100644
index 11dcae74e0613..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/exp10.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_EXP10_H__
-#define __CLC_OPENCL_MATH_EXP10_H__
-
-#undef exp10
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION exp10
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_EXP10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/exp2.h b/libclc/opencl/include/clc/opencl/math/exp2.h
deleted file mode 100644
index e220654ac72e7..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/exp2.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_EXP2_H__
-#define __CLC_OPENCL_MATH_EXP2_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION exp2
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_EXP2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/expm1.h b/libclc/opencl/include/clc/opencl/math/expm1.h
deleted file mode 100644
index 556dbea8fae02..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/expm1.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_EXPM1_H__
-#define __CLC_OPENCL_MATH_EXPM1_H__
-
-#undef exp
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION expm1
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_EXPM1_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fabs.h b/libclc/opencl/include/clc/opencl/math/fabs.h
deleted file mode 100644
index ad8c05198a705..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/fabs.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FABS_H__
-#define __CLC_OPENCL_MATH_FABS_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION fabs
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FABS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fdim.h b/libclc/opencl/include/clc/opencl/math/fdim.h
deleted file mode 100644
index ed30904e3c247..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/fdim.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FDIM_H__
-#define __CLC_OPENCL_MATH_FDIM_H__
-
-#define __CLC_FUNCTION fdim
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FDIM_H__
diff --git a/libclc/opencl/include/clc/opencl/math/floor.h b/libclc/opencl/include/clc/opencl/math/floor.h
deleted file mode 100644
index 8d7a0358c4652..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/floor.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FLOOR_H__
-#define __CLC_OPENCL_MATH_FLOOR_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION floor
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FLOOR_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fma.h b/libclc/opencl/include/clc/opencl/math/fma.h
deleted file mode 100644
index 7a002318384a9..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/fma.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FMA_H__
-#define __CLC_OPENCL_MATH_FMA_H__
-
-#define __CLC_BODY <clc/shared/ternary_decl.inc>
-#define __CLC_FUNCTION fma
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FMA_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fmax.h b/libclc/opencl/include/clc/opencl/math/fmax.h
deleted file mode 100644
index 8ada84403e0ab..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/fmax.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FMAX_H__
-#define __CLC_OPENCL_MATH_FMAX_H__
-
-#define __CLC_BODY <clc/math/binary_decl_with_scalar_second_arg.inc>
-#define __CLC_FUNCTION fmax
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FMAX_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fmin.h b/libclc/opencl/include/clc/opencl/math/fmin.h
deleted file mode 100644
index 3a464a63db735..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/fmin.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FMIN_H__
-#define __CLC_OPENCL_MATH_FMIN_H__
-
-#define __CLC_BODY <clc/math/binary_decl_with_scalar_second_arg.inc>
-#define __CLC_FUNCTION fmin
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FMIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fmod.h b/libclc/opencl/include/clc/opencl/math/fmod.h
deleted file mode 100644
index f826c8a6f6c3e..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/fmod.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FMOD_H__
-#define __CLC_OPENCL_MATH_FMOD_H__
-
-#define __CLC_FUNCTION fmod
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FMOD_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fract.h b/libclc/opencl/include/clc/opencl/math/fract.h
deleted file mode 100644
index 342280f70ed6c..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/fract.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FRACT_H__
-#define __CLC_OPENCL_MATH_FRACT_H__
-
-#define __CLC_FUNCTION fract
-#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FRACT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/frexp.h b/libclc/opencl/include/clc/opencl/math/frexp.h
deleted file mode 100644
index 9f0701aff10a2..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/frexp.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_FREXP_H__
-#define __CLC_OPENCL_MATH_FREXP_H__
-
-#define __CLC_FUNCTION frexp
-#define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_FREXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_cos.h b/libclc/opencl/include/clc/opencl/math/half_cos.h
deleted file mode 100644
index 9f95f5d7e2775..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_cos.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_COS_H__
-#define __CLC_OPENCL_MATH_HALF_COS_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_cos
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_COS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_divide.h b/libclc/opencl/include/clc/opencl/math/half_divide.h
deleted file mode 100644
index c61fb08e2119d..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_divide.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_DIVIDE_H__
-#define __CLC_OPENCL_MATH_HALF_DIVIDE_H__
-
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION half_divide
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_DIVIDE_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp.h b/libclc/opencl/include/clc/opencl/math/half_exp.h
deleted file mode 100644
index 53b75a62f4dfe..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_exp.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_EXP_H__
-#define __CLC_OPENCL_MATH_HALF_EXP_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_exp
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_EXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp10.h b/libclc/opencl/include/clc/opencl/math/half_exp10.h
deleted file mode 100644
index 88b05a4df0811..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_exp10.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_EXP10_H__
-#define __CLC_OPENCL_MATH_HALF_EXP10_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_exp10
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_EXP10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp2.h b/libclc/opencl/include/clc/opencl/math/half_exp2.h
deleted file mode 100644
index e440b996e58ab..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_exp2.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_EXP2_H__
-#define __CLC_OPENCL_MATH_HALF_EXP2_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_exp2
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_EXP2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_log.h b/libclc/opencl/include/clc/opencl/math/half_log.h
deleted file mode 100644
index d4432312c6aff..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_log.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_LOG_H__
-#define __CLC_OPENCL_MATH_HALF_LOG_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_log
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_LOG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_log10.h b/libclc/opencl/include/clc/opencl/math/half_log10.h
deleted file mode 100644
index f219f950f9492..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_log10.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_LOG10_H__
-#define __CLC_OPENCL_MATH_HALF_LOG10_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_log10
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_LOG10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_log2.h b/libclc/opencl/include/clc/opencl/math/half_log2.h
deleted file mode 100644
index 932f546e87612..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_log2.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_LOG2_H__
-#define __CLC_OPENCL_MATH_HALF_LOG2_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_log2
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_LOG2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_powr.h b/libclc/opencl/include/clc/opencl/math/half_powr.h
deleted file mode 100644
index e9af720aa5ac5..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_powr.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_POWR_H__
-#define __CLC_OPENCL_MATH_HALF_POWR_H__
-
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION half_powr
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_POWR_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_recip.h b/libclc/opencl/include/clc/opencl/math/half_recip.h
deleted file mode 100644
index 6fb7f02138a6e..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_recip.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_RECIP_H__
-#define __CLC_OPENCL_MATH_HALF_RECIP_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_recip
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_RECIP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_rsqrt.h b/libclc/opencl/include/clc/opencl/math/half_rsqrt.h
deleted file mode 100644
index a130d3bb080a1..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_rsqrt.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_RSQRT_H__
-#define __CLC_OPENCL_MATH_HALF_RSQRT_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_rsqrt
-#define __CLC_FLOAT_ONLY
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_RSQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_sin.h b/libclc/opencl/include/clc/opencl/math/half_sin.h
deleted file mode 100644
index cde9549bd3b35..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_sin.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_SIN_H__
-#define __CLC_OPENCL_MATH_HALF_SIN_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_sin
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_SIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_sqrt.h b/libclc/opencl/include/clc/opencl/math/half_sqrt.h
deleted file mode 100644
index 017bed1c066e4..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_sqrt.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_SQRT_H__
-#define __CLC_OPENCL_MATH_HALF_SQRT_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_sqrt
-#define __CLC_FLOAT_ONLY
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_SQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_tan.h b/libclc/opencl/include/clc/opencl/math/half_tan.h
deleted file mode 100644
index b8e71fcba43db..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/half_tan.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HALF_TAN_H__
-#define __CLC_OPENCL_MATH_HALF_TAN_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_tan
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HALF_TAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/hypot.h b/libclc/opencl/include/clc/opencl/math/hypot.h
deleted file mode 100644
index 53bef98772e41..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/hypot.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_HYPOT_H__
-#define __CLC_OPENCL_MATH_HYPOT_H__
-
-#define __CLC_FUNCTION hypot
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_HYPOT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/ilogb.h b/libclc/opencl/include/clc/opencl/math/ilogb.h
deleted file mode 100644
index 29d92632f7f50..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/ilogb.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ILOGB_H__
-#define __CLC_OPENCL_MATH_ILOGB_H__
-
-#define __CLC_FUNCTION ilogb
-#define __CLC_BODY <clc/math/unary_decl_with_int_return.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ILOGB_H__
diff --git a/libclc/opencl/include/clc/opencl/math/ldexp.h b/libclc/opencl/include/clc/opencl/math/ldexp.h
deleted file mode 100644
index cbbd030d73400..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/ldexp.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_LDEXP_H__
-#define __CLC_OPENCL_MATH_LDEXP_H__
-
-#define __CLC_FUNCTION ldexp
-#define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#define __CLC_BODY <clc/opencl/math/ldexp.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_MATH_LDEXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/ldexp.inc b/libclc/opencl/include/clc/opencl/math/ldexp.inc
deleted file mode 100644
index 9f3ffeeef27e3..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/ldexp.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_SCALAR
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE ldexp(__CLC_GENTYPE x, int n);
-
-#endif
diff --git a/libclc/opencl/include/clc/opencl/math/lgamma.h b/libclc/opencl/include/clc/opencl/math/lgamma.h
deleted file mode 100644
index 42c260f65942b..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/lgamma.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_LGAMMA_H__
-#define __CLC_OPENCL_MATH_LGAMMA_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION lgamma
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_LGAMMA_H__
diff --git a/libclc/opencl/include/clc/opencl/math/lgamma_r.h b/libclc/opencl/include/clc/opencl/math/lgamma_r.h
deleted file mode 100644
index 03f47b30fb717..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/lgamma_r.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_LGAMMA_R_H__
-#define __CLC_OPENCL_MATH_LGAMMA_R_H__
-
-#define __CLC_FUNCTION lgamma_r
-#define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_LGAMMA_R_H__
diff --git a/libclc/opencl/include/clc/opencl/math/log.h b/libclc/opencl/include/clc/opencl/math/log.h
deleted file mode 100644
index f863dee3e8f2d..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/log.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_LOG_H__
-#define __CLC_OPENCL_MATH_LOG_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION log
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_LOG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/log10.h b/libclc/opencl/include/clc/opencl/math/log10.h
deleted file mode 100644
index d328057ecf5e0..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/log10.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_LOG10_H__
-#define __CLC_OPENCL_MATH_LOG10_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION log10
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_LOG10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/log1p.h b/libclc/opencl/include/clc/opencl/math/log1p.h
deleted file mode 100644
index 0dba062aa9fde..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/log1p.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_LOG1P_H__
-#define __CLC_OPENCL_MATH_LOG1P_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION log1p
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_LOG1P_H__
diff --git a/libclc/opencl/include/clc/opencl/math/log2.h b/libclc/opencl/include/clc/opencl/math/log2.h
deleted file mode 100644
index 3903b2730e292..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/log2.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_LOG2_H__
-#define __CLC_OPENCL_MATH_LOG2_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION log2
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_LOG2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/logb.h b/libclc/opencl/include/clc/opencl/math/logb.h
deleted file mode 100644
index ef4f7b763c59f..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/logb.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_LOGB_H__
-#define __CLC_OPENCL_MATH_LOGB_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION logb
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_LOGB_H__
diff --git a/libclc/opencl/include/clc/opencl/math/mad.h b/libclc/opencl/include/clc/opencl/math/mad.h
deleted file mode 100644
index 440892cfbb17b..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/mad.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_MAD_H__
-#define __CLC_OPENCL_MATH_MAD_H__
-
-#define __CLC_BODY <clc/shared/ternary_decl.inc>
-#define __CLC_FUNCTION mad
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_MAD_H__
diff --git a/libclc/opencl/include/clc/opencl/math/maxmag.h b/libclc/opencl/include/clc/opencl/math/maxmag.h
deleted file mode 100644
index 1f3df1034d8e4..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/maxmag.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_MAXMAG_H__
-#define __CLC_OPENCL_MATH_MAXMAG_H__
-
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION maxmag
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_MAXMAG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/minmag.h b/libclc/opencl/include/clc/opencl/math/minmag.h
deleted file mode 100644
index c87fc1a20e401..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/minmag.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_MINMAG_H__
-#define __CLC_OPENCL_MATH_MINMAG_H__
-
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION minmag
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_MINMAG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/modf.h b/libclc/opencl/include/clc/opencl/math/modf.h
deleted file mode 100644
index df07f7f5948dd..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/modf.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_MODF_H__
-#define __CLC_OPENCL_MATH_MODF_H__
-
-#define __CLC_FUNCTION modf
-#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_MODF_H__
diff --git a/libclc/opencl/include/clc/opencl/math/nan.h b/libclc/opencl/include/clc/opencl/math/nan.h
deleted file mode 100644
index d98ac56603495..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/nan.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NAN_H__
-#define __CLC_OPENCL_MATH_NAN_H__
-
-#define __CLC_BODY <clc/opencl/math/nan.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_MATH_NAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/nan.inc b/libclc/opencl/include/clc/opencl/math/nan.inc
deleted file mode 100644
index 3134e56eaf83e..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/nan.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE nan(__CLC_U_GENTYPE code);
diff --git a/libclc/opencl/include/clc/opencl/math/native_cos.h b/libclc/opencl/include/clc/opencl/math/native_cos.h
deleted file mode 100644
index 9c6728103adc3..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_cos.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_COS_H__
-#define __CLC_OPENCL_MATH_NATIVE_COS_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_cos
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_COS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_divide.h b/libclc/opencl/include/clc/opencl/math/native_divide.h
deleted file mode 100644
index 66c42f20d222c..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_divide.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_DIVIDE_H__
-#define __CLC_OPENCL_MATH_NATIVE_DIVIDE_H__
-
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION native_divide
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_DIVIDE_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp.h b/libclc/opencl/include/clc/opencl/math/native_exp.h
deleted file mode 100644
index d8c6f70d3f2c2..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_exp.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_EXP_H__
-#define __CLC_OPENCL_MATH_NATIVE_EXP_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_exp
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_EXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp10.h b/libclc/opencl/include/clc/opencl/math/native_exp10.h
deleted file mode 100644
index 484eeb5de0a51..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_exp10.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_EXP10_H__
-#define __CLC_OPENCL_MATH_NATIVE_EXP10_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_exp10
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_EXP10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp2.h b/libclc/opencl/include/clc/opencl/math/native_exp2.h
deleted file mode 100644
index bc1e6babc62b0..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_exp2.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_EXP2_H__
-#define __CLC_OPENCL_MATH_NATIVE_EXP2_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_exp2
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_EXP2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_log.h b/libclc/opencl/include/clc/opencl/math/native_log.h
deleted file mode 100644
index c4bf498738f4a..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_log.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_LOG_H__
-#define __CLC_OPENCL_MATH_NATIVE_LOG_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_log
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_LOG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_log10.h b/libclc/opencl/include/clc/opencl/math/native_log10.h
deleted file mode 100644
index ab61ee3df5c03..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_log10.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_LOG10_H__
-#define __CLC_OPENCL_MATH_NATIVE_LOG10_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_log10
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_LOG10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_log2.h b/libclc/opencl/include/clc/opencl/math/native_log2.h
deleted file mode 100644
index 6ba0d3bf490f0..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_log2.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_LOG2_H__
-#define __CLC_OPENCL_MATH_NATIVE_LOG2_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_log2
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_LOG2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_powr.h b/libclc/opencl/include/clc/opencl/math/native_powr.h
deleted file mode 100644
index 6b63138aa7822..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_powr.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_POWR_H__
-#define __CLC_OPENCL_MATH_NATIVE_POWR_H__
-
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION native_powr
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_POWR_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_recip.h b/libclc/opencl/include/clc/opencl/math/native_recip.h
deleted file mode 100644
index 967eea38d80d9..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_recip.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_RECIP_H__
-#define __CLC_OPENCL_MATH_NATIVE_RECIP_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_recip
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_RECIP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_rsqrt.h b/libclc/opencl/include/clc/opencl/math/native_rsqrt.h
deleted file mode 100644
index 9146df8913720..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_rsqrt.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_RSQRT_H__
-#define __CLC_OPENCL_MATH_NATIVE_RSQRT_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_rsqrt
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_RSQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_sin.h b/libclc/opencl/include/clc/opencl/math/native_sin.h
deleted file mode 100644
index 766b76781a9b7..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_sin.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_SIN_H__
-#define __CLC_OPENCL_MATH_NATIVE_SIN_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_sin
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_SIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_sqrt.h b/libclc/opencl/include/clc/opencl/math/native_sqrt.h
deleted file mode 100644
index 5d44f28db9286..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_sqrt.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_SQRT_H__
-#define __CLC_OPENCL_MATH_NATIVE_SQRT_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_sqrt
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_SQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_tan.h b/libclc/opencl/include/clc/opencl/math/native_tan.h
deleted file mode 100644
index 075aa59757b4b..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/native_tan.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NATIVE_TAN_H__
-#define __CLC_OPENCL_MATH_NATIVE_TAN_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_tan
-#define __CLC_FLOAT_ONLY
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NATIVE_TAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/nextafter.h b/libclc/opencl/include/clc/opencl/math/nextafter.h
deleted file mode 100644
index 6843f29770251..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/nextafter.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_NEXTAFTER_H__
-#define __CLC_OPENCL_MATH_NEXTAFTER_H__
-
-#define __CLC_FUNCTION nextafter
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_NEXTAFTER_H__
diff --git a/libclc/opencl/include/clc/opencl/math/pow.h b/libclc/opencl/include/clc/opencl/math/pow.h
deleted file mode 100644
index ce17b66b541d0..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/pow.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_POW_H__
-#define __CLC_OPENCL_MATH_POW_H__
-
-#define __CLC_FUNCTION pow
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_POW_H__
diff --git a/libclc/opencl/include/clc/opencl/math/pown.h b/libclc/opencl/include/clc/opencl/math/pown.h
deleted file mode 100644
index 24fc298da4f1e..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/pown.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_POWN_H__
-#define __CLC_OPENCL_MATH_POWN_H__
-
-#define __CLC_FUNCTION pown
-#define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_POWN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/powr.h b/libclc/opencl/include/clc/opencl/math/powr.h
deleted file mode 100644
index 6aebc346080f9..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/powr.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_POWR_H__
-#define __CLC_OPENCL_MATH_POWR_H__
-
-#define __CLC_FUNCTION powr
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_POWR_H__
diff --git a/libclc/opencl/include/clc/opencl/math/remainder.h b/libclc/opencl/include/clc/opencl/math/remainder.h
deleted file mode 100644
index d30a315a4ce38..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/remainder.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_REMAINDER_H__
-#define __CLC_OPENCL_MATH_REMAINDER_H__
-
-#define __CLC_FUNCTION remainder
-#define __CLC_BODY <clc/shared/binary_decl.inc>
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_REMAINDER_H__
diff --git a/libclc/opencl/include/clc/opencl/math/remquo.h b/libclc/opencl/include/clc/opencl/math/remquo.h
deleted file mode 100644
index 28fc74c00fd90..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/remquo.h
+++ /dev/null
@@ -1,26 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_REMQUO_H__
-#define __CLC_OPENCL_MATH_REMQUO_H__
-
-#define __CLC_FUNCTION remquo
-
-#define __CLC_BODY <clc/math/remquo_decl.inc>
-#include <clc/math/gentype.inc>
-
-#if _CLC_GENERIC_AS_SUPPORTED
-#define __CLC_BODY <clc/math/remquo_decl.inc>
-#define __CLC_ADDRESS_SPACE generic
-#include <clc/math/gentype.inc>
-#undef __CLC_ADDRESS_SPACE
-#endif
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_REMQUO_H__
diff --git a/libclc/opencl/include/clc/opencl/math/rint.h b/libclc/opencl/include/clc/opencl/math/rint.h
deleted file mode 100644
index ceca56535a864..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/rint.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_RINT_H__
-#define __CLC_OPENCL_MATH_RINT_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION rint
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_RINT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/rootn.h b/libclc/opencl/include/clc/opencl/math/rootn.h
deleted file mode 100644
index 9dce895a3f2d7..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/rootn.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ROOTN_H__
-#define __CLC_OPENCL_MATH_ROOTN_H__
-
-#define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
-#define __CLC_FUNCTION rootn
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ROOTN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/round.h b/libclc/opencl/include/clc/opencl/math/round.h
deleted file mode 100644
index 740ae9241f692..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/round.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_ROUND_H__
-#define __CLC_OPENCL_MATH_ROUND_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION round
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_ROUND_H__
diff --git a/libclc/opencl/include/clc/opencl/math/rsqrt.h b/libclc/opencl/include/clc/opencl/math/rsqrt.h
deleted file mode 100644
index ea141d4bc45bd..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/rsqrt.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_RSQRT_H__
-#define __CLC_OPENCL_MATH_RSQRT_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION rsqrt
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_RSQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sin.h b/libclc/opencl/include/clc/opencl/math/sin.h
deleted file mode 100644
index 60de98de09584..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/sin.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_SIN_H__
-#define __CLC_OPENCL_MATH_SIN_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION sin
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_SIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sincos.h b/libclc/opencl/include/clc/opencl/math/sincos.h
deleted file mode 100644
index 4989bcf21c038..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/sincos.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_SINCOS_H__
-#define __CLC_OPENCL_MATH_SINCOS_H__
-
-#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
-#define __CLC_FUNCTION sincos
-#include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_SINCOS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sinh.h b/libclc/opencl/include/clc/opencl/math/sinh.h
deleted file mode 100644
index 0c9f0985be52b..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/sinh.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_SINH_H__
-#define __CLC_OPENCL_MATH_SINH_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION sinh
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_SINH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sinpi.h b/libclc/opencl/include/clc/opencl/math/sinpi.h
deleted file mode 100644
index a24339f8cf03f..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/sinpi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_SINPI_H__
-#define __CLC_OPENCL_MATH_SINPI_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION sinpi
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_SINPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sqrt.h b/libclc/opencl/include/clc/opencl/math/sqrt.h
deleted file mode 100644
index 41f604f9652dd..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/sqrt.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_SQRT_H__
-#define __CLC_OPENCL_MATH_SQRT_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION sqrt
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_SQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/tan.h b/libclc/opencl/include/clc/opencl/math/tan.h
deleted file mode 100644
index 5c3f5f6a3a417..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/tan.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_TAN_H__
-#define __CLC_OPENCL_MATH_TAN_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION tan
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_TAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/tanh.h b/libclc/opencl/include/clc/opencl/math/tanh.h
deleted file mode 100644
index dce89867f25e0..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/tanh.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_TANH_H__
-#define __CLC_OPENCL_MATH_TANH_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION tanh
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_TANH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/tanpi.h b/libclc/opencl/include/clc/opencl/math/tanpi.h
deleted file mode 100644
index 2a903b9a1fe75..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/tanpi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_TANPI_H__
-#define __CLC_OPENCL_MATH_TANPI_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION tanpi
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_TANPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/tgamma.h b/libclc/opencl/include/clc/opencl/math/tgamma.h
deleted file mode 100644
index 5cb0a7fd48f93..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/tgamma.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_TGAMMA_H__
-#define __CLC_OPENCL_MATH_TGAMMA_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION tgamma
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_TGAMMA_H__
diff --git a/libclc/opencl/include/clc/opencl/math/trunc.h b/libclc/opencl/include/clc/opencl/math/trunc.h
deleted file mode 100644
index ccb60a6a54d6a..0000000000000
--- a/libclc/opencl/include/clc/opencl/math/trunc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MATH_TRUNC_H__
-#define __CLC_OPENCL_MATH_TRUNC_H__
-
-#define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION trunc
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MATH_TRUNC_H__
diff --git a/libclc/opencl/include/clc/opencl/misc/shuffle.h b/libclc/opencl/include/clc/opencl/misc/shuffle.h
deleted file mode 100644
index a1d4b6aa38248..0000000000000
--- a/libclc/opencl/include/clc/opencl/misc/shuffle.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MISC_SHUFFLE_H__
-#define __CLC_OPENCL_MISC_SHUFFLE_H__
-
-#define __CLC_FUNCTION shuffle
-
-// Integer-type decls
-#define __CLC_BODY <clc/misc/shuffle_decl.inc>
-#include <clc/integer/gentype.inc>
-
-// Floating-point decls
-#define __CLC_BODY <clc/misc/shuffle_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MISC_SHUFFLE_H__
diff --git a/libclc/opencl/include/clc/opencl/misc/shuffle2.h b/libclc/opencl/include/clc/opencl/misc/shuffle2.h
deleted file mode 100644
index 0f93a802b3f36..0000000000000
--- a/libclc/opencl/include/clc/opencl/misc/shuffle2.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_MISC_SHUFFLE2_H__
-#define __CLC_OPENCL_MISC_SHUFFLE2_H__
-
-#define __CLC_FUNCTION shuffle2
-
-// Integer-type decls
-#define __CLC_BODY <clc/misc/shuffle2_decl.inc>
-#include <clc/integer/gentype.inc>
-
-// Floating-point decls
-#define __CLC_BODY <clc/misc/shuffle2_decl.inc>
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_MISC_SHUFFLE2_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/all.h b/libclc/opencl/include/clc/opencl/relational/all.h
deleted file mode 100644
index f7f14006309fb..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/all.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ALL_H__
-#define __CLC_OPENCL_RELATIONAL_ALL_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define _CLC_ALL_DECL(TYPE) _CLC_OVERLOAD _CLC_CONST _CLC_DECL int all(TYPE v);
-
-#define _CLC_VECTOR_ALL_DECL(TYPE) \
- _CLC_ALL_DECL(TYPE) \
- _CLC_ALL_DECL(TYPE##2) \
- _CLC_ALL_DECL(TYPE##3) \
- _CLC_ALL_DECL(TYPE##4) \
- _CLC_ALL_DECL(TYPE##8) \
- _CLC_ALL_DECL(TYPE##16)
-
-_CLC_VECTOR_ALL_DECL(char)
-_CLC_VECTOR_ALL_DECL(short)
-_CLC_VECTOR_ALL_DECL(int)
-_CLC_VECTOR_ALL_DECL(long)
-
-#undef _CLC_ALL_DECL
-#undef _CLC_VECTOR_ALL_DECL
-
-#endif // __CLC_OPENCL_RELATIONAL_ALL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/any.h b/libclc/opencl/include/clc/opencl/relational/any.h
deleted file mode 100644
index 7b1ad333cef34..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/any.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ANY_H__
-#define __CLC_OPENCL_RELATIONAL_ANY_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define _CLC_ANY_DECL(TYPE) _CLC_OVERLOAD _CLC_CONST _CLC_DECL int any(TYPE v);
-
-#define _CLC_VECTOR_ANY_DECL(TYPE) \
- _CLC_ANY_DECL(TYPE) \
- _CLC_ANY_DECL(TYPE##2) \
- _CLC_ANY_DECL(TYPE##3) \
- _CLC_ANY_DECL(TYPE##4) \
- _CLC_ANY_DECL(TYPE##8) \
- _CLC_ANY_DECL(TYPE##16)
-
-_CLC_VECTOR_ANY_DECL(char)
-_CLC_VECTOR_ANY_DECL(short)
-_CLC_VECTOR_ANY_DECL(int)
-_CLC_VECTOR_ANY_DECL(long)
-
-#undef _CLC_ANY_DECL
-#undef _CLC_VECTOR_ANY_DECL
-
-#endif // __CLC_OPENCL_RELATIONAL_ANY_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/bitselect.h b/libclc/opencl/include/clc/opencl/relational/bitselect.h
deleted file mode 100644
index 9e967c6e2d642..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/bitselect.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_BITSELECT_H__
-#define __CLC_OPENCL_RELATIONAL_BITSELECT_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_BODY <clc/opencl/relational/bitselect.inc>
-#include <clc/math/gentype.inc>
-#define __CLC_BODY <clc/opencl/relational/bitselect.inc>
-#include <clc/integer/gentype.inc>
-
-#endif // __CLC_OPENCL_RELATIONAL_BITSELECT_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/bitselect.inc b/libclc/opencl/include/clc/opencl/relational/bitselect.inc
deleted file mode 100644
index 429ef372d1214..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/bitselect.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE bitselect(__CLC_GENTYPE x,
- __CLC_GENTYPE y,
- __CLC_GENTYPE z);
diff --git a/libclc/opencl/include/clc/opencl/relational/isequal.h b/libclc/opencl/include/clc/opencl/relational/isequal.h
deleted file mode 100644
index b3dff2e924d2f..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isequal.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISEQUAL_H__
-#define __CLC_OPENCL_RELATIONAL_ISEQUAL_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define _CLC_ISEQUAL_DECL(TYPE, RETTYPE) \
- _CLC_OVERLOAD _CLC_CONST _CLC_DECL RETTYPE isequal(TYPE x, TYPE y);
-
-#define _CLC_VECTOR_ISEQUAL_DECL(TYPE, RETTYPE) \
- _CLC_ISEQUAL_DECL(TYPE##2, RETTYPE##2) \
- _CLC_ISEQUAL_DECL(TYPE##3, RETTYPE##3) \
- _CLC_ISEQUAL_DECL(TYPE##4, RETTYPE##4) \
- _CLC_ISEQUAL_DECL(TYPE##8, RETTYPE##8) \
- _CLC_ISEQUAL_DECL(TYPE##16, RETTYPE##16)
-
-_CLC_ISEQUAL_DECL(float, int)
-_CLC_VECTOR_ISEQUAL_DECL(float, int)
-
-#ifdef cl_khr_fp64
-_CLC_ISEQUAL_DECL(double, int)
-_CLC_VECTOR_ISEQUAL_DECL(double, long)
-#endif
-#ifdef cl_khr_fp16
-_CLC_ISEQUAL_DECL(half, int)
-_CLC_VECTOR_ISEQUAL_DECL(half, short)
-#endif
-
-#undef _CLC_ISEQUAL_DECL
-#undef _CLC_VECTOR_ISEQUAL_DEC
-
-#endif // __CLC_OPENCL_RELATIONAL_ISEQUAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isfinite.h b/libclc/opencl/include/clc/opencl/relational/isfinite.h
deleted file mode 100644
index ff996befa937d..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isfinite.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISFINITE_H__
-#define __CLC_OPENCL_RELATIONAL_ISFINITE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION isfinite
-#define __CLC_BODY <clc/relational/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISFINITE_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isgreater.h b/libclc/opencl/include/clc/opencl/relational/isgreater.h
deleted file mode 100644
index 1885faac0d6d2..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isgreater.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISGREATER_H__
-#define __CLC_OPENCL_RELATIONAL_ISGREATER_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION isgreater
-#define __CLC_BODY <clc/relational/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISGREATER_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h b/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
deleted file mode 100644
index 36def480081bc..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISGREATEREQUAL_H__
-#define __CLC_OPENCL_RELATIONAL_ISGREATEREQUAL_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION isgreaterequal
-#define __CLC_BODY <clc/relational/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISGREATEREQUAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isinf.h b/libclc/opencl/include/clc/opencl/relational/isinf.h
deleted file mode 100644
index 0dd7246a88fea..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isinf.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISINF_H__
-#define __CLC_OPENCL_RELATIONAL_ISINF_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define _CLC_ISINF_DECL(RET_TYPE, ARG_TYPE) \
- _CLC_OVERLOAD _CLC_CONST _CLC_DECL RET_TYPE isinf(ARG_TYPE);
-
-#define _CLC_VECTOR_ISINF_DECL(RET_TYPE, ARG_TYPE) \
- _CLC_ISINF_DECL(RET_TYPE##2, ARG_TYPE##2) \
- _CLC_ISINF_DECL(RET_TYPE##3, ARG_TYPE##3) \
- _CLC_ISINF_DECL(RET_TYPE##4, ARG_TYPE##4) \
- _CLC_ISINF_DECL(RET_TYPE##8, ARG_TYPE##8) \
- _CLC_ISINF_DECL(RET_TYPE##16, ARG_TYPE##16)
-
-_CLC_ISINF_DECL(int, float)
-_CLC_VECTOR_ISINF_DECL(int, float)
-
-#ifdef cl_khr_fp64
-_CLC_ISINF_DECL(int, double)
-_CLC_VECTOR_ISINF_DECL(long, double)
-#endif
-
-#ifdef cl_khr_fp16
-_CLC_ISINF_DECL(int, half)
-_CLC_VECTOR_ISINF_DECL(short, half)
-#endif
-
-#undef _CLC_ISINF_DECL
-#undef _CLC_VECTOR_ISINF_DECL
-
-#endif // __CLC_OPENCL_RELATIONAL_ISINF_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isless.h b/libclc/opencl/include/clc/opencl/relational/isless.h
deleted file mode 100644
index ce516890f19e5..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isless.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISLESS_H__
-#define __CLC_OPENCL_RELATIONAL_ISLESS_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION isless
-#define __CLC_BODY <clc/relational/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISLESS_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/islessequal.h b/libclc/opencl/include/clc/opencl/relational/islessequal.h
deleted file mode 100644
index 571ed13c0ab86..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/islessequal.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISLESSEQUAL_H__
-#define __CLC_OPENCL_RELATIONAL_ISLESSEQUAL_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION islessequal
-#define __CLC_BODY <clc/relational/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISLESSEQUAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/islessgreater.h b/libclc/opencl/include/clc/opencl/relational/islessgreater.h
deleted file mode 100644
index eefd2c41b3469..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/islessgreater.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISLESSGREATER_H__
-#define __CLC_OPENCL_RELATIONAL_ISLESSGREATER_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION islessgreater
-#define __CLC_BODY <clc/relational/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISLESSGREATER_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isnan.h b/libclc/opencl/include/clc/opencl/relational/isnan.h
deleted file mode 100644
index f02ec5d04c64f..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isnan.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISNAN_H__
-#define __CLC_OPENCL_RELATIONAL_ISNAN_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define _CLC_ISNAN_DECL(RET_TYPE, ARG_TYPE) \
- _CLC_OVERLOAD _CLC_CONST _CLC_DECL RET_TYPE isnan(ARG_TYPE);
-
-#define _CLC_VECTOR_ISNAN_DECL(RET_TYPE, ARG_TYPE) \
- _CLC_ISNAN_DECL(RET_TYPE##2, ARG_TYPE##2) \
- _CLC_ISNAN_DECL(RET_TYPE##3, ARG_TYPE##3) \
- _CLC_ISNAN_DECL(RET_TYPE##4, ARG_TYPE##4) \
- _CLC_ISNAN_DECL(RET_TYPE##8, ARG_TYPE##8) \
- _CLC_ISNAN_DECL(RET_TYPE##16, ARG_TYPE##16)
-
-_CLC_ISNAN_DECL(int, float)
-_CLC_VECTOR_ISNAN_DECL(int, float)
-
-#ifdef cl_khr_fp64
-_CLC_ISNAN_DECL(int, double)
-_CLC_VECTOR_ISNAN_DECL(long, double)
-#endif
-
-#ifdef cl_khr_fp16
-_CLC_ISNAN_DECL(int, half)
-_CLC_VECTOR_ISNAN_DECL(short, half)
-#endif
-
-#undef _CLC_ISNAN_DECL
-#undef _CLC_VECTOR_ISNAN_DECL
-
-#endif // __CLC_OPENCL_RELATIONAL_ISNAN_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isnormal.h b/libclc/opencl/include/clc/opencl/relational/isnormal.h
deleted file mode 100644
index 29ef762174f09..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isnormal.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISNORMAL_H__
-#define __CLC_OPENCL_RELATIONAL_ISNORMAL_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION isnormal
-#define __CLC_BODY <clc/relational/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISNORMAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isnotequal.h b/libclc/opencl/include/clc/opencl/relational/isnotequal.h
deleted file mode 100644
index 6670b9946d186..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isnotequal.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISNOTEQUAL_H__
-#define __CLC_OPENCL_RELATIONAL_ISNOTEQUAL_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION isnotequal
-#define __CLC_BODY <clc/relational/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISNOTEQUAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isordered.h b/libclc/opencl/include/clc/opencl/relational/isordered.h
deleted file mode 100644
index 09531ed86721c..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isordered.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISORDERED_H__
-#define __CLC_OPENCL_RELATIONAL_ISORDERED_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION isordered
-#define __CLC_BODY <clc/relational/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISORDERED_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isunordered.h b/libclc/opencl/include/clc/opencl/relational/isunordered.h
deleted file mode 100644
index d1f6dabbe20c3..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/isunordered.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_ISUNORDERED_H__
-#define __CLC_OPENCL_RELATIONAL_ISUNORDERED_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION isunordered
-#define __CLC_BODY <clc/relational/binary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_ISUNORDERED_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/select.h b/libclc/opencl/include/clc/opencl/relational/select.h
deleted file mode 100644
index e4cefd8bcde2e..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/select.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_SELECT_H__
-#define __CLC_OPENCL_RELATIONAL_SELECT_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_SELECT_FN select
-
-#define __CLC_BODY <clc/relational/clc_select_decl.inc>
-#include <clc/math/gentype.inc>
-#define __CLC_BODY <clc/relational/clc_select_decl.inc>
-#include <clc/integer/gentype.inc>
-
-#undef __CLC_SELECT_FN
-
-#endif // __CLC_OPENCL_RELATIONAL_SELECT_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/signbit.h b/libclc/opencl/include/clc/opencl/relational/signbit.h
deleted file mode 100644
index fff6f33508fad..0000000000000
--- a/libclc/opencl/include/clc/opencl/relational/signbit.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_RELATIONAL_SIGNBIT_H__
-#define __CLC_OPENCL_RELATIONAL_SIGNBIT_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define __CLC_FUNCTION signbit
-#define __CLC_BODY <clc/relational/unary_decl.inc>
-
-#include <clc/math/gentype.inc>
-
-#undef __CLC_FUNCTION
-
-#endif // __CLC_OPENCL_RELATIONAL_SIGNBIT_H__
diff --git a/libclc/opencl/include/clc/opencl/shared/clamp.h b/libclc/opencl/include/clc/opencl/shared/clamp.h
deleted file mode 100644
index 4bd365e9dd006..0000000000000
--- a/libclc/opencl/include/clc/opencl/shared/clamp.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_SHARED_CLAMP_H__
-#define __CLC_OPENCL_SHARED_CLAMP_H__
-
-#define __CLC_BODY <clc/opencl/shared/clamp.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/shared/clamp.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_SHARED_CLAMP_H__
diff --git a/libclc/opencl/include/clc/opencl/shared/clamp.inc b/libclc/opencl/include/clc/opencl/shared/clamp.inc
deleted file mode 100644
index 74d2f704fadd9..0000000000000
--- a/libclc/opencl/include/clc/opencl/shared/clamp.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x,
- __CLC_GENTYPE y,
- __CLC_GENTYPE z);
-
-#ifndef __CLC_SCALAR
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x,
- __CLC_SCALAR_GENTYPE y,
- __CLC_SCALAR_GENTYPE z);
-#endif
diff --git a/libclc/opencl/include/clc/opencl/shared/max.h b/libclc/opencl/include/clc/opencl/shared/max.h
deleted file mode 100644
index 512e696885817..0000000000000
--- a/libclc/opencl/include/clc/opencl/shared/max.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_SHARED_MAX_H__
-#define __CLC_OPENCL_SHARED_MAX_H__
-
-#define __CLC_BODY <clc/opencl/shared/max.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/shared/max.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_SHARED_MAX_H__
diff --git a/libclc/opencl/include/clc/opencl/shared/max.inc b/libclc/opencl/include/clc/opencl/shared/max.inc
deleted file mode 100644
index 99c28a7e8cd74..0000000000000
--- a/libclc/opencl/include/clc/opencl/shared/max.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a,
- __CLC_GENTYPE b);
-
-#ifndef __CLC_SCALAR
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a,
- __CLC_SCALAR_GENTYPE b);
-#endif
diff --git a/libclc/opencl/include/clc/opencl/shared/min.h b/libclc/opencl/include/clc/opencl/shared/min.h
deleted file mode 100644
index e20545210dcd2..0000000000000
--- a/libclc/opencl/include/clc/opencl/shared/min.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_SHARED_MIN_H__
-#define __CLC_OPENCL_SHARED_MIN_H__
-
-#define __CLC_BODY <clc/opencl/shared/min.inc>
-#include <clc/integer/gentype.inc>
-
-#define __CLC_BODY <clc/opencl/shared/min.inc>
-#include <clc/math/gentype.inc>
-
-#endif // __CLC_OPENCL_SHARED_MIN_H__
diff --git a/libclc/opencl/include/clc/opencl/shared/min.inc b/libclc/opencl/include/clc/opencl/shared/min.inc
deleted file mode 100644
index ce5d906fe26c7..0000000000000
--- a/libclc/opencl/include/clc/opencl/shared/min.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a,
- __CLC_GENTYPE b);
-
-#ifndef __CLC_SCALAR
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a,
- __CLC_SCALAR_GENTYPE b);
-#endif
diff --git a/libclc/opencl/include/clc/opencl/shared/vload.h b/libclc/opencl/include/clc/opencl/shared/vload.h
deleted file mode 100644
index 2ec087d4f3c18..0000000000000
--- a/libclc/opencl/include/clc/opencl/shared/vload.h
+++ /dev/null
@@ -1,88 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_SHARED_VLOAD_H__
-#define __CLC_OPENCL_SHARED_VLOAD_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, VEC_TYPE, WIDTH, ADDR_SPACE) \
- _CLC_OVERLOAD _CLC_DECL VEC_TYPE vload##SUFFIX##WIDTH( \
- size_t offset, const ADDR_SPACE MEM_TYPE *x);
-
-#define _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, ADDR_SPACE) \
- _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##2, 2, ADDR_SPACE) \
- _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##3, 3, ADDR_SPACE) \
- _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##4, 4, ADDR_SPACE) \
- _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##8, 8, ADDR_SPACE) \
- _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##16, 16, ADDR_SPACE)
-
-#if _CLC_GENERIC_AS_SUPPORTED
-#define _CLC_VECTOR_VLOAD_GENERIC_DECL _CLC_VECTOR_VLOAD_DECL
-#else
-// The generic address space isn't available, so make the macro do nothing
-#define _CLC_VECTOR_VLOAD_GENERIC_DECL(X, Y, Z, W)
-#endif
-
-#define _CLC_VECTOR_VLOAD_PRIM3(SUFFIX, MEM_TYPE, PRIM_TYPE) \
- _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __private) \
- _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __local) \
- _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __constant) \
- _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __global) \
- _CLC_VECTOR_VLOAD_GENERIC_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __generic)
-
-#define _CLC_VECTOR_VLOAD_PRIM1(PRIM_TYPE) \
- _CLC_VECTOR_VLOAD_PRIM3(, PRIM_TYPE, PRIM_TYPE)
-
-// Declare vector load prototypes
-_CLC_VECTOR_VLOAD_PRIM1(char)
-_CLC_VECTOR_VLOAD_PRIM1(uchar)
-_CLC_VECTOR_VLOAD_PRIM1(short)
-_CLC_VECTOR_VLOAD_PRIM1(ushort)
-_CLC_VECTOR_VLOAD_PRIM1(int)
-_CLC_VECTOR_VLOAD_PRIM1(uint)
-_CLC_VECTOR_VLOAD_PRIM1(long)
-_CLC_VECTOR_VLOAD_PRIM1(ulong)
-_CLC_VECTOR_VLOAD_PRIM1(float)
-_CLC_VECTOR_VLOAD_PRIM3(_half, half, float)
-// Use suffix to declare aligned vloada_halfN
-_CLC_VECTOR_VLOAD_PRIM3(a_half, half, float)
-
-#ifdef cl_khr_fp64
-#pragma OPENCL EXTENSION cl_khr_fp64 : enable
-_CLC_VECTOR_VLOAD_PRIM1(double)
-#endif
-#ifdef cl_khr_fp16
-#pragma OPENCL EXTENSION cl_khr_fp16 : enable
-_CLC_VECTOR_VLOAD_PRIM1(half)
-#endif
-
-// Scalar vload_half also needs to be declared
-_CLC_VLOAD_DECL(_half, half, float, , __constant)
-_CLC_VLOAD_DECL(_half, half, float, , __global)
-_CLC_VLOAD_DECL(_half, half, float, , __local)
-_CLC_VLOAD_DECL(_half, half, float, , __private)
-
-// Scalar vloada_half is not part of the specs but CTS expects it
-_CLC_VLOAD_DECL(a_half, half, float, , __constant)
-_CLC_VLOAD_DECL(a_half, half, float, , __global)
-_CLC_VLOAD_DECL(a_half, half, float, , __local)
-_CLC_VLOAD_DECL(a_half, half, float, , __private)
-
-#if _CLC_GENERIC_AS_SUPPORTED
-_CLC_VLOAD_DECL(_half, half, float, , __generic)
-_CLC_VLOAD_DECL(a_half, half, float, , __generic)
-#endif
-
-#undef _CLC_VLOAD_DECL
-#undef _CLC_VECTOR_VLOAD_DECL
-#undef _CLC_VECTOR_VLOAD_PRIM3
-#undef _CLC_VECTOR_VLOAD_PRIM1
-#undef _CLC_VECTOR_VLOAD_GENERIC_DECL
-
-#endif // __CLC_OPENCL_SHARED_VLOAD_H__
diff --git a/libclc/opencl/include/clc/opencl/shared/vstore.h b/libclc/opencl/include/clc/opencl/shared/vstore.h
deleted file mode 100644
index 00eaff41f77fb..0000000000000
--- a/libclc/opencl/include/clc/opencl/shared/vstore.h
+++ /dev/null
@@ -1,91 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_SHARED_VSTORE_H__
-#define __CLC_OPENCL_SHARED_VSTORE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-#define _CLC_VSTORE_DECL(SUFFIX, PRIM_TYPE, VEC_TYPE, WIDTH, ADDR_SPACE, RND) \
- _CLC_OVERLOAD _CLC_DECL void vstore##SUFFIX##WIDTH##RND( \
- VEC_TYPE vec, size_t offset, ADDR_SPACE PRIM_TYPE *out);
-
-#define _CLC_VECTOR_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, ADDR_SPACE, RND) \
- _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##2, 2, ADDR_SPACE, RND) \
- _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##3, 3, ADDR_SPACE, RND) \
- _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##4, 4, ADDR_SPACE, RND) \
- _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##8, 8, ADDR_SPACE, RND) \
- _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##16, 16, ADDR_SPACE, RND)
-
-#if _CLC_GENERIC_AS_SUPPORTED
-#define _CLC_VSTORE_GENERIC_DECL _CLC_VSTORE_DECL
-#define _CLC_VECTOR_VSTORE_GENERIC_DECL _CLC_VECTOR_VSTORE_DECL
-#else
-// The generic address space isn't available, so make the macros do nothing
-#define _CLC_VSTORE_GENERIC_DECL(X, Y, Z, W, V, U)
-#define _CLC_VECTOR_VSTORE_GENERIC_DECL(X, Y, Z, W, V)
-#endif
-
-#define _CLC_VECTOR_VSTORE_PRIM3(SUFFIX, MEM_TYPE, PRIM_TYPE, RND) \
- _CLC_VECTOR_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __private, RND) \
- _CLC_VECTOR_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __local, RND) \
- _CLC_VECTOR_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __global, RND) \
- _CLC_VECTOR_VSTORE_GENERIC_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __generic, RND)
-
-#define _CLC_VECTOR_VSTORE_PRIM1(PRIM_TYPE) \
- _CLC_VECTOR_VSTORE_PRIM3(, PRIM_TYPE, PRIM_TYPE, )
-
-#define _CLC_VECTOR_VSTORE_HALF_PRIM1(PRIM_TYPE, RND) \
- _CLC_VSTORE_DECL(_half, half, PRIM_TYPE, , __private, RND) \
- _CLC_VSTORE_DECL(_half, half, PRIM_TYPE, , __local, RND) \
- _CLC_VSTORE_DECL(_half, half, PRIM_TYPE, , __global, RND) \
- _CLC_VSTORE_GENERIC_DECL(_half, half, PRIM_TYPE, , __generic, RND) \
- _CLC_VECTOR_VSTORE_PRIM3(_half, half, PRIM_TYPE, RND) \
- _CLC_VSTORE_DECL(a_half, half, PRIM_TYPE, , __private, RND) \
- _CLC_VSTORE_DECL(a_half, half, PRIM_TYPE, , __local, RND) \
- _CLC_VSTORE_DECL(a_half, half, PRIM_TYPE, , __global, RND) \
- _CLC_VSTORE_GENERIC_DECL(a_half, half, PRIM_TYPE, , __generic, RND) \
- _CLC_VECTOR_VSTORE_PRIM3(a_half, half, PRIM_TYPE, RND)
-
-_CLC_VECTOR_VSTORE_PRIM1(char)
-_CLC_VECTOR_VSTORE_PRIM1(uchar)
-_CLC_VECTOR_VSTORE_PRIM1(short)
-_CLC_VECTOR_VSTORE_PRIM1(ushort)
-_CLC_VECTOR_VSTORE_PRIM1(int)
-_CLC_VECTOR_VSTORE_PRIM1(uint)
-_CLC_VECTOR_VSTORE_PRIM1(long)
-_CLC_VECTOR_VSTORE_PRIM1(ulong)
-_CLC_VECTOR_VSTORE_PRIM1(float)
-
-_CLC_VECTOR_VSTORE_HALF_PRIM1(float, )
-_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtz)
-_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtn)
-_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtp)
-_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rte)
-
-#ifdef cl_khr_fp64
-_CLC_VECTOR_VSTORE_PRIM1(double)
-_CLC_VECTOR_VSTORE_HALF_PRIM1(double, )
-_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtz)
-_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtn)
-_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtp)
-_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rte)
-#endif
-
-#ifdef cl_khr_fp16
-_CLC_VECTOR_VSTORE_PRIM1(half)
-#endif
-
-#undef _CLC_VSTORE_DECL
-#undef _CLC_VSTORE_GENERIC_DECL
-#undef _CLC_VECTOR_VSTORE_DECL
-#undef _CLC_VECTOR_VSTORE_PRIM3
-#undef _CLC_VECTOR_VSTORE_PRIM1
-#undef _CLC_VECTOR_VSTORE_GENERIC_DECL
-
-#endif // __CLC_OPENCL_SHARED_VSTORE_H__
diff --git a/libclc/opencl/include/clc/opencl/synchronization/barrier.h b/libclc/opencl/include/clc/opencl/synchronization/barrier.h
deleted file mode 100644
index 54295b9035ae8..0000000000000
--- a/libclc/opencl/include/clc/opencl/synchronization/barrier.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_SYNCHRONIZATION_BARRIER_H__
-#define __CLC_OPENCL_SYNCHRONIZATION_BARRIER_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_DECL _CLC_OVERLOAD void barrier(cl_mem_fence_flags flags);
-
-#endif // __CLC_OPENCL_SYNCHRONIZATION_BARRIER_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_global_id.h b/libclc/opencl/include/clc/opencl/workitem/get_global_id.h
deleted file mode 100644
index d64da9d2cc643..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_global_id.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_GLOBAL_ID_H__
-#define __CLC_OPENCL_WORKITEM_GET_GLOBAL_ID_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_global_id(uint dim);
-
-#endif // __CLC_OPENCL_WORKITEM_GET_GLOBAL_ID_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_global_offset.h b/libclc/opencl/include/clc/opencl/workitem/get_global_offset.h
deleted file mode 100644
index ac9704e274f2d..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_global_offset.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_GLOBAL_OFFSET_H__
-#define __CLC_OPENCL_WORKITEM_GET_GLOBAL_OFFSET_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_global_offset(uint dim);
-
-#endif // __CLC_OPENCL_WORKITEM_GET_GLOBAL_OFFSET_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_global_size.h b/libclc/opencl/include/clc/opencl/workitem/get_global_size.h
deleted file mode 100644
index 4809cc4b37712..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_global_size.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_GLOBAL_SIZE_H__
-#define __CLC_OPENCL_WORKITEM_GET_GLOBAL_SIZE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_global_size(uint dim);
-
-#endif // __CLC_OPENCL_WORKITEM_GET_GLOBAL_SIZE_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_group_id.h b/libclc/opencl/include/clc/opencl/workitem/get_group_id.h
deleted file mode 100644
index e3d8b07e4ad9a..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_group_id.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_GROUP_ID_H__
-#define __CLC_OPENCL_WORKITEM_GET_GROUP_ID_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_group_id(uint dim);
-
-#endif // __CLC_OPENCL_WORKITEM_GET_GROUP_ID_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_local_id.h b/libclc/opencl/include/clc/opencl/workitem/get_local_id.h
deleted file mode 100644
index 88fbad98dfb19..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_local_id.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_LOCAL_ID_H__
-#define __CLC_OPENCL_WORKITEM_GET_LOCAL_ID_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_local_id(uint dim);
-
-#endif // __CLC_OPENCL_WORKITEM_GET_LOCAL_ID_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_local_linear_id.h b/libclc/opencl/include/clc/opencl/workitem/get_local_linear_id.h
deleted file mode 100644
index 072318d1786f1..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_local_linear_id.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_LOCAL_LINEAR_ID_H__
-#define __CLC_OPENCL_WORKITEM_GET_LOCAL_LINEAR_ID_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_local_linear_id();
-
-#endif // __CLC_OPENCL_WORKITEM_GET_LOCAL_LINEAR_ID_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_local_size.h b/libclc/opencl/include/clc/opencl/workitem/get_local_size.h
deleted file mode 100644
index 49077afde34fd..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_local_size.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_LOCAL_SIZE_H__
-#define __CLC_OPENCL_WORKITEM_GET_LOCAL_SIZE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_local_size(uint dim);
-
-#endif // __CLC_OPENCL_WORKITEM_GET_LOCAL_SIZE_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_max_sub_group_size.h b/libclc/opencl/include/clc/opencl/workitem/get_max_sub_group_size.h
deleted file mode 100644
index b12737618c64b..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_max_sub_group_size.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_MAX_SUB_GROUP_SIZE_H__
-#define __CLC_OPENCL_WORKITEM_GET_MAX_SUB_GROUP_SIZE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_max_sub_group_size();
-
-#endif // __CLC_OPENCL_WORKITEM_GET_MAX_SUB_GROUP_SIZE_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_num_groups.h b/libclc/opencl/include/clc/opencl/workitem/get_num_groups.h
deleted file mode 100644
index 29783169415ff..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_num_groups.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_NUM_GROUPS_H__
-#define __CLC_OPENCL_WORKITEM_GET_NUM_GROUPS_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_num_groups(uint dim);
-
-#endif // __CLC_OPENCL_WORKITEM_GET_NUM_GROUPS_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_num_sub_groups.h b/libclc/opencl/include/clc/opencl/workitem/get_num_sub_groups.h
deleted file mode 100644
index f9fd2cddbf196..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_num_sub_groups.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_NUM_SUB_GROUPS_H__
-#define __CLC_OPENCL_WORKITEM_GET_NUM_SUB_GROUPS_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_num_sub_groups();
-
-#endif // __CLC_OPENCL_WORKITEM_GET_NUM_SUB_GROUPS_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_id.h b/libclc/opencl/include/clc/opencl/workitem/get_sub_group_id.h
deleted file mode 100644
index 0a67c022a5131..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_id.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_SUB_GROUP_ID_H__
-#define __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_ID_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_sub_group_id();
-
-#endif // __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_ID_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_local_id.h b/libclc/opencl/include/clc/opencl/workitem/get_sub_group_local_id.h
deleted file mode 100644
index 37891d8f28304..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_local_id.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_SUB_GROUP_LOCAL_ID_H__
-#define __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_LOCAL_ID_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_sub_group_local_id();
-
-#endif // __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_LOCAL_ID_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_size.h b/libclc/opencl/include/clc/opencl/workitem/get_sub_group_size.h
deleted file mode 100644
index 74e9b033fd07f..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_size.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_SUB_GROUP_SIZE_H__
-#define __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_SIZE_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_sub_group_size();
-
-#endif // __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_SIZE_H__
diff --git a/libclc/opencl/include/clc/opencl/workitem/get_work_dim.h b/libclc/opencl/include/clc/opencl/workitem/get_work_dim.h
deleted file mode 100644
index 344ffaa43e108..0000000000000
--- a/libclc/opencl/include/clc/opencl/workitem/get_work_dim.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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_WORKITEM_GET_WORK_DIM_H__
-#define __CLC_OPENCL_WORKITEM_GET_WORK_DIM_H__
-
-#include <clc/opencl/opencl-base.h>
-
-_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_work_dim(void);
-
-#endif // __CLC_OPENCL_WORKITEM_GET_WORK_DIM_H__
diff --git a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl
index 8f9b47978c6af..b450530c7dde5 100644
--- a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl
+++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_size.h>
+#include <clc/opencl/opencl-base.h>
#if __clang_major__ >= 8
#define CONST_AS __constant
diff --git a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl
index fd30e6ab7a47c..6f92d9759a220 100644
--- a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl
+++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_local_size.h>
+#include <clc/opencl/opencl-base.h>
#if __clang_major__ >= 8
#define CONST_AS __constant
diff --git a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl
index a88dae97c7958..0d03689feb9ba 100644
--- a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl
+++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl
@@ -6,9 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_size.h>
-#include <clc/opencl/workitem/get_local_size.h>
-#include <clc/opencl/workitem/get_num_groups.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF _CLC_OVERLOAD size_t get_num_groups(uint dim) {
size_t global_size = get_global_size(dim);
diff --git a/libclc/opencl/lib/amdgcn/mem_fence/fence.cl b/libclc/opencl/lib/amdgcn/mem_fence/fence.cl
index 963380761b46c..7e5d97bc6de62 100644
--- a/libclc/opencl/lib/amdgcn/mem_fence/fence.cl
+++ b/libclc/opencl/lib/amdgcn/mem_fence/fence.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/mem_fence/clc_mem_fence.h>
-#include <clc/opencl/explicit_fence/explicit_memory_fence.h>
#include <clc/opencl/synchronization/utils.h>
_CLC_DEF _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags) {
diff --git a/libclc/opencl/lib/amdgcn/synchronization/barrier.cl b/libclc/opencl/lib/amdgcn/synchronization/barrier.cl
index dd7d1507f5ad4..9f67b6ebcb6db 100644
--- a/libclc/opencl/lib/amdgcn/synchronization/barrier.cl
+++ b/libclc/opencl/lib/amdgcn/synchronization/barrier.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/synchronization/barrier.h>
#include <clc/opencl/synchronization/utils.h>
#include <clc/synchronization/clc_work_group_barrier.h>
diff --git a/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl b/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl
index 68a37f5f8f851..7338f140ab084 100644
--- a/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl
+++ b/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_offset.h>
#include <clc/workitem/clc_get_global_offset.h>
_CLC_DEF _CLC_OVERLOAD size_t get_global_offset(uint dim) {
diff --git a/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl b/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl
index 94dd886ea8399..eca7199a766fc 100644
--- a/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl
+++ b/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_size.h>
#include <clc/workitem/clc_get_global_size.h>
_CLC_DEF _CLC_OVERLOAD size_t get_global_size(uint dim) {
diff --git a/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl b/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl
index fb466aa125ebd..24b61c7488d3c 100644
--- a/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl
+++ b/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_group_id.h>
#include <clc/workitem/clc_get_group_id.h>
_CLC_DEF _CLC_OVERLOAD size_t get_group_id(uint dim) {
diff --git a/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl b/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl
index bdaf202ac09f7..dc51a3557211e 100644
--- a/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl
+++ b/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_local_id.h>
#include <clc/workitem/clc_get_local_id.h>
_CLC_DEF _CLC_OVERLOAD size_t get_local_id(uint dim) {
diff --git a/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl b/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl
index aeaa383ce22f4..8aa24201de573 100644
--- a/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl
+++ b/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_local_size.h>
+#include <clc/opencl/opencl-base.h>
uint __clc_amdgcn_get_local_size_x(void) __asm("llvm.r600.read.local.size.x");
uint __clc_amdgcn_get_local_size_y(void) __asm("llvm.r600.read.local.size.y");
diff --git a/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl b/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl
index 3d602fb821dcd..11c1ba373aeff 100644
--- a/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl
+++ b/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_num_groups.h>
+#include <clc/opencl/opencl-base.h>
uint __clc_amdgcn_get_num_groups_x(void) __asm("llvm.r600.read.ngroups.x");
uint __clc_amdgcn_get_num_groups_y(void) __asm("llvm.r600.read.ngroups.y");
diff --git a/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl b/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl
index d3477a5e957bc..c59432a0038e4 100644
--- a/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl
+++ b/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_work_dim.h>
#include <clc/workitem/clc_get_work_dim.h>
_CLC_DEF _CLC_OVERLOAD uint get_work_dim() { return __clc_get_work_dim(); }
diff --git a/libclc/opencl/lib/clspv/math/fma.cl b/libclc/opencl/lib/clspv/math/fma.cl
index 0e328903ba263..172ec32b8a3b3 100644
--- a/libclc/opencl/lib/clspv/math/fma.cl
+++ b/libclc/opencl/lib/clspv/math/fma.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/internal/math/clc_sw_fma.h>
-#include <clc/opencl/math/fma.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION fma
diff --git a/libclc/opencl/lib/clspv/shared/vstore_half.cl b/libclc/opencl/lib/clspv/shared/vstore_half.cl
index b5f0ae75c6d7a..600bbca348423 100644
--- a/libclc/opencl/lib/clspv/shared/vstore_half.cl
+++ b/libclc/opencl/lib/clspv/shared/vstore_half.cl
@@ -7,13 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/float/definitions.h>
-#include <clc/opencl/math/copysign.h>
-#include <clc/opencl/math/fabs.h>
-#include <clc/opencl/math/nextafter.h>
-#include <clc/opencl/relational/isinf.h>
-#include <clc/opencl/relational/isnan.h>
-#include <clc/opencl/shared/min.h>
-#include <clc/opencl/shared/vstore.h>
+#include <clc/opencl/opencl-base.h>
#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable
diff --git a/libclc/opencl/lib/generic/async/async_work_group_copy.cl b/libclc/opencl/lib/generic/async/async_work_group_copy.cl
index 67eadf5e2569a..787b9f8649512 100644
--- a/libclc/opencl/lib/generic/async/async_work_group_copy.cl
+++ b/libclc/opencl/lib/generic/async/async_work_group_copy.cl
@@ -6,8 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/async/async_work_group_copy.h>
-#include <clc/opencl/async/async_work_group_strided_copy.h>
+#include <clc/opencl/opencl-base.h>
#define __CLC_BODY <async_work_group_copy.inc>
#include <clc/integer/gentype.inc>
diff --git a/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl b/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl
index 2c17e2a685e8a..cfb69f26cf5e3 100644
--- a/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl
+++ b/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl
@@ -6,9 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/async/async_work_group_strided_copy.h>
-#include <clc/opencl/workitem/get_local_id.h>
-#include <clc/opencl/workitem/get_local_size.h>
+#include <clc/opencl/opencl-base.h>
#define __CLC_BODY <async_work_group_strided_copy.inc>
#include <clc/integer/gentype.inc>
diff --git a/libclc/opencl/lib/generic/async/prefetch.cl b/libclc/opencl/lib/generic/async/prefetch.cl
index 8ab2101205868..ec7a2e5469e54 100644
--- a/libclc/opencl/lib/generic/async/prefetch.cl
+++ b/libclc/opencl/lib/generic/async/prefetch.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/async/clc_prefetch.h>
-#include <clc/opencl/async/prefetch.h>
#define __CLC_BODY <prefetch.inc>
#include <clc/integer/gentype.inc>
diff --git a/libclc/opencl/lib/generic/async/wait_group_events.cl b/libclc/opencl/lib/generic/async/wait_group_events.cl
index 00b8ddf3342fb..5bce5cdf7aacb 100644
--- a/libclc/opencl/lib/generic/async/wait_group_events.cl
+++ b/libclc/opencl/lib/generic/async/wait_group_events.cl
@@ -6,8 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/async/wait_group_events.h>
-#include <clc/opencl/synchronization/barrier.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF _CLC_OVERLOAD void wait_group_events(int num_events,
event_t *event_list) {
diff --git a/libclc/opencl/lib/generic/atomic/atom_add.cl b/libclc/opencl/lib/generic/atomic/atom_add.cl
index 1628ea39de434..92df57576d1d0 100644
--- a/libclc/opencl/lib/generic/atomic/atom_add.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_add.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_add.h>
-#include <clc/opencl/atomic/atom_add.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_and.cl b/libclc/opencl/lib/generic/atomic/atom_and.cl
index bad85046c12e5..c09f10145bb30 100644
--- a/libclc/opencl/lib/generic/atomic/atom_and.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_and.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_and.h>
-#include <clc/opencl/atomic/atom_and.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl b/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl
index 41ae9328e9480..9ad3be5a6fe66 100644
--- a/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_compare_exchange.h>
-#include <clc/opencl/atomic/atom_cmpxchg.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_dec.cl b/libclc/opencl/lib/generic/atomic/atom_dec.cl
index 1f81f1d37b510..1f683b19b21cd 100644
--- a/libclc/opencl/lib/generic/atomic/atom_dec.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_dec.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_dec.h>
-#include <clc/opencl/atomic/atom_dec.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_inc.cl b/libclc/opencl/lib/generic/atomic/atom_inc.cl
index 5ae5bbb67e791..a81c913dae426 100644
--- a/libclc/opencl/lib/generic/atomic/atom_inc.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_inc.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_inc.h>
-#include <clc/opencl/atomic/atom_inc.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_max.cl b/libclc/opencl/lib/generic/atomic/atom_max.cl
index 249f5efbd4491..df39b1566de65 100644
--- a/libclc/opencl/lib/generic/atomic/atom_max.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_max.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_max.h>
-#include <clc/opencl/atomic/atom_max.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_min.cl b/libclc/opencl/lib/generic/atomic/atom_min.cl
index 029c601dd53af..bbeb727a712fc 100644
--- a/libclc/opencl/lib/generic/atomic/atom_min.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_min.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_min.h>
-#include <clc/opencl/atomic/atom_min.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_or.cl b/libclc/opencl/lib/generic/atomic/atom_or.cl
index 91f745bdda61a..54fc99e67cbf3 100644
--- a/libclc/opencl/lib/generic/atomic/atom_or.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_or.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_or.h>
-#include <clc/opencl/atomic/atom_or.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_sub.cl b/libclc/opencl/lib/generic/atomic/atom_sub.cl
index 7eeabd51dad48..10ece67cdf925 100644
--- a/libclc/opencl/lib/generic/atomic/atom_sub.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_sub.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_sub.h>
-#include <clc/opencl/atomic/atom_sub.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_xchg.cl b/libclc/opencl/lib/generic/atomic/atom_xchg.cl
index 770e4366de834..1888130b34ef3 100644
--- a/libclc/opencl/lib/generic/atomic/atom_xchg.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_xchg.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_exchange.h>
-#include <clc/opencl/atomic/atom_xchg.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atom_xor.cl b/libclc/opencl/lib/generic/atomic/atom_xor.cl
index 3fcf54e1c8832..abb10b43ef33b 100644
--- a/libclc/opencl/lib/generic/atomic/atom_xor.cl
+++ b/libclc/opencl/lib/generic/atomic/atom_xor.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_xor.h>
-#include <clc/opencl/atomic/atom_xor.h>
// Non-volatile overloads are for backward compatibility with OpenCL 1.0.
diff --git a/libclc/opencl/lib/generic/atomic/atomic_add.cl b/libclc/opencl/lib/generic/atomic/atomic_add.cl
index 2f6606eb33338..5eb459d0c9d60 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_add.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_add.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_add.h>
-#include <clc/opencl/atomic/atomic_add.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_add(volatile AS TYPE *p, TYPE val) { \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_and.cl b/libclc/opencl/lib/generic/atomic/atomic_and.cl
index 3bb1f7a6af273..3b7ecacee15e5 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_and.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_and.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_and.h>
-#include <clc/opencl/atomic/atomic_and.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_and(volatile AS TYPE *p, TYPE val) { \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl b/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl
index 135813b8b879c..40fb2f84e49dd 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_compare_exchange.h>
-#include <clc/opencl/atomic/atomic_cmpxchg.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_cmpxchg(volatile AS TYPE *p, TYPE cmp, \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_strong.cl b/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_strong.cl
index f113e82285a02..9311a0d4a379c 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_strong.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_strong.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_compare_exchange.h>
-#include <clc/opencl/atomic/atomic_compare_exchange_strong.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_compare_exchange_strong
diff --git a/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_weak.cl b/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_weak.cl
index f5c2899bb18ed..1f0e7259b0c94 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_weak.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_weak.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_compare_exchange.h>
-#include <clc/opencl/atomic/atomic_compare_exchange_weak.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_compare_exchange_weak
diff --git a/libclc/opencl/lib/generic/atomic/atomic_dec.cl b/libclc/opencl/lib/generic/atomic/atomic_dec.cl
index ee38267723369..1ae3aa991367e 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_dec.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_dec.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_dec.h>
-#include <clc/opencl/atomic/atomic_dec.h>
#define __CLC_FUNCTION atomic_dec
#define __CLC_IMPL_FUNCTION __clc_atomic_dec
diff --git a/libclc/opencl/lib/generic/atomic/atomic_exchange.cl b/libclc/opencl/lib/generic/atomic/atomic_exchange.cl
index f7568f6ace38c..b023b1ce18e61 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_exchange.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_exchange.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_exchange.h>
-#include <clc/opencl/atomic/atomic_exchange.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_exchange
diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl
index d27cc7120ccce..428ac19830f7f 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_add.h>
-#include <clc/opencl/atomic/atomic_fetch_add.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_fetch_add
diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_and.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_and.cl
index b8531722911cf..286f97ee1e432 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_fetch_and.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_and.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_and.h>
-#include <clc/opencl/atomic/atomic_fetch_and.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_fetch_and
diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_max.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_max.cl
index b644ca336437a..e9fc0a83ceb4d 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_fetch_max.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_max.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_max.h>
-#include <clc/opencl/atomic/atomic_fetch_max.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_fetch_max
diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_min.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_min.cl
index f24fcf329b6f2..df7dac6c5b222 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_fetch_min.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_min.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_min.h>
-#include <clc/opencl/atomic/atomic_fetch_min.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_fetch_min
diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_or.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_or.cl
index 1f6fe4cac090a..bf4af8412c33c 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_fetch_or.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_or.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_or.h>
-#include <clc/opencl/atomic/atomic_fetch_or.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_fetch_or
diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl
index 94323a2c0fcb6..474aca6658014 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_sub.h>
-#include <clc/opencl/atomic/atomic_fetch_sub.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_fetch_sub
diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_xor.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_xor.cl
index 13e1db1124f9a..81302e54d5caa 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_fetch_xor.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_xor.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_xor.h>
-#include <clc/opencl/atomic/atomic_fetch_xor.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_fetch_xor
diff --git a/libclc/opencl/lib/generic/atomic/atomic_flag_clear.cl b/libclc/opencl/lib/generic/atomic/atomic_flag_clear.cl
index c9f944903f831..28b0101e77972 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_flag_clear.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_flag_clear.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_flag_clear.h>
-#include <clc/opencl/atomic/atomic_flag_clear.h>
#include <clc/opencl/utils.h>
#if defined(__opencl_c_atomic_order_seq_cst) && \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_flag_test_and_set.cl b/libclc/opencl/lib/generic/atomic/atomic_flag_test_and_set.cl
index e58079ee226a1..c5a346cf423c9 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_flag_test_and_set.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_flag_test_and_set.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_flag_test_and_set.h>
-#include <clc/opencl/atomic/atomic_flag_test_and_set.h>
#include <clc/opencl/utils.h>
#if defined(__opencl_c_atomic_order_seq_cst) && \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_inc.cl b/libclc/opencl/lib/generic/atomic/atomic_inc.cl
index 7cf82b25a0d43..a408087bc0e32 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_inc.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_inc.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_inc.h>
-#include <clc/opencl/atomic/atomic_inc.h>
#define __CLC_FUNCTION atomic_inc
#define __CLC_IMPL_FUNCTION __clc_atomic_inc
diff --git a/libclc/opencl/lib/generic/atomic/atomic_init.cl b/libclc/opencl/lib/generic/atomic/atomic_init.cl
index b688d9b04da74..5255ab1f46c13 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_init.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_init.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/atomic/atomic_init.h>
#include <clc/opencl/utils.h>
#define __CLC_ATOMIC_GENTYPE __CLC_XCONCAT(atomic_, __CLC_GENTYPE)
diff --git a/libclc/opencl/lib/generic/atomic/atomic_load.cl b/libclc/opencl/lib/generic/atomic/atomic_load.cl
index 1b93ce84ea863..9a5d5c92d599d 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_load.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_load.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_load.h>
-#include <clc/opencl/atomic/atomic_load.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_load
diff --git a/libclc/opencl/lib/generic/atomic/atomic_max.cl b/libclc/opencl/lib/generic/atomic/atomic_max.cl
index fe0efdbb55c82..c9f92b7dfc082 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_max.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_max.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_max.h>
-#include <clc/opencl/atomic/atomic_max.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_max(volatile AS TYPE *p, TYPE val) { \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_min.cl b/libclc/opencl/lib/generic/atomic/atomic_min.cl
index 6a4586b5d26b6..a1954a558ef10 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_min.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_min.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_min.h>
-#include <clc/opencl/atomic/atomic_min.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_min(volatile AS TYPE *p, TYPE val) { \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_or.cl b/libclc/opencl/lib/generic/atomic/atomic_or.cl
index 1720b66b87fff..2ed4f058d5b66 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_or.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_or.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_or.h>
-#include <clc/opencl/atomic/atomic_or.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_or(volatile AS TYPE *p, TYPE val) { \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_store.cl b/libclc/opencl/lib/generic/atomic/atomic_store.cl
index fcaa4d3128f7d..5c348248b93ea 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_store.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_store.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_store.h>
-#include <clc/opencl/atomic/atomic_store.h>
#include <clc/opencl/utils.h>
#define __CLC_FUNCTION atomic_store
diff --git a/libclc/opencl/lib/generic/atomic/atomic_sub.cl b/libclc/opencl/lib/generic/atomic/atomic_sub.cl
index ddb7cc29d3bb0..b722d5ceed2de 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_sub.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_sub.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_sub.h>
-#include <clc/opencl/atomic/atomic_sub.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_sub(volatile AS TYPE *p, TYPE val) { \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_xchg.cl b/libclc/opencl/lib/generic/atomic/atomic_xchg.cl
index 8e0b87cc9343c..08dbbad0628f2 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_xchg.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_xchg.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_exchange.h>
-#include <clc/opencl/atomic/atomic_xchg.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_xchg(volatile AS TYPE *p, TYPE val) { \
diff --git a/libclc/opencl/lib/generic/atomic/atomic_xor.cl b/libclc/opencl/lib/generic/atomic/atomic_xor.cl
index 46dc6c3e9111f..7279f4437d7c5 100644
--- a/libclc/opencl/lib/generic/atomic/atomic_xor.cl
+++ b/libclc/opencl/lib/generic/atomic/atomic_xor.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/atomic/clc_atomic_fetch_xor.h>
-#include <clc/opencl/atomic/atomic_xor.h>
#define __CLC_IMPL(TYPE, AS) \
_CLC_OVERLOAD _CLC_DEF TYPE atomic_xor(volatile AS TYPE *p, TYPE val) { \
diff --git a/libclc/opencl/lib/generic/common/degrees.cl b/libclc/opencl/lib/generic/common/degrees.cl
index 15b85af997b4d..d0f692cc320fa 100644
--- a/libclc/opencl/lib/generic/common/degrees.cl
+++ b/libclc/opencl/lib/generic/common/degrees.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/common/clc_degrees.h>
-#include <clc/opencl/common/degrees.h>
#define __CLC_FUNCTION degrees
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/common/mix.cl b/libclc/opencl/lib/generic/common/mix.cl
index 014cc1a742f1c..2963ee62c3493 100644
--- a/libclc/opencl/lib/generic/common/mix.cl
+++ b/libclc/opencl/lib/generic/common/mix.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_mad.h>
-#include <clc/opencl/common/mix.h>
#define __CLC_BODY <mix.inc>
#include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/common/radians.cl b/libclc/opencl/lib/generic/common/radians.cl
index 6550cf458a7a8..80168bc569a6e 100644
--- a/libclc/opencl/lib/generic/common/radians.cl
+++ b/libclc/opencl/lib/generic/common/radians.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/common/clc_radians.h>
-#include <clc/opencl/common/radians.h>
#define __CLC_FUNCTION radians
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/common/sign.cl b/libclc/opencl/lib/generic/common/sign.cl
index 5508cd7bfab17..88c974cd7c5d5 100644
--- a/libclc/opencl/lib/generic/common/sign.cl
+++ b/libclc/opencl/lib/generic/common/sign.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/common/clc_sign.h>
-#include <clc/opencl/common/sign.h>
#define __CLC_FUNCTION sign
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/common/smoothstep.cl b/libclc/opencl/lib/generic/common/smoothstep.cl
index ee37718231929..9589d0b8afaa2 100644
--- a/libclc/opencl/lib/generic/common/smoothstep.cl
+++ b/libclc/opencl/lib/generic/common/smoothstep.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/common/clc_smoothstep.h>
-#include <clc/opencl/common/smoothstep.h>
#define __CLC_BODY <smoothstep.inc>
#include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/common/step.cl b/libclc/opencl/lib/generic/common/step.cl
index d946771698150..ab12570f54c06 100644
--- a/libclc/opencl/lib/generic/common/step.cl
+++ b/libclc/opencl/lib/generic/common/step.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/common/clc_step.h>
-#include <clc/opencl/common/step.h>
#define __CLC_BODY <step.inc>
#include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/geometric/cross.cl b/libclc/opencl/lib/generic/geometric/cross.cl
index 7553c80e6b253..29dd6370a4d57 100644
--- a/libclc/opencl/lib/generic/geometric/cross.cl
+++ b/libclc/opencl/lib/generic/geometric/cross.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_cross.h>
-#include <clc/opencl/geometric/cross.h>
_CLC_OVERLOAD _CLC_DEF float3 cross(float3 p0, float3 p1) {
return __clc_cross(p0, p1);
diff --git a/libclc/opencl/lib/generic/geometric/distance.cl b/libclc/opencl/lib/generic/geometric/distance.cl
index 4d9f5403f8c2d..9a39e9e0c3375 100644
--- a/libclc/opencl/lib/generic/geometric/distance.cl
+++ b/libclc/opencl/lib/generic/geometric/distance.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_distance.h>
-#include <clc/opencl/geometric/distance.h>
#define __CLC_FUNCTION distance
#define __CLC_BODY <clc/geometric/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/geometric/dot.cl b/libclc/opencl/lib/generic/geometric/dot.cl
index fc207c8fc155a..a622b209f48ba 100644
--- a/libclc/opencl/lib/generic/geometric/dot.cl
+++ b/libclc/opencl/lib/generic/geometric/dot.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_dot.h>
-#include <clc/opencl/geometric/dot.h>
#define __CLC_FUNCTION dot
#define __CLC_BODY <clc/geometric/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/geometric/fast_distance.cl b/libclc/opencl/lib/generic/geometric/fast_distance.cl
index a9c2c66dc9a19..2e5c22201c8ab 100644
--- a/libclc/opencl/lib/generic/geometric/fast_distance.cl
+++ b/libclc/opencl/lib/generic/geometric/fast_distance.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_fast_distance.h>
-#include <clc/opencl/geometric/fast_distance.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION fast_distance
diff --git a/libclc/opencl/lib/generic/geometric/fast_length.cl b/libclc/opencl/lib/generic/geometric/fast_length.cl
index 8e6ce1aa5c564..13ac101e391df 100644
--- a/libclc/opencl/lib/generic/geometric/fast_length.cl
+++ b/libclc/opencl/lib/generic/geometric/fast_length.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_fast_length.h>
-#include <clc/opencl/geometric/fast_length.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION fast_length
diff --git a/libclc/opencl/lib/generic/geometric/fast_normalize.cl b/libclc/opencl/lib/generic/geometric/fast_normalize.cl
index d2f7111516f44..ee3eed25fac55 100644
--- a/libclc/opencl/lib/generic/geometric/fast_normalize.cl
+++ b/libclc/opencl/lib/generic/geometric/fast_normalize.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_fast_normalize.h>
-#include <clc/opencl/geometric/fast_normalize.h>
#define __CLC_FUNCTION fast_normalize
#define __CLC_FLOAT_ONLY
diff --git a/libclc/opencl/lib/generic/geometric/length.cl b/libclc/opencl/lib/generic/geometric/length.cl
index 59e2055020d88..ce5dee508ca21 100644
--- a/libclc/opencl/lib/generic/geometric/length.cl
+++ b/libclc/opencl/lib/generic/geometric/length.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_length.h>
-#include <clc/opencl/geometric/length.h>
#define __CLC_FUNCTION length
#define __CLC_BODY <clc/geometric/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/geometric/normalize.cl b/libclc/opencl/lib/generic/geometric/normalize.cl
index 968d4001ae999..6dd96a3259e71 100644
--- a/libclc/opencl/lib/generic/geometric/normalize.cl
+++ b/libclc/opencl/lib/generic/geometric/normalize.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_normalize.h>
-#include <clc/opencl/geometric/normalize.h>
#define __CLC_FUNCTION normalize
#define __CLC_GEOMETRIC_RET_GENTYPE
diff --git a/libclc/opencl/lib/generic/integer/abs.cl b/libclc/opencl/lib/generic/integer/abs.cl
index 0771ec7934330..3a2aabf716ce4 100644
--- a/libclc/opencl/lib/generic/integer/abs.cl
+++ b/libclc/opencl/lib/generic/integer/abs.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_abs.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 d65b0468a7f21..c738c99eb9e04 100644
--- a/libclc/opencl/lib/generic/integer/abs_diff.cl
+++ b/libclc/opencl/lib/generic/integer/abs_diff.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_abs_diff.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 6cde612e5fb0f..a4325054cf7eb 100644
--- a/libclc/opencl/lib/generic/integer/add_sat.cl
+++ b/libclc/opencl/lib/generic/integer/add_sat.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_add_sat.h>
-#include <clc/opencl/integer/add_sat.h>
#define __CLC_FUNCTION add_sat
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/integer/bit_reverse.cl b/libclc/opencl/lib/generic/integer/bit_reverse.cl
index b35a5c473a1e6..917be12b8e833 100644
--- a/libclc/opencl/lib/generic/integer/bit_reverse.cl
+++ b/libclc/opencl/lib/generic/integer/bit_reverse.cl
@@ -9,7 +9,6 @@
#ifdef cl_khr_extended_bit_ops
#include <clc/integer/clc_bit_reverse.h>
-#include <clc/opencl/integer/bit_reverse.h>
#define __CLC_FUNCTION bit_reverse
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/integer/bitfield_extract_signed.cl b/libclc/opencl/lib/generic/integer/bitfield_extract_signed.cl
index ad49cd36b766e..c54dd461f1713 100644
--- a/libclc/opencl/lib/generic/integer/bitfield_extract_signed.cl
+++ b/libclc/opencl/lib/generic/integer/bitfield_extract_signed.cl
@@ -9,7 +9,6 @@
#ifdef cl_khr_extended_bit_ops
#include <clc/integer/clc_bitfield_extract_signed.h>
-#include <clc/opencl/integer/bitfield_extract_signed.h>
#define __CLC_FUNCTION bitfield_extract_signed
#define __CLC_RETTYPE __CLC_S_GENTYPE
diff --git a/libclc/opencl/lib/generic/integer/bitfield_extract_unsigned.cl b/libclc/opencl/lib/generic/integer/bitfield_extract_unsigned.cl
index e2fe92cfcce82..b78d92c69cd03 100644
--- a/libclc/opencl/lib/generic/integer/bitfield_extract_unsigned.cl
+++ b/libclc/opencl/lib/generic/integer/bitfield_extract_unsigned.cl
@@ -9,7 +9,6 @@
#ifdef cl_khr_extended_bit_ops
#include <clc/integer/clc_bitfield_extract_unsigned.h>
-#include <clc/opencl/integer/bitfield_extract_unsigned.h>
#define __CLC_FUNCTION bitfield_extract_unsigned
#define __CLC_RETTYPE __CLC_U_GENTYPE
diff --git a/libclc/opencl/lib/generic/integer/bitfield_insert.cl b/libclc/opencl/lib/generic/integer/bitfield_insert.cl
index f6d0aea96d8ec..bc75df9573926 100644
--- a/libclc/opencl/lib/generic/integer/bitfield_insert.cl
+++ b/libclc/opencl/lib/generic/integer/bitfield_insert.cl
@@ -9,7 +9,6 @@
#ifdef cl_khr_extended_bit_ops
#include <clc/integer/clc_bitfield_insert.h>
-#include <clc/opencl/integer/bitfield_insert.h>
#define __CLC_FUNCTION bitfield_insert
#define __CLC_BODY <bitfield_insert.inc>
diff --git a/libclc/opencl/lib/generic/integer/clz.cl b/libclc/opencl/lib/generic/integer/clz.cl
index d0509cba5913a..8e700ca397a94 100644
--- a/libclc/opencl/lib/generic/integer/clz.cl
+++ b/libclc/opencl/lib/generic/integer/clz.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_clz.h>
-#include <clc/opencl/integer/clz.h>
#define __CLC_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 640ccfa5f3117..a961e5b8c1d68 100644
--- a/libclc/opencl/lib/generic/integer/ctz.cl
+++ b/libclc/opencl/lib/generic/integer/ctz.cl
@@ -9,7 +9,6 @@
#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
#include <clc/integer/clc_ctz.h>
-#include <clc/opencl/integer/ctz.h>
#define __CLC_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 0082524b55af2..5281e63a73623 100644
--- a/libclc/opencl/lib/generic/integer/hadd.cl
+++ b/libclc/opencl/lib/generic/integer/hadd.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_hadd.h>
-#include <clc/opencl/integer/hadd.h>
#define __CLC_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 fc8e0e3171334..e964a3983cfbb 100644
--- a/libclc/opencl/lib/generic/integer/mad24.cl
+++ b/libclc/opencl/lib/generic/integer/mad24.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_mad24.h>
-#include <clc/opencl/integer/mad24.h>
#define __CLC_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 20d096c59650d..24bfb6e1ee0dd 100644
--- a/libclc/opencl/lib/generic/integer/mad_hi.cl
+++ b/libclc/opencl/lib/generic/integer/mad_hi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_mad_hi.h>
-#include <clc/opencl/integer/mad_hi.h>
#define __CLC_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 310b31a0ca239..c3875e340ff1f 100644
--- a/libclc/opencl/lib/generic/integer/mad_sat.cl
+++ b/libclc/opencl/lib/generic/integer/mad_sat.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_mad_sat.h>
-#include <clc/opencl/integer/mad_sat.h>
#define __CLC_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 243bff77da91a..5c681ac4e7145 100644
--- a/libclc/opencl/lib/generic/integer/mul24.cl
+++ b/libclc/opencl/lib/generic/integer/mul24.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_mul24.h>
-#include <clc/opencl/integer/mul24.h>
#define __CLC_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 99d3051a0df9e..1a9c3a923a3e9 100644
--- a/libclc/opencl/lib/generic/integer/mul_hi.cl
+++ b/libclc/opencl/lib/generic/integer/mul_hi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_mul_hi.h>
-#include <clc/opencl/integer/mul_hi.h>
#define __CLC_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 e4219b4ff9c37..0dc521fb409ea 100644
--- a/libclc/opencl/lib/generic/integer/popcount.cl
+++ b/libclc/opencl/lib/generic/integer/popcount.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_popcount.h>
-#include <clc/opencl/integer/popcount.h>
#define __CLC_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 df9f1eff3e2d5..f660a21b4a019 100644
--- a/libclc/opencl/lib/generic/integer/rhadd.cl
+++ b/libclc/opencl/lib/generic/integer/rhadd.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_rhadd.h>
-#include <clc/opencl/integer/rhadd.h>
#define __CLC_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 f5b6195275deb..82015803370b1 100644
--- a/libclc/opencl/lib/generic/integer/rotate.cl
+++ b/libclc/opencl/lib/generic/integer/rotate.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_rotate.h>
-#include <clc/opencl/integer/rotate.h>
#define __CLC_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 81517022160ae..76d80c4172426 100644
--- a/libclc/opencl/lib/generic/integer/sub_sat.cl
+++ b/libclc/opencl/lib/generic/integer/sub_sat.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_sub_sat.h>
-#include <clc/opencl/integer/sub_sat.h>
#define __CLC_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 5f95c811e058d..2a63a13186d11 100644
--- a/libclc/opencl/lib/generic/integer/upsample.cl
+++ b/libclc/opencl/lib/generic/integer/upsample.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/integer/clc_upsample.h>
-#include <clc/opencl/integer/upsample.h>
#define __CLC_UPSAMPLE_IMPL(BGENTYPE, GENTYPE, UGENTYPE) \
_CLC_OVERLOAD _CLC_DEF BGENTYPE upsample(GENTYPE hi, UGENTYPE lo) { \
diff --git a/libclc/opencl/lib/generic/math/acos.cl b/libclc/opencl/lib/generic/math/acos.cl
index bdaeedf02e908..ca9fd9d4f1b07 100644
--- a/libclc/opencl/lib/generic/math/acos.cl
+++ b/libclc/opencl/lib/generic/math/acos.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_acos.h>
-#include <clc/opencl/math/acos.h>
#define __CLC_FUNCTION acos
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/acosh.cl b/libclc/opencl/lib/generic/math/acosh.cl
index c46532dbcbd95..3e2c0b3d4a87f 100644
--- a/libclc/opencl/lib/generic/math/acosh.cl
+++ b/libclc/opencl/lib/generic/math/acosh.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_acosh.h>
-#include <clc/opencl/math/acosh.h>
#define __CLC_FUNCTION acosh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/acospi.cl b/libclc/opencl/lib/generic/math/acospi.cl
index b6b0fb91250d0..82e84c690e270 100644
--- a/libclc/opencl/lib/generic/math/acospi.cl
+++ b/libclc/opencl/lib/generic/math/acospi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_acospi.h>
-#include <clc/opencl/math/acospi.h>
#define __CLC_FUNCTION acospi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/asin.cl b/libclc/opencl/lib/generic/math/asin.cl
index 31fc36d746019..5c3ccd6532013 100644
--- a/libclc/opencl/lib/generic/math/asin.cl
+++ b/libclc/opencl/lib/generic/math/asin.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_asin.h>
-#include <clc/opencl/math/asin.h>
#define __CLC_FUNCTION asin
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/asinh.cl b/libclc/opencl/lib/generic/math/asinh.cl
index 3bdd8099f079b..86d825f77f324 100644
--- a/libclc/opencl/lib/generic/math/asinh.cl
+++ b/libclc/opencl/lib/generic/math/asinh.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_asinh.h>
-#include <clc/opencl/math/asinh.h>
#define __CLC_FUNCTION asinh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/asinpi.cl b/libclc/opencl/lib/generic/math/asinpi.cl
index 6df9047ced3c5..b093777600c40 100644
--- a/libclc/opencl/lib/generic/math/asinpi.cl
+++ b/libclc/opencl/lib/generic/math/asinpi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_asinpi.h>
-#include <clc/opencl/math/asinpi.h>
#define __CLC_FUNCTION asinpi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atan.cl b/libclc/opencl/lib/generic/math/atan.cl
index 157e50dd0e07a..a5dbfd052feb0 100644
--- a/libclc/opencl/lib/generic/math/atan.cl
+++ b/libclc/opencl/lib/generic/math/atan.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_atan.h>
-#include <clc/opencl/math/atan.h>
#define __CLC_FUNCTION atan
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atan2.cl b/libclc/opencl/lib/generic/math/atan2.cl
index 5f4a9d991cd95..64a06991a91df 100644
--- a/libclc/opencl/lib/generic/math/atan2.cl
+++ b/libclc/opencl/lib/generic/math/atan2.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_atan2.h>
-#include <clc/opencl/math/atan2.h>
#define __CLC_FUNCTION atan2
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atan2pi.cl b/libclc/opencl/lib/generic/math/atan2pi.cl
index 4e577c775ebb1..854ca09990b44 100644
--- a/libclc/opencl/lib/generic/math/atan2pi.cl
+++ b/libclc/opencl/lib/generic/math/atan2pi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_atan2pi.h>
-#include <clc/opencl/math/atan2pi.h>
#define __CLC_FUNCTION atan2pi
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atanh.cl b/libclc/opencl/lib/generic/math/atanh.cl
index d0337ff1ffac3..3a38cfe69ade8 100644
--- a/libclc/opencl/lib/generic/math/atanh.cl
+++ b/libclc/opencl/lib/generic/math/atanh.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_atanh.h>
-#include <clc/opencl/math/atanh.h>
#define __CLC_FUNCTION atanh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atanpi.cl b/libclc/opencl/lib/generic/math/atanpi.cl
index 11630db430c71..c3da0aba9e624 100644
--- a/libclc/opencl/lib/generic/math/atanpi.cl
+++ b/libclc/opencl/lib/generic/math/atanpi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_atanpi.h>
-#include <clc/opencl/math/atanpi.h>
#define __CLC_FUNCTION atanpi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/cbrt.cl b/libclc/opencl/lib/generic/math/cbrt.cl
index 7de61436522b3..86b8415c688cc 100644
--- a/libclc/opencl/lib/generic/math/cbrt.cl
+++ b/libclc/opencl/lib/generic/math/cbrt.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_cbrt.h>
-#include <clc/opencl/math/cbrt.h>
#define __CLC_FUNCTION cbrt
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/ceil.cl b/libclc/opencl/lib/generic/math/ceil.cl
index e1bffbcb68600..5d0d8ad4238fc 100644
--- a/libclc/opencl/lib/generic/math/ceil.cl
+++ b/libclc/opencl/lib/generic/math/ceil.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_ceil.h>
-#include <clc/opencl/math/ceil.h>
#define __CLC_FUNCTION ceil
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/copysign.cl b/libclc/opencl/lib/generic/math/copysign.cl
index 5234b534631c8..fbb86b89a8bce 100644
--- a/libclc/opencl/lib/generic/math/copysign.cl
+++ b/libclc/opencl/lib/generic/math/copysign.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_copysign.h>
-#include <clc/opencl/math/copysign.h>
#define __CLC_FUNCTION copysign
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/cos.cl b/libclc/opencl/lib/generic/math/cos.cl
index 69c9c37cf3e84..4b895b980c306 100644
--- a/libclc/opencl/lib/generic/math/cos.cl
+++ b/libclc/opencl/lib/generic/math/cos.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_cos.h>
-#include <clc/opencl/math/cos.h>
#define __CLC_FUNCTION cos
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/cosh.cl b/libclc/opencl/lib/generic/math/cosh.cl
index de9e750c1a7f0..4b44cb426dac0 100644
--- a/libclc/opencl/lib/generic/math/cosh.cl
+++ b/libclc/opencl/lib/generic/math/cosh.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_cosh.h>
-#include <clc/opencl/math/cosh.h>
#define __CLC_FUNCTION cosh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/cospi.cl b/libclc/opencl/lib/generic/math/cospi.cl
index d9afd05bbabf3..d910c88c5c9c5 100644
--- a/libclc/opencl/lib/generic/math/cospi.cl
+++ b/libclc/opencl/lib/generic/math/cospi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_cospi.h>
-#include <clc/opencl/math/cospi.h>
#define __CLC_FUNCTION cospi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/erf.cl b/libclc/opencl/lib/generic/math/erf.cl
index 8d5a80ba10e47..58b2d8d6937ba 100644
--- a/libclc/opencl/lib/generic/math/erf.cl
+++ b/libclc/opencl/lib/generic/math/erf.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_erf.h>
-#include <clc/opencl/math/erf.h>
#define __CLC_FUNCTION erf
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/erfc.cl b/libclc/opencl/lib/generic/math/erfc.cl
index a3fda46237d99..5aa7d0fcc32e0 100644
--- a/libclc/opencl/lib/generic/math/erfc.cl
+++ b/libclc/opencl/lib/generic/math/erfc.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_erfc.h>
-#include <clc/opencl/math/erfc.h>
#define __CLC_FUNCTION erfc
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/exp.cl b/libclc/opencl/lib/generic/math/exp.cl
index a9fd07a26d0e1..2afeb89370794 100644
--- a/libclc/opencl/lib/generic/math/exp.cl
+++ b/libclc/opencl/lib/generic/math/exp.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_exp.h>
-#include <clc/opencl/math/exp.h>
#define __CLC_FUNCTION exp
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/exp10.cl b/libclc/opencl/lib/generic/math/exp10.cl
index 7db7bafd226f4..befc5f16bb264 100644
--- a/libclc/opencl/lib/generic/math/exp10.cl
+++ b/libclc/opencl/lib/generic/math/exp10.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_exp10.h>
-#include <clc/opencl/math/exp10.h>
#define __CLC_FUNCTION exp10
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/exp2.cl b/libclc/opencl/lib/generic/math/exp2.cl
index 1ffc34ae13ce0..f82b713a98920 100644
--- a/libclc/opencl/lib/generic/math/exp2.cl
+++ b/libclc/opencl/lib/generic/math/exp2.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_exp2.h>
-#include <clc/opencl/math/exp2.h>
#define __CLC_FUNCTION exp2
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/expm1.cl b/libclc/opencl/lib/generic/math/expm1.cl
index 69c852fc7e79c..66661192b9915 100644
--- a/libclc/opencl/lib/generic/math/expm1.cl
+++ b/libclc/opencl/lib/generic/math/expm1.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_expm1.h>
-#include <clc/opencl/math/expm1.h>
#define __CLC_FUNCTION expm1
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fabs.cl b/libclc/opencl/lib/generic/math/fabs.cl
index d88c6c84be6d6..eed1a585b64cb 100644
--- a/libclc/opencl/lib/generic/math/fabs.cl
+++ b/libclc/opencl/lib/generic/math/fabs.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fabs.h>
-#include <clc/opencl/math/fabs.h>
#define __CLC_FUNCTION fabs
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fdim.cl b/libclc/opencl/lib/generic/math/fdim.cl
index edaa8a3daef45..16fcce64f5178 100644
--- a/libclc/opencl/lib/generic/math/fdim.cl
+++ b/libclc/opencl/lib/generic/math/fdim.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fdim.h>
-#include <clc/opencl/math/fdim.h>
#define __CLC_FUNCTION fdim
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/floor.cl b/libclc/opencl/lib/generic/math/floor.cl
index 2edc1df21bc59..9e2bd0abe3b3a 100644
--- a/libclc/opencl/lib/generic/math/floor.cl
+++ b/libclc/opencl/lib/generic/math/floor.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_floor.h>
-#include <clc/opencl/math/floor.h>
#define __CLC_FUNCTION floor
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fma.cl b/libclc/opencl/lib/generic/math/fma.cl
index 199d2683a8988..adac2c3960dd3 100644
--- a/libclc/opencl/lib/generic/math/fma.cl
+++ b/libclc/opencl/lib/generic/math/fma.cl
@@ -8,7 +8,6 @@
#include <clc/math/clc_fma.h>
#include <clc/math/math.h>
-#include <clc/opencl/math/fma.h>
#define __CLC_FUNCTION fma
#define __CLC_BODY <clc/shared/ternary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fmax.cl b/libclc/opencl/lib/generic/math/fmax.cl
index ae7a70a69fe38..987c605dc248a 100644
--- a/libclc/opencl/lib/generic/math/fmax.cl
+++ b/libclc/opencl/lib/generic/math/fmax.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fmax.h>
-#include <clc/opencl/math/fmax.h>
#define __CLC_FUNCTION fmax
#define __CLC_BODY <clc/shared/binary_def_with_scalar_second_arg.inc>
diff --git a/libclc/opencl/lib/generic/math/fmin.cl b/libclc/opencl/lib/generic/math/fmin.cl
index 4b55a93bb70fa..b31a7c6621a66 100644
--- a/libclc/opencl/lib/generic/math/fmin.cl
+++ b/libclc/opencl/lib/generic/math/fmin.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fmin.h>
-#include <clc/opencl/math/fmin.h>
#define __CLC_FUNCTION fmin
#define __CLC_BODY <clc/shared/binary_def_with_scalar_second_arg.inc>
diff --git a/libclc/opencl/lib/generic/math/fmod.cl b/libclc/opencl/lib/generic/math/fmod.cl
index 338b803347217..7ff28defbdc01 100644
--- a/libclc/opencl/lib/generic/math/fmod.cl
+++ b/libclc/opencl/lib/generic/math/fmod.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fmod.h>
-#include <clc/opencl/math/fmod.h>
#define __CLC_FUNCTION fmod
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fract.cl b/libclc/opencl/lib/generic/math/fract.cl
index 00e8eb456cf64..3c749443ba1a3 100644
--- a/libclc/opencl/lib/generic/math/fract.cl
+++ b/libclc/opencl/lib/generic/math/fract.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fract.h>
-#include <clc/opencl/math/fract.h>
#define __CLC_FUNCTION fract
#define __CLC_BODY <clc/math/unary_def_with_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/frexp.cl b/libclc/opencl/lib/generic/math/frexp.cl
index 207f9de1c99ec..e8c1bff46581b 100644
--- a/libclc/opencl/lib/generic/math/frexp.cl
+++ b/libclc/opencl/lib/generic/math/frexp.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_frexp.h>
-#include <clc/opencl/math/frexp.h>
#define __CLC_FUNCTION frexp
#define __CLC_BODY <clc/math/unary_def_with_int_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/half_cos.cl b/libclc/opencl/lib/generic/math/half_cos.cl
index d1a5352b52670..2d92636c08a4a 100644
--- a/libclc/opencl/lib/generic/math/half_cos.cl
+++ b/libclc/opencl/lib/generic/math/half_cos.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_cos.h>
-#include <clc/opencl/math/half_cos.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_cos
diff --git a/libclc/opencl/lib/generic/math/half_divide.cl b/libclc/opencl/lib/generic/math/half_divide.cl
index 10c418b9312db..3d3cb76528b63 100644
--- a/libclc/opencl/lib/generic/math/half_divide.cl
+++ b/libclc/opencl/lib/generic/math/half_divide.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_divide.h>
-#include <clc/opencl/math/half_divide.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_divide
diff --git a/libclc/opencl/lib/generic/math/half_exp.cl b/libclc/opencl/lib/generic/math/half_exp.cl
index fbbf564cb697a..367bcc94b0491 100644
--- a/libclc/opencl/lib/generic/math/half_exp.cl
+++ b/libclc/opencl/lib/generic/math/half_exp.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_exp.h>
-#include <clc/opencl/math/half_exp.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_exp
diff --git a/libclc/opencl/lib/generic/math/half_exp10.cl b/libclc/opencl/lib/generic/math/half_exp10.cl
index e655f5f89ff69..58e2b5ec39d48 100644
--- a/libclc/opencl/lib/generic/math/half_exp10.cl
+++ b/libclc/opencl/lib/generic/math/half_exp10.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_exp10.h>
-#include <clc/opencl/math/half_exp10.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_exp10
diff --git a/libclc/opencl/lib/generic/math/half_exp2.cl b/libclc/opencl/lib/generic/math/half_exp2.cl
index 417d8b978e7de..6b98fdd25b7ca 100644
--- a/libclc/opencl/lib/generic/math/half_exp2.cl
+++ b/libclc/opencl/lib/generic/math/half_exp2.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_exp2.h>
-#include <clc/opencl/math/half_exp2.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_exp2
diff --git a/libclc/opencl/lib/generic/math/half_log.cl b/libclc/opencl/lib/generic/math/half_log.cl
index 89482c263f83f..a839f7e553b30 100644
--- a/libclc/opencl/lib/generic/math/half_log.cl
+++ b/libclc/opencl/lib/generic/math/half_log.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_log.h>
-#include <clc/opencl/math/half_log.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_log
diff --git a/libclc/opencl/lib/generic/math/half_log10.cl b/libclc/opencl/lib/generic/math/half_log10.cl
index b5ffe7edd363a..8e193f8f215f2 100644
--- a/libclc/opencl/lib/generic/math/half_log10.cl
+++ b/libclc/opencl/lib/generic/math/half_log10.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_log10.h>
-#include <clc/opencl/math/half_log10.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_log10
diff --git a/libclc/opencl/lib/generic/math/half_log2.cl b/libclc/opencl/lib/generic/math/half_log2.cl
index cf13cf927c9c9..2f072752750d1 100644
--- a/libclc/opencl/lib/generic/math/half_log2.cl
+++ b/libclc/opencl/lib/generic/math/half_log2.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_log2.h>
-#include <clc/opencl/math/half_log2.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_log2
diff --git a/libclc/opencl/lib/generic/math/half_powr.cl b/libclc/opencl/lib/generic/math/half_powr.cl
index d676f353f8647..68e32a8142227 100644
--- a/libclc/opencl/lib/generic/math/half_powr.cl
+++ b/libclc/opencl/lib/generic/math/half_powr.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_powr.h>
-#include <clc/opencl/math/half_powr.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_powr
diff --git a/libclc/opencl/lib/generic/math/half_recip.cl b/libclc/opencl/lib/generic/math/half_recip.cl
index 40a6c587dbaf9..26379d751208a 100644
--- a/libclc/opencl/lib/generic/math/half_recip.cl
+++ b/libclc/opencl/lib/generic/math/half_recip.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_recip.h>
-#include <clc/opencl/math/half_recip.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_recip
diff --git a/libclc/opencl/lib/generic/math/half_rsqrt.cl b/libclc/opencl/lib/generic/math/half_rsqrt.cl
index 944976855dacf..7f77d737ff202 100644
--- a/libclc/opencl/lib/generic/math/half_rsqrt.cl
+++ b/libclc/opencl/lib/generic/math/half_rsqrt.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_rsqrt.h>
-#include <clc/opencl/math/half_rsqrt.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_rsqrt
diff --git a/libclc/opencl/lib/generic/math/half_sin.cl b/libclc/opencl/lib/generic/math/half_sin.cl
index 3376f8344f394..e6f928a88e1d6 100644
--- a/libclc/opencl/lib/generic/math/half_sin.cl
+++ b/libclc/opencl/lib/generic/math/half_sin.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_sin.h>
-#include <clc/opencl/math/half_sin.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_sin
diff --git a/libclc/opencl/lib/generic/math/half_sqrt.cl b/libclc/opencl/lib/generic/math/half_sqrt.cl
index 4939d6bd199dc..562663644b137 100644
--- a/libclc/opencl/lib/generic/math/half_sqrt.cl
+++ b/libclc/opencl/lib/generic/math/half_sqrt.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_sqrt.h>
-#include <clc/opencl/math/half_sqrt.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_sqrt
diff --git a/libclc/opencl/lib/generic/math/half_tan.cl b/libclc/opencl/lib/generic/math/half_tan.cl
index 2b77b3ae0c623..1ff24376b207b 100644
--- a/libclc/opencl/lib/generic/math/half_tan.cl
+++ b/libclc/opencl/lib/generic/math/half_tan.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_tan.h>
-#include <clc/opencl/math/half_tan.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION half_tan
diff --git a/libclc/opencl/lib/generic/math/hypot.cl b/libclc/opencl/lib/generic/math/hypot.cl
index 41aff69069879..b81aed941ab40 100644
--- a/libclc/opencl/lib/generic/math/hypot.cl
+++ b/libclc/opencl/lib/generic/math/hypot.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_hypot.h>
-#include <clc/opencl/math/hypot.h>
#define __CLC_FUNCTION hypot
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/ilogb.cl b/libclc/opencl/lib/generic/math/ilogb.cl
index 027d587a4d46d..f3060d3964bda 100644
--- a/libclc/opencl/lib/generic/math/ilogb.cl
+++ b/libclc/opencl/lib/generic/math/ilogb.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_ilogb.h>
-#include <clc/opencl/math/ilogb.h>
#define __CLC_FUNCTION ilogb
#define __CLC_BODY <clc/math/unary_def_with_int_return.inc>
diff --git a/libclc/opencl/lib/generic/math/ldexp.cl b/libclc/opencl/lib/generic/math/ldexp.cl
index 3cdb9e1a760a1..f8ef83f3de212 100644
--- a/libclc/opencl/lib/generic/math/ldexp.cl
+++ b/libclc/opencl/lib/generic/math/ldexp.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_ldexp.h>
-#include <clc/opencl/math/ldexp.h>
#define __CLC_FUNCTION ldexp
#define __CLC_IMPL_FUNCTION(x) __clc_ldexp
diff --git a/libclc/opencl/lib/generic/math/lgamma.cl b/libclc/opencl/lib/generic/math/lgamma.cl
index da8ceac986e43..a07de8ad4b37c 100644
--- a/libclc/opencl/lib/generic/math/lgamma.cl
+++ b/libclc/opencl/lib/generic/math/lgamma.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_lgamma.h>
-#include <clc/opencl/math/lgamma.h>
#define __CLC_FUNCTION lgamma
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/lgamma_r.cl b/libclc/opencl/lib/generic/math/lgamma_r.cl
index bb2d9bd283df6..8cde1844a56fa 100644
--- a/libclc/opencl/lib/generic/math/lgamma_r.cl
+++ b/libclc/opencl/lib/generic/math/lgamma_r.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_lgamma_r.h>
-#include <clc/opencl/math/lgamma_r.h>
#define __CLC_FUNCTION lgamma_r
#define __CLC_BODY <clc/math/unary_def_with_int_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/log.cl b/libclc/opencl/lib/generic/math/log.cl
index 4862b81f15129..4e2890ad882ad 100644
--- a/libclc/opencl/lib/generic/math/log.cl
+++ b/libclc/opencl/lib/generic/math/log.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_log.h>
-#include <clc/opencl/math/log.h>
#define __CLC_FUNCTION log
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/log10.cl b/libclc/opencl/lib/generic/math/log10.cl
index 6702b4485b51f..d8c913570260c 100644
--- a/libclc/opencl/lib/generic/math/log10.cl
+++ b/libclc/opencl/lib/generic/math/log10.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_log10.h>
-#include <clc/opencl/math/log10.h>
#define __CLC_FUNCTION log10
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/log1p.cl b/libclc/opencl/lib/generic/math/log1p.cl
index c1a8711e11858..8dbb5b26b3d3d 100644
--- a/libclc/opencl/lib/generic/math/log1p.cl
+++ b/libclc/opencl/lib/generic/math/log1p.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_log1p.h>
-#include <clc/opencl/math/log1p.h>
#define __CLC_FUNCTION log1p
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/log2.cl b/libclc/opencl/lib/generic/math/log2.cl
index d072b313f8388..3fbe354827626 100644
--- a/libclc/opencl/lib/generic/math/log2.cl
+++ b/libclc/opencl/lib/generic/math/log2.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_log2.h>
-#include <clc/opencl/math/log2.h>
#define __CLC_FUNCTION log2
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/logb.cl b/libclc/opencl/lib/generic/math/logb.cl
index 09d43fac3ad2a..63a60ae014f01 100644
--- a/libclc/opencl/lib/generic/math/logb.cl
+++ b/libclc/opencl/lib/generic/math/logb.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_logb.h>
-#include <clc/opencl/math/logb.h>
#define __CLC_FUNCTION logb
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/mad.cl b/libclc/opencl/lib/generic/math/mad.cl
index 05bd228251c18..5cc52b39eb684 100644
--- a/libclc/opencl/lib/generic/math/mad.cl
+++ b/libclc/opencl/lib/generic/math/mad.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_mad.h>
-#include <clc/opencl/math/mad.h>
#define __CLC_FUNCTION mad
#define __CLC_BODY <clc/shared/ternary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/maxmag.cl b/libclc/opencl/lib/generic/math/maxmag.cl
index 30e7bb21302d7..4a2e865a35530 100644
--- a/libclc/opencl/lib/generic/math/maxmag.cl
+++ b/libclc/opencl/lib/generic/math/maxmag.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_maxmag.h>
-#include <clc/opencl/math/maxmag.h>
#define __CLC_FUNCTION maxmag
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/minmag.cl b/libclc/opencl/lib/generic/math/minmag.cl
index 3732dbfe7af45..86f2b08e5b095 100644
--- a/libclc/opencl/lib/generic/math/minmag.cl
+++ b/libclc/opencl/lib/generic/math/minmag.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_minmag.h>
-#include <clc/opencl/math/minmag.h>
#define __CLC_FUNCTION minmag
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/modf.cl b/libclc/opencl/lib/generic/math/modf.cl
index 306070bf89238..fe524ba305e9e 100644
--- a/libclc/opencl/lib/generic/math/modf.cl
+++ b/libclc/opencl/lib/generic/math/modf.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_modf.h>
-#include <clc/opencl/math/modf.h>
#define __CLC_FUNCTION modf
#define __CLC_BODY <clc/math/unary_def_with_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/native_cos.cl b/libclc/opencl/lib/generic/math/native_cos.cl
index 8508df37a9b62..d2b9cf859696b 100644
--- a/libclc/opencl/lib/generic/math/native_cos.cl
+++ b/libclc/opencl/lib/generic/math/native_cos.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_cos.h>
-#include <clc/opencl/math/native_cos.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_cos
diff --git a/libclc/opencl/lib/generic/math/native_divide.cl b/libclc/opencl/lib/generic/math/native_divide.cl
index ea28bf6e195cc..a1b8d5d2510cf 100644
--- a/libclc/opencl/lib/generic/math/native_divide.cl
+++ b/libclc/opencl/lib/generic/math/native_divide.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_divide.h>
-#include <clc/opencl/math/native_divide.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_divide
diff --git a/libclc/opencl/lib/generic/math/native_exp.cl b/libclc/opencl/lib/generic/math/native_exp.cl
index aedb0953c5349..19da3c269b28a 100644
--- a/libclc/opencl/lib/generic/math/native_exp.cl
+++ b/libclc/opencl/lib/generic/math/native_exp.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_exp.h>
-#include <clc/opencl/math/native_exp.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_exp
diff --git a/libclc/opencl/lib/generic/math/native_exp10.cl b/libclc/opencl/lib/generic/math/native_exp10.cl
index eb184647639f9..58f8005463cf8 100644
--- a/libclc/opencl/lib/generic/math/native_exp10.cl
+++ b/libclc/opencl/lib/generic/math/native_exp10.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_exp10.h>
-#include <clc/opencl/math/native_exp10.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_exp10
diff --git a/libclc/opencl/lib/generic/math/native_exp2.cl b/libclc/opencl/lib/generic/math/native_exp2.cl
index 52e814f5ee53c..8bed47dd18ee2 100644
--- a/libclc/opencl/lib/generic/math/native_exp2.cl
+++ b/libclc/opencl/lib/generic/math/native_exp2.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_exp2.h>
-#include <clc/opencl/math/native_exp2.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_exp2
diff --git a/libclc/opencl/lib/generic/math/native_log.cl b/libclc/opencl/lib/generic/math/native_log.cl
index d1d4ae2f15f18..0323f6668ba04 100644
--- a/libclc/opencl/lib/generic/math/native_log.cl
+++ b/libclc/opencl/lib/generic/math/native_log.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_log.h>
-#include <clc/opencl/math/native_log.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_log
diff --git a/libclc/opencl/lib/generic/math/native_log10.cl b/libclc/opencl/lib/generic/math/native_log10.cl
index 680b9cb341bf2..915fa8a2d4ede 100644
--- a/libclc/opencl/lib/generic/math/native_log10.cl
+++ b/libclc/opencl/lib/generic/math/native_log10.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_log10.h>
-#include <clc/opencl/math/native_log10.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_log10
diff --git a/libclc/opencl/lib/generic/math/native_log2.cl b/libclc/opencl/lib/generic/math/native_log2.cl
index 3a104357afa8c..b5d8ff586761b 100644
--- a/libclc/opencl/lib/generic/math/native_log2.cl
+++ b/libclc/opencl/lib/generic/math/native_log2.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_log2.h>
-#include <clc/opencl/math/native_log2.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_log2
diff --git a/libclc/opencl/lib/generic/math/native_powr.cl b/libclc/opencl/lib/generic/math/native_powr.cl
index f325d53321b1d..d1b2c5b93175f 100644
--- a/libclc/opencl/lib/generic/math/native_powr.cl
+++ b/libclc/opencl/lib/generic/math/native_powr.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_powr.h>
-#include <clc/opencl/math/native_powr.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_powr
diff --git a/libclc/opencl/lib/generic/math/native_recip.cl b/libclc/opencl/lib/generic/math/native_recip.cl
index 20d81ed9f1b79..05df5e10cdbd7 100644
--- a/libclc/opencl/lib/generic/math/native_recip.cl
+++ b/libclc/opencl/lib/generic/math/native_recip.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_recip.h>
-#include <clc/opencl/math/native_recip.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_recip
diff --git a/libclc/opencl/lib/generic/math/native_rsqrt.cl b/libclc/opencl/lib/generic/math/native_rsqrt.cl
index 8f308e74f334c..3c8c72098db00 100644
--- a/libclc/opencl/lib/generic/math/native_rsqrt.cl
+++ b/libclc/opencl/lib/generic/math/native_rsqrt.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_rsqrt.h>
-#include <clc/opencl/math/native_rsqrt.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_rsqrt
diff --git a/libclc/opencl/lib/generic/math/native_sin.cl b/libclc/opencl/lib/generic/math/native_sin.cl
index ea7167822a818..4501e2f0fd8b1 100644
--- a/libclc/opencl/lib/generic/math/native_sin.cl
+++ b/libclc/opencl/lib/generic/math/native_sin.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_sin.h>
-#include <clc/opencl/math/native_sin.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_sin
diff --git a/libclc/opencl/lib/generic/math/native_sqrt.cl b/libclc/opencl/lib/generic/math/native_sqrt.cl
index fa38bdb3301d4..a7eb715f0ef51 100644
--- a/libclc/opencl/lib/generic/math/native_sqrt.cl
+++ b/libclc/opencl/lib/generic/math/native_sqrt.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_sqrt.h>
-#include <clc/opencl/math/native_sqrt.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_sqrt
diff --git a/libclc/opencl/lib/generic/math/native_tan.cl b/libclc/opencl/lib/generic/math/native_tan.cl
index 8cebf93bae91c..0ee7e827338ae 100644
--- a/libclc/opencl/lib/generic/math/native_tan.cl
+++ b/libclc/opencl/lib/generic/math/native_tan.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_tan.h>
-#include <clc/opencl/math/native_tan.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION native_tan
diff --git a/libclc/opencl/lib/generic/math/nextafter.cl b/libclc/opencl/lib/generic/math/nextafter.cl
index 256f06bf58550..6862432a81c7d 100644
--- a/libclc/opencl/lib/generic/math/nextafter.cl
+++ b/libclc/opencl/lib/generic/math/nextafter.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_nextafter.h>
-#include <clc/opencl/math/nextafter.h>
#define __CLC_FUNCTION nextafter
#define __CLC_IMPL_FUNCTION(x) __clc_nextafter
diff --git a/libclc/opencl/lib/generic/math/pow.cl b/libclc/opencl/lib/generic/math/pow.cl
index bf43519265731..2fd3a50733ed5 100644
--- a/libclc/opencl/lib/generic/math/pow.cl
+++ b/libclc/opencl/lib/generic/math/pow.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_pow.h>
-#include <clc/opencl/math/pow.h>
#define __CLC_FUNCTION pow
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/pown.cl b/libclc/opencl/lib/generic/math/pown.cl
index 8c03be6bee168..e48bc10a636ab 100644
--- a/libclc/opencl/lib/generic/math/pown.cl
+++ b/libclc/opencl/lib/generic/math/pown.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_pown.h>
-#include <clc/opencl/math/pown.h>
#define __CLC_FUNCTION pown
#define __CLC_BODY <clc/shared/binary_def_with_int_second_arg.inc>
diff --git a/libclc/opencl/lib/generic/math/powr.cl b/libclc/opencl/lib/generic/math/powr.cl
index 680f9be894abb..168e30aa57b08 100644
--- a/libclc/opencl/lib/generic/math/powr.cl
+++ b/libclc/opencl/lib/generic/math/powr.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_powr.h>
-#include <clc/opencl/math/powr.h>
#define __CLC_FUNCTION powr
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/remainder.cl b/libclc/opencl/lib/generic/math/remainder.cl
index 42b37f847f6d1..cc5a4988b7c94 100644
--- a/libclc/opencl/lib/generic/math/remainder.cl
+++ b/libclc/opencl/lib/generic/math/remainder.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_remainder.h>
-#include <clc/opencl/math/remainder.h>
#define __CLC_FUNCTION remainder
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/remquo.cl b/libclc/opencl/lib/generic/math/remquo.cl
index de102af58fe9f..2bd359ca547f5 100644
--- a/libclc/opencl/lib/generic/math/remquo.cl
+++ b/libclc/opencl/lib/generic/math/remquo.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_remquo.h>
-#include <clc/opencl/math/remquo.h>
#define __CLC_BODY <remquo.inc>
#include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/math/rint.cl b/libclc/opencl/lib/generic/math/rint.cl
index 8beaa7ae064c5..1791123f637bc 100644
--- a/libclc/opencl/lib/generic/math/rint.cl
+++ b/libclc/opencl/lib/generic/math/rint.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_rint.h>
-#include <clc/opencl/math/rint.h>
#define __CLC_FUNCTION rint
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/rootn.cl b/libclc/opencl/lib/generic/math/rootn.cl
index 8f25ee1d31b47..8c9c7f4cc72f5 100644
--- a/libclc/opencl/lib/generic/math/rootn.cl
+++ b/libclc/opencl/lib/generic/math/rootn.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_rootn.h>
-#include <clc/opencl/math/rootn.h>
#define __CLC_FUNCTION rootn
#define __CLC_BODY <clc/shared/binary_def_with_int_second_arg.inc>
diff --git a/libclc/opencl/lib/generic/math/round.cl b/libclc/opencl/lib/generic/math/round.cl
index 79b04752e9dec..8af24a8ba0b1b 100644
--- a/libclc/opencl/lib/generic/math/round.cl
+++ b/libclc/opencl/lib/generic/math/round.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_round.h>
-#include <clc/opencl/math/round.h>
#define __CLC_FUNCTION round
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/rsqrt.cl b/libclc/opencl/lib/generic/math/rsqrt.cl
index f7137f5a007d3..269462f85d951 100644
--- a/libclc/opencl/lib/generic/math/rsqrt.cl
+++ b/libclc/opencl/lib/generic/math/rsqrt.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_rsqrt.h>
-#include <clc/opencl/math/rsqrt.h>
#define __CLC_FUNCTION rsqrt
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/sin.cl b/libclc/opencl/lib/generic/math/sin.cl
index e198198bcbe86..7ffdc3329749e 100644
--- a/libclc/opencl/lib/generic/math/sin.cl
+++ b/libclc/opencl/lib/generic/math/sin.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sin.h>
-#include <clc/opencl/math/sin.h>
#define __CLC_FUNCTION sin
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/sincos.cl b/libclc/opencl/lib/generic/math/sincos.cl
index 845e966966c51..aa1fc0cf4d806 100644
--- a/libclc/opencl/lib/generic/math/sincos.cl
+++ b/libclc/opencl/lib/generic/math/sincos.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sincos.h>
-#include <clc/opencl/math/sincos.h>
#define __CLC_FUNCTION sincos
#define __CLC_BODY <clc/math/unary_def_with_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/sinh.cl b/libclc/opencl/lib/generic/math/sinh.cl
index 6d5f1b1c269c1..e1f4d115d4d0d 100644
--- a/libclc/opencl/lib/generic/math/sinh.cl
+++ b/libclc/opencl/lib/generic/math/sinh.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sinh.h>
-#include <clc/opencl/math/sinh.h>
#define __CLC_FUNCTION sinh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/sinpi.cl b/libclc/opencl/lib/generic/math/sinpi.cl
index 33b04532e7763..2c0024b908ea4 100644
--- a/libclc/opencl/lib/generic/math/sinpi.cl
+++ b/libclc/opencl/lib/generic/math/sinpi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sinpi.h>
-#include <clc/opencl/math/sinpi.h>
#define __CLC_FUNCTION sinpi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/sqrt.cl b/libclc/opencl/lib/generic/math/sqrt.cl
index 9984ddb9d5a41..4c5a76d14a5de 100644
--- a/libclc/opencl/lib/generic/math/sqrt.cl
+++ b/libclc/opencl/lib/generic/math/sqrt.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sqrt.h>
-#include <clc/opencl/math/sqrt.h>
#define __CLC_FUNCTION sqrt
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/tan.cl b/libclc/opencl/lib/generic/math/tan.cl
index 89a5251111675..7b9e504d7f25d 100644
--- a/libclc/opencl/lib/generic/math/tan.cl
+++ b/libclc/opencl/lib/generic/math/tan.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_tan.h>
-#include <clc/opencl/math/tan.h>
#define __CLC_FUNCTION tan
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/tanh.cl b/libclc/opencl/lib/generic/math/tanh.cl
index 92307eafdd05f..539085a3f243d 100644
--- a/libclc/opencl/lib/generic/math/tanh.cl
+++ b/libclc/opencl/lib/generic/math/tanh.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_tanh.h>
-#include <clc/opencl/math/tanh.h>
#define __CLC_FUNCTION tanh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/tanpi.cl b/libclc/opencl/lib/generic/math/tanpi.cl
index 47e943ba77416..4ebde1d1652e2 100644
--- a/libclc/opencl/lib/generic/math/tanpi.cl
+++ b/libclc/opencl/lib/generic/math/tanpi.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_tanpi.h>
-#include <clc/opencl/math/tanpi.h>
#define __CLC_FUNCTION tanpi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/tgamma.cl b/libclc/opencl/lib/generic/math/tgamma.cl
index 2749cf3dfc0f4..1e11b5f5ed64f 100644
--- a/libclc/opencl/lib/generic/math/tgamma.cl
+++ b/libclc/opencl/lib/generic/math/tgamma.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_tgamma.h>
-#include <clc/opencl/math/tgamma.h>
#define __CLC_FUNCTION tgamma
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/trunc.cl b/libclc/opencl/lib/generic/math/trunc.cl
index b276996995344..724b646afa153 100644
--- a/libclc/opencl/lib/generic/math/trunc.cl
+++ b/libclc/opencl/lib/generic/math/trunc.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_trunc.h>
-#include <clc/opencl/math/trunc.h>
#define __CLC_FUNCTION trunc
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/misc/shuffle.cl b/libclc/opencl/lib/generic/misc/shuffle.cl
index f9187be453e65..7c47fb8ea9cfc 100644
--- a/libclc/opencl/lib/generic/misc/shuffle.cl
+++ b/libclc/opencl/lib/generic/misc/shuffle.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/misc/clc_shuffle.h>
-#include <clc/opencl/misc/shuffle.h>
#define __CLC_FUNCTION shuffle
diff --git a/libclc/opencl/lib/generic/misc/shuffle2.cl b/libclc/opencl/lib/generic/misc/shuffle2.cl
index 0008340b622df..3fb3dbc2a5805 100644
--- a/libclc/opencl/lib/generic/misc/shuffle2.cl
+++ b/libclc/opencl/lib/generic/misc/shuffle2.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/misc/clc_shuffle2.h>
-#include <clc/opencl/misc/shuffle2.h>
#define __CLC_FUNCTION shuffle2
diff --git a/libclc/opencl/lib/generic/relational/all.cl b/libclc/opencl/lib/generic/relational/all.cl
index f72da2cb622c9..c896b811964f6 100644
--- a/libclc/opencl/lib/generic/relational/all.cl
+++ b/libclc/opencl/lib/generic/relational/all.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/all.h>
#include <clc/relational/clc_all.h>
#define __CLC_ALL_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int all(TYPE v)
diff --git a/libclc/opencl/lib/generic/relational/any.cl b/libclc/opencl/lib/generic/relational/any.cl
index b2b48dbf1ab04..e6fb84dd182f0 100644
--- a/libclc/opencl/lib/generic/relational/any.cl
+++ b/libclc/opencl/lib/generic/relational/any.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/any.h>
#include <clc/relational/clc_any.h>
#define __CLC_ANY_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int any(TYPE v)
diff --git a/libclc/opencl/lib/generic/relational/bitselect.cl b/libclc/opencl/lib/generic/relational/bitselect.cl
index 0be7e5321caf0..b4b4707d28cdf 100644
--- a/libclc/opencl/lib/generic/relational/bitselect.cl
+++ b/libclc/opencl/lib/generic/relational/bitselect.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/bitselect.h>
#include <clc/relational/clc_bitselect.h>
#define __CLC_BODY <bitselect.inc>
diff --git a/libclc/opencl/lib/generic/relational/isequal.cl b/libclc/opencl/lib/generic/relational/isequal.cl
index 40718dbca9d05..6bbf7d4d664aa 100644
--- a/libclc/opencl/lib/generic/relational/isequal.cl
+++ b/libclc/opencl/lib/generic/relational/isequal.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isequal.h>
#include <clc/relational/clc_isequal.h>
#define __CLC_FUNCTION isequal
diff --git a/libclc/opencl/lib/generic/relational/isfinite.cl b/libclc/opencl/lib/generic/relational/isfinite.cl
index f055e295416c9..67c59ea42c426 100644
--- a/libclc/opencl/lib/generic/relational/isfinite.cl
+++ b/libclc/opencl/lib/generic/relational/isfinite.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isfinite.h>
#include <clc/relational/clc_isfinite.h>
#define __CLC_FUNCTION isfinite
diff --git a/libclc/opencl/lib/generic/relational/isgreater.cl b/libclc/opencl/lib/generic/relational/isgreater.cl
index ae73769267dc8..ca4c068855a46 100644
--- a/libclc/opencl/lib/generic/relational/isgreater.cl
+++ b/libclc/opencl/lib/generic/relational/isgreater.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isgreater.h>
#include <clc/relational/clc_isgreater.h>
#define __CLC_FUNCTION isgreater
diff --git a/libclc/opencl/lib/generic/relational/isgreaterequal.cl b/libclc/opencl/lib/generic/relational/isgreaterequal.cl
index 725c3289bb05f..e97b6f6119ae6 100644
--- a/libclc/opencl/lib/generic/relational/isgreaterequal.cl
+++ b/libclc/opencl/lib/generic/relational/isgreaterequal.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isgreaterequal.h>
#include <clc/relational/clc_isgreaterequal.h>
#define __CLC_FUNCTION isgreaterequal
diff --git a/libclc/opencl/lib/generic/relational/isinf.cl b/libclc/opencl/lib/generic/relational/isinf.cl
index 9558b0f9eb5ee..2f5571b8b0124 100644
--- a/libclc/opencl/lib/generic/relational/isinf.cl
+++ b/libclc/opencl/lib/generic/relational/isinf.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isinf.h>
#include <clc/relational/clc_isinf.h>
#define __CLC_FUNCTION isinf
diff --git a/libclc/opencl/lib/generic/relational/isless.cl b/libclc/opencl/lib/generic/relational/isless.cl
index 6ed0857d354a3..3673c050c9157 100644
--- a/libclc/opencl/lib/generic/relational/isless.cl
+++ b/libclc/opencl/lib/generic/relational/isless.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isless.h>
#include <clc/relational/clc_isless.h>
#define __CLC_FUNCTION isless
diff --git a/libclc/opencl/lib/generic/relational/islessequal.cl b/libclc/opencl/lib/generic/relational/islessequal.cl
index c4697ca56f982..c7e840cbe44cd 100644
--- a/libclc/opencl/lib/generic/relational/islessequal.cl
+++ b/libclc/opencl/lib/generic/relational/islessequal.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/islessequal.h>
#include <clc/relational/clc_islessequal.h>
#define __CLC_FUNCTION islessequal
diff --git a/libclc/opencl/lib/generic/relational/islessgreater.cl b/libclc/opencl/lib/generic/relational/islessgreater.cl
index eb4cdc24c0679..057c35c7c7ff3 100644
--- a/libclc/opencl/lib/generic/relational/islessgreater.cl
+++ b/libclc/opencl/lib/generic/relational/islessgreater.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/islessgreater.h>
#include <clc/relational/clc_islessgreater.h>
#define __CLC_FUNCTION islessgreater
diff --git a/libclc/opencl/lib/generic/relational/isnan.cl b/libclc/opencl/lib/generic/relational/isnan.cl
index 4bae2ae077c13..248cc17af5159 100644
--- a/libclc/opencl/lib/generic/relational/isnan.cl
+++ b/libclc/opencl/lib/generic/relational/isnan.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isnan.h>
#include <clc/relational/clc_isnan.h>
#define __CLC_FUNCTION isnan
diff --git a/libclc/opencl/lib/generic/relational/isnormal.cl b/libclc/opencl/lib/generic/relational/isnormal.cl
index d4ea20a27cdb6..6d046c375b2a3 100644
--- a/libclc/opencl/lib/generic/relational/isnormal.cl
+++ b/libclc/opencl/lib/generic/relational/isnormal.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isnormal.h>
#include <clc/relational/clc_isnormal.h>
#define __CLC_FUNCTION isnormal
diff --git a/libclc/opencl/lib/generic/relational/isnotequal.cl b/libclc/opencl/lib/generic/relational/isnotequal.cl
index e24d57564cb8c..5bf6907587672 100644
--- a/libclc/opencl/lib/generic/relational/isnotequal.cl
+++ b/libclc/opencl/lib/generic/relational/isnotequal.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isnotequal.h>
#include <clc/relational/clc_isnotequal.h>
#define __CLC_FUNCTION isnotequal
diff --git a/libclc/opencl/lib/generic/relational/isordered.cl b/libclc/opencl/lib/generic/relational/isordered.cl
index 773cf1947e68e..0ce72493638c3 100644
--- a/libclc/opencl/lib/generic/relational/isordered.cl
+++ b/libclc/opencl/lib/generic/relational/isordered.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isordered.h>
#include <clc/relational/clc_isordered.h>
#define __CLC_FUNCTION isordered
diff --git a/libclc/opencl/lib/generic/relational/isunordered.cl b/libclc/opencl/lib/generic/relational/isunordered.cl
index 44427ea5e6046..6bea618618591 100644
--- a/libclc/opencl/lib/generic/relational/isunordered.cl
+++ b/libclc/opencl/lib/generic/relational/isunordered.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/isunordered.h>
#include <clc/relational/clc_isunordered.h>
#define __CLC_FUNCTION isunordered
diff --git a/libclc/opencl/lib/generic/relational/select.cl b/libclc/opencl/lib/generic/relational/select.cl
index 47a7b8e5ad114..4b3ea01d5303f 100644
--- a/libclc/opencl/lib/generic/relational/select.cl
+++ b/libclc/opencl/lib/generic/relational/select.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/select.h>
#include <clc/relational/clc_select.h>
#include <clc/utils.h>
diff --git a/libclc/opencl/lib/generic/relational/signbit.cl b/libclc/opencl/lib/generic/relational/signbit.cl
index b1f3ac89933f7..50c4b2ab2bf4a 100644
--- a/libclc/opencl/lib/generic/relational/signbit.cl
+++ b/libclc/opencl/lib/generic/relational/signbit.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/relational/signbit.h>
#include <clc/relational/clc_signbit.h>
#define __CLC_FUNCTION signbit
diff --git a/libclc/opencl/lib/generic/shared/clamp.cl b/libclc/opencl/lib/generic/shared/clamp.cl
index 6e2bedc0704ff..8f740dab47e04 100644
--- a/libclc/opencl/lib/generic/shared/clamp.cl
+++ b/libclc/opencl/lib/generic/shared/clamp.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/shared/clamp.h>
#include <clc/shared/clc_clamp.h>
#define __CLC_BODY <clamp.inc>
diff --git a/libclc/opencl/lib/generic/shared/max.cl b/libclc/opencl/lib/generic/shared/max.cl
index 5cb5ff124bd01..a0018c4b11fdc 100644
--- a/libclc/opencl/lib/generic/shared/max.cl
+++ b/libclc/opencl/lib/generic/shared/max.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/shared/max.h>
#include <clc/shared/clc_max.h>
#define __CLC_BODY <max.inc>
diff --git a/libclc/opencl/lib/generic/shared/min.cl b/libclc/opencl/lib/generic/shared/min.cl
index 2a1ded3aa0288..f0ddca2a133b7 100644
--- a/libclc/opencl/lib/generic/shared/min.cl
+++ b/libclc/opencl/lib/generic/shared/min.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/shared/min.h>
#include <clc/shared/clc_min.h>
#define __CLC_BODY <min.inc>
diff --git a/libclc/opencl/lib/generic/shared/vload.cl b/libclc/opencl/lib/generic/shared/vload.cl
index 6f1ca06ccb8be..d31697378a2e5 100644
--- a/libclc/opencl/lib/generic/shared/vload.cl
+++ b/libclc/opencl/lib/generic/shared/vload.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/shared/vload.h>
#include <clc/shared/clc_vload.h>
#define __CLC_BODY "vload.inc"
diff --git a/libclc/opencl/lib/generic/shared/vstore.cl b/libclc/opencl/lib/generic/shared/vstore.cl
index 1d62de810ff75..915cd8754964e 100644
--- a/libclc/opencl/lib/generic/shared/vstore.cl
+++ b/libclc/opencl/lib/generic/shared/vstore.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/shared/vstore.h>
#include <clc/shared/clc_vstore.h>
#define __CLC_BODY "vstore.inc"
diff --git a/libclc/opencl/lib/generic/workitem/get_global_id.cl b/libclc/opencl/lib/generic/workitem/get_global_id.cl
index 5e417bef0d2bd..f56981975acd3 100644
--- a/libclc/opencl/lib/generic/workitem/get_global_id.cl
+++ b/libclc/opencl/lib/generic/workitem/get_global_id.cl
@@ -6,11 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_id.h>
-#include <clc/opencl/workitem/get_global_offset.h>
-#include <clc/opencl/workitem/get_group_id.h>
-#include <clc/opencl/workitem/get_local_id.h>
-#include <clc/opencl/workitem/get_local_size.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF _CLC_OVERLOAD size_t get_global_id(uint dim) {
return get_group_id(dim) * get_local_size(dim) + get_local_id(dim) +
diff --git a/libclc/opencl/lib/generic/workitem/get_global_size.cl b/libclc/opencl/lib/generic/workitem/get_global_size.cl
index d62e9e91888ac..34d00f8fa809b 100644
--- a/libclc/opencl/lib/generic/workitem/get_global_size.cl
+++ b/libclc/opencl/lib/generic/workitem/get_global_size.cl
@@ -6,9 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_size.h>
-#include <clc/opencl/workitem/get_local_size.h>
-#include <clc/opencl/workitem/get_num_groups.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF _CLC_OVERLOAD size_t get_global_size(uint dim) {
return get_num_groups(dim) * get_local_size(dim);
diff --git a/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl b/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl
index 19721574e4053..c799cf2ad7dde 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/mem_fence/clc_mem_fence.h>
-#include <clc/opencl/explicit_fence/explicit_memory_fence.h>
#include <clc/opencl/synchronization/utils.h>
_CLC_DEF _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags) {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl b/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl
index dd7d1507f5ad4..9f67b6ebcb6db 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/synchronization/barrier.h>
#include <clc/opencl/synchronization/utils.h>
#include <clc/synchronization/clc_work_group_barrier.h>
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl
index f09fa92dbe702..c84991ade76fc 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_id.h>
#include <clc/workitem/clc_get_global_id.h>
_CLC_OVERLOAD _CLC_DEF size_t get_global_id(uint dim) {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl
index 1bcd756bdd16e..6fc9832058736 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_group_id.h>
#include <clc/workitem/clc_get_group_id.h>
_CLC_OVERLOAD _CLC_DEF size_t get_group_id(uint dim) {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl
index f355b757b83b8..a2b608baf7aeb 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_local_id.h>
#include <clc/workitem/clc_get_local_id.h>
_CLC_OVERLOAD _CLC_DEF size_t get_local_id(uint dim) {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_linear_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_linear_id.cl
index 8c7637b4fe31e..ccb301960726a 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_linear_id.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_linear_id.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_local_linear_id.h>
#include <clc/workitem/clc_get_local_linear_id.h>
_CLC_OVERLOAD _CLC_DEF size_t get_local_linear_id() {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl
index b146c1ea1946d..61a6d8ef88f96 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_local_size.h>
#include <clc/workitem/clc_get_local_size.h>
_CLC_OVERLOAD _CLC_DEF size_t get_local_size(uint dim) {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_max_sub_group_size.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_max_sub_group_size.cl
index fd76f7c5d0aa5..aa06c9561404b 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_max_sub_group_size.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_max_sub_group_size.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_max_sub_group_size.h>
#include <clc/workitem/clc_get_max_sub_group_size.h>
_CLC_OVERLOAD _CLC_DEF uint get_max_sub_group_size() {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl
index 87e285d50205a..6beadd3ca8982 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_num_groups.h>
#include <clc/workitem/clc_get_num_groups.h>
_CLC_OVERLOAD _CLC_DEF size_t get_num_groups(uint dim) {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_sub_groups.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_sub_groups.cl
index 1be77a325c0f3..e23d78dafa5e8 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_sub_groups.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_sub_groups.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_num_sub_groups.h>
#include <clc/workitem/clc_get_num_sub_groups.h>
_CLC_OVERLOAD _CLC_DEF uint get_num_sub_groups() {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_id.cl
index e538b86f12515..deb6134cd0704 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_id.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_id.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_sub_group_id.h>
#include <clc/workitem/clc_get_sub_group_id.h>
_CLC_OVERLOAD _CLC_DEF uint get_sub_group_id() {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_local_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_local_id.cl
index 2a8cfd57d85b2..37487fbf3ece8 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_local_id.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_local_id.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_sub_group_local_id.h>
#include <clc/workitem/clc_get_sub_group_local_id.h>
_CLC_OVERLOAD _CLC_DEF uint get_sub_group_local_id() {
diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_size.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_size.cl
index f32d820d6418f..e6be6f75171d1 100644
--- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_size.cl
+++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_size.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_sub_group_size.h>
#include <clc/workitem/clc_get_sub_group_size.h>
_CLC_OVERLOAD _CLC_DEF uint get_sub_group_size() {
diff --git a/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl b/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl
index f28b7d458ca4f..7fed814d3ef15 100644
--- a/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl
+++ b/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL int __clc_get_image_channel_data_type_2d(image2d_t);
_CLC_DECL int __clc_get_image_channel_data_type_3d(image3d_t);
diff --git a/libclc/opencl/lib/r600/image/get_image_channel_order.cl b/libclc/opencl/lib/r600/image/get_image_channel_order.cl
index da6d783e7f01a..1ad4dedb39be4 100644
--- a/libclc/opencl/lib/r600/image/get_image_channel_order.cl
+++ b/libclc/opencl/lib/r600/image/get_image_channel_order.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL int __clc_get_image_channel_order_2d(image2d_t);
_CLC_DECL int __clc_get_image_channel_order_3d(image3d_t);
diff --git a/libclc/opencl/lib/r600/image/get_image_depth.cl b/libclc/opencl/lib/r600/image/get_image_depth.cl
index 1731d85dc4c3d..b7bb8c8b841eb 100644
--- a/libclc/opencl/lib/r600/image/get_image_depth.cl
+++ b/libclc/opencl/lib/r600/image/get_image_depth.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL int __clc_get_image_depth_3d(image3d_t);
diff --git a/libclc/opencl/lib/r600/image/get_image_dim.cl b/libclc/opencl/lib/r600/image/get_image_dim.cl
index 6929d12ad1a5a..91986156c1735 100644
--- a/libclc/opencl/lib/r600/image/get_image_dim.cl
+++ b/libclc/opencl/lib/r600/image/get_image_dim.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_OVERLOAD _CLC_DEF int2 get_image_dim(image2d_t image) {
return (int2)(get_image_width(image), get_image_height(image));
diff --git a/libclc/opencl/lib/r600/image/get_image_height.cl b/libclc/opencl/lib/r600/image/get_image_height.cl
index 14a21823a826d..cfdfa8972d31d 100644
--- a/libclc/opencl/lib/r600/image/get_image_height.cl
+++ b/libclc/opencl/lib/r600/image/get_image_height.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL int __clc_get_image_height_2d(image2d_t);
_CLC_DECL int __clc_get_image_height_3d(image3d_t);
diff --git a/libclc/opencl/lib/r600/image/get_image_width.cl b/libclc/opencl/lib/r600/image/get_image_width.cl
index fa54ec3628f2d..eb7bd73ea2f56 100644
--- a/libclc/opencl/lib/r600/image/get_image_width.cl
+++ b/libclc/opencl/lib/r600/image/get_image_width.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL int __clc_get_image_width_2d(image2d_t);
_CLC_DECL int __clc_get_image_width_3d(image3d_t);
diff --git a/libclc/opencl/lib/r600/image/read_imagef.cl b/libclc/opencl/lib/r600/image/read_imagef.cl
index fc597b762e52e..263972f7c22fc 100644
--- a/libclc/opencl/lib/r600/image/read_imagef.cl
+++ b/libclc/opencl/lib/r600/image/read_imagef.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2);
diff --git a/libclc/opencl/lib/r600/image/read_imagei.cl b/libclc/opencl/lib/r600/image/read_imagei.cl
index bc54a631eabb5..24ec6b1a6661a 100644
--- a/libclc/opencl/lib/r600/image/read_imagei.cl
+++ b/libclc/opencl/lib/r600/image/read_imagei.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2);
diff --git a/libclc/opencl/lib/r600/image/read_imageui.cl b/libclc/opencl/lib/r600/image/read_imageui.cl
index 8c266b9f2f854..30bbe766d671c 100644
--- a/libclc/opencl/lib/r600/image/read_imageui.cl
+++ b/libclc/opencl/lib/r600/image/read_imageui.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2);
diff --git a/libclc/opencl/lib/r600/image/write_imagef.cl b/libclc/opencl/lib/r600/image/write_imagef.cl
index 0e828acad0823..85d9a0bce86d9 100644
--- a/libclc/opencl/lib/r600/image/write_imagef.cl
+++ b/libclc/opencl/lib/r600/image/write_imagef.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL void __clc_write_imagef_2d(image2d_t image, int2 coord, float4 color);
diff --git a/libclc/opencl/lib/r600/image/write_imagei.cl b/libclc/opencl/lib/r600/image/write_imagei.cl
index 88ea35634abcd..73bfb94644a7e 100644
--- a/libclc/opencl/lib/r600/image/write_imagei.cl
+++ b/libclc/opencl/lib/r600/image/write_imagei.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL void __clc_write_imagei_2d(image2d_t image, int2 coord, int4 color);
diff --git a/libclc/opencl/lib/r600/image/write_imageui.cl b/libclc/opencl/lib/r600/image/write_imageui.cl
index 40f3f33345836..c2f477d39b039 100644
--- a/libclc/opencl/lib/r600/image/write_imageui.cl
+++ b/libclc/opencl/lib/r600/image/write_imageui.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/image/image.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DECL void __clc_write_imageui_2d(image2d_t image, int2 coord, uint4 color);
diff --git a/libclc/opencl/lib/r600/synchronization/barrier.cl b/libclc/opencl/lib/r600/synchronization/barrier.cl
index 69e87d9497fde..a6a7dcfc6be2e 100644
--- a/libclc/opencl/lib/r600/synchronization/barrier.cl
+++ b/libclc/opencl/lib/r600/synchronization/barrier.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/explicit_fence/explicit_memory_fence.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF void __clc_r600_barrier(void) __asm("llvm.r600.group.barrier");
diff --git a/libclc/opencl/lib/r600/workitem/get_global_offset.cl b/libclc/opencl/lib/r600/workitem/get_global_offset.cl
index 988e482de2391..477e8f405ec07 100644
--- a/libclc/opencl/lib/r600/workitem/get_global_offset.cl
+++ b/libclc/opencl/lib/r600/workitem/get_global_offset.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_offset.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF _CLC_OVERLOAD uint get_global_offset(uint dim) {
__attribute__((address_space(7))) uint *ptr =
diff --git a/libclc/opencl/lib/r600/workitem/get_global_size.cl b/libclc/opencl/lib/r600/workitem/get_global_size.cl
index 298487f87dc1e..3ea3881d2f3c6 100644
--- a/libclc/opencl/lib/r600/workitem/get_global_size.cl
+++ b/libclc/opencl/lib/r600/workitem/get_global_size.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_global_size.h>
+#include <clc/opencl/opencl-base.h>
uint __clc_r600_get_global_size_x(void) __asm("llvm.r600.read.global.size.x");
uint __clc_r600_get_global_size_y(void) __asm("llvm.r600.read.global.size.y");
diff --git a/libclc/opencl/lib/r600/workitem/get_group_id.cl b/libclc/opencl/lib/r600/workitem/get_group_id.cl
index 196f0f21241e8..bf426cc2bb4dd 100644
--- a/libclc/opencl/lib/r600/workitem/get_group_id.cl
+++ b/libclc/opencl/lib/r600/workitem/get_group_id.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_group_id.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF _CLC_OVERLOAD uint get_group_id(uint dim) {
switch (dim) {
diff --git a/libclc/opencl/lib/r600/workitem/get_local_id.cl b/libclc/opencl/lib/r600/workitem/get_local_id.cl
index 1321e1e8362e2..4915e07e7f181 100644
--- a/libclc/opencl/lib/r600/workitem/get_local_id.cl
+++ b/libclc/opencl/lib/r600/workitem/get_local_id.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_local_id.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF _CLC_OVERLOAD uint get_local_id(uint dim) {
switch (dim) {
diff --git a/libclc/opencl/lib/r600/workitem/get_local_size.cl b/libclc/opencl/lib/r600/workitem/get_local_size.cl
index c0e4e15542769..877d9c359342c 100644
--- a/libclc/opencl/lib/r600/workitem/get_local_size.cl
+++ b/libclc/opencl/lib/r600/workitem/get_local_size.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_local_size.h>
+#include <clc/opencl/opencl-base.h>
uint __clc_r600_get_local_size_x(void) __asm("llvm.r600.read.local.size.x");
uint __clc_r600_get_local_size_y(void) __asm("llvm.r600.read.local.size.y");
diff --git a/libclc/opencl/lib/r600/workitem/get_num_groups.cl b/libclc/opencl/lib/r600/workitem/get_num_groups.cl
index 098a9cb86a6dc..d04a69f9e0aa4 100644
--- a/libclc/opencl/lib/r600/workitem/get_num_groups.cl
+++ b/libclc/opencl/lib/r600/workitem/get_num_groups.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_num_groups.h>
+#include <clc/opencl/opencl-base.h>
uint __clc_r600_get_num_groups_x(void) __asm("llvm.r600.read.ngroups.x");
uint __clc_r600_get_num_groups_y(void) __asm("llvm.r600.read.ngroups.y");
diff --git a/libclc/opencl/lib/r600/workitem/get_work_dim.cl b/libclc/opencl/lib/r600/workitem/get_work_dim.cl
index a7917b864e407..1b743ae925a37 100644
--- a/libclc/opencl/lib/r600/workitem/get_work_dim.cl
+++ b/libclc/opencl/lib/r600/workitem/get_work_dim.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/workitem/get_work_dim.h>
+#include <clc/opencl/opencl-base.h>
_CLC_DEF _CLC_OVERLOAD uint get_work_dim(void) {
__attribute__((address_space(7))) uint *ptr =
diff --git a/libclc/opencl/lib/spirv/math/fma.cl b/libclc/opencl/lib/spirv/math/fma.cl
index 0e328903ba263..172ec32b8a3b3 100644
--- a/libclc/opencl/lib/spirv/math/fma.cl
+++ b/libclc/opencl/lib/spirv/math/fma.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/internal/math/clc_sw_fma.h>
-#include <clc/opencl/math/fma.h>
#define __CLC_FLOAT_ONLY
#define __CLC_FUNCTION fma
More information about the cfe-commits
mailing list