Skip to content

Commit d692078

Browse files
author
Steffen Larsen
committed
[SYCL][libclc] Remangler tool for consistent mangling
Libclc mangling is either done manually or done based on the function signatures if requested. However, since libclc uses OpenCL C, the primitive types are of set sizes and signedness, eg. long must be 64 bits and char must be signed. When a target disagrees on primitive types it may use incompatible libclc functions due to inconsistent mangling between libclc and the target. This commit adds a tool for remangling libclc bitcode files such that the mangled names match the primitive types for the target. Additionally it creates aliases where appropriate, eg. if long is 32 bits on the target a function using long will have its mangling changed to appear as if it is using long long instead, and the old mangling will be made an alias to an existing 32-bit integer version of the function if such a function exists. Signed-off-by: Steffen Larsen <[email protected]>
1 parent a0d9c40 commit d692078

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+751
-330
lines changed

buildbot/configure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def do_configure(args):
2727
llvm_targets_to_build = 'X86'
2828
llvm_enable_projects = 'clang;' + llvm_external_projects
2929
libclc_targets_to_build = ''
30+
libclc_gen_remangled_variants = 'OFF'
3031
sycl_build_pi_cuda = 'OFF'
3132
sycl_build_pi_esimd_cpu = 'ON'
3233
sycl_build_pi_rocm = 'OFF'
@@ -53,6 +54,7 @@ def do_configure(args):
5354
if args.cuda:
5455
llvm_targets_to_build += ';NVPTX'
5556
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
57+
libclc_gen_remangled_variants = 'ON'
5658
sycl_build_pi_cuda = 'ON'
5759

5860
if args.rocm:
@@ -62,6 +64,7 @@ def do_configure(args):
6264
elif args.rocm_platform == 'NVIDIA' and not args.cuda:
6365
llvm_targets_to_build += ';NVPTX'
6466
libclc_targets_to_build += ';nvptx64--;nvptx64--nvidiacl'
67+
libclc_gen_remangled_variants = 'ON'
6568

6669
sycl_build_pi_rocm_platform = args.rocm_platform
6770
sycl_build_pi_rocm = 'ON'
@@ -99,6 +102,7 @@ def do_configure(args):
99102
"-DLLVM_EXTERNAL_LIBDEVICE_SOURCE_DIR={}".format(libdevice_dir),
100103
"-DLLVM_ENABLE_PROJECTS={}".format(llvm_enable_projects),
101104
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),
105+
"-DLIBCLC_GENERATE_REMANGLED_VARIANTS={}".format(libclc_gen_remangled_variants),
102106
"-DSYCL_BUILD_PI_CUDA={}".format(sycl_build_pi_cuda),
103107
"-DSYCL_BUILD_PI_ROCM={}".format(sycl_build_pi_rocm),
104108
"-DSYCL_BUILD_PI_ROCM_PLATFORM={}".format(sycl_build_pi_rocm_platform),

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def warn_drv_unknown_cuda_version: Warning<
7979
InGroup<CudaUnknownVersion>;
8080
def err_drv_cuda_host_arch : Error<"unsupported architecture '%0' for host compilation.">;
8181
def err_drv_no_sycl_libspirv : Error<
82-
"cannot find `libspirv-nvptx64--nvidiacl.bc`. Provide path to libspirv library via "
82+
"cannot find suitable `libspirv-nvptx64--nvidiacl.bc` variant. Provide path to libspirv library via "
8383
"-fsycl-libspirv-path, or pass -fno-sycl-libspirv to build without linking with libspirv.">;
8484
def err_drv_mix_cuda_hip : Error<"Mixed Cuda and HIP compilation is not supported.">;
8585
def err_drv_bad_target_id : Error<"Invalid target ID: %0 (A target ID is a processor name "

clang/lib/Driver/ToolChains/Cuda.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,8 @@ void CudaToolChain::addClangTargetOptions(
722722
llvm::sys::path::append(WithInstallPath, Twine("../../../share/clc"));
723723
LibraryPaths.emplace_back(WithInstallPath.c_str());
724724

725-
std::string LibSpirvTargetName = "libspirv-nvptx64--nvidiacl.bc";
725+
std::string LibSpirvTargetName =
726+
"remangled-l64-signed_char.libspirv-nvptx64--nvidiacl.bc";
726727
for (StringRef LibraryPath : LibraryPaths) {
727728
SmallString<128> LibSpirvTargetFile(LibraryPath);
728729
llvm::sys::path::append(LibSpirvTargetFile, LibSpirvTargetName);

clang/lib/Driver/ToolChains/HIP.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ void HIPToolChain::addClangTargetOptions(
308308
llvm::sys::path::append(WithInstallPath, Twine("../../../share/clc"));
309309
LibraryPaths.emplace_back(WithInstallPath.c_str());
310310

311-
std::string LibSpirvTargetName = "libspirv-amdgcn--amdhsa.bc";
311+
std::string LibSpirvTargetName =
312+
"remangled-l64-signed_char.libspirv-amdgcn--amdhsa.bc";
312313
for (StringRef LibraryPath : LibraryPaths) {
313314
SmallString<128> LibSpirvTargetFile(LibraryPath);
314315
llvm::sys::path::append(LibSpirvTargetFile, LibSpirvTargetName);

clang/lib/Sema/SPIRVBuiltins.td

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,8 @@ class ConstOCLSPVBuiltin<string _Name, list<Type> _Signature> :
321321

322322
// OpenCL v1.0/1.2/2.0 s6.1.1: Built-in Scalar Data Types.
323323
def Bool : IntType<"bool", QualType<"Context.BoolTy">, 1>;
324-
def TrueChar : IntType<"_char", QualType<"Context.CharTy", 0, 1>, 8>;
325-
def Char : IntType<"char", QualType<"Context.SignedCharTy", 0, 1>, 8>;
326-
def SChar : IntType<"schar", QualType<"Context.SignedCharTy", 0, 1>, 8>;
324+
def Char : IntType<"char", QualType<"Context.CharTy", 0, 1>, 8>;
325+
def SChar : IntType<"schar", QualType<"Context.SignedCharTy", 0, 1>, 8>;
327326
def UChar : UIntType<"uchar", QualType<"Context.UnsignedCharTy">, 8>;
328327
def Short : IntType<"short", QualType<"Context.ShortTy", 0, 1>, 16>;
329328
def UShort : UIntType<"ushort", QualType<"Context.UnsignedShortTy">, 16>;
@@ -356,15 +355,13 @@ def Vec16 : IntList<"Vec16", [16]>;
356355
def Vec1234 : IntList<"Vec1234", [1, 2, 3, 4]>;
357356

358357
// Type lists.
359-
def TLAll : TypeList<[Char, UChar, Short, UShort, Int, UInt, Long, ULong, Float, Double, Half]>;
358+
def TLAll : TypeList<[Char, UChar, Short, UShort, Int, UInt, Long, ULong, Float, Double, Half]>;
360359
def TLAllUnsigned : TypeList<[UChar, UChar, UShort, UShort, UInt, UInt, ULong, ULong, UInt, ULong, UShort]>;
361360
def TLFloat : TypeList<[Float, Double, Half]>;
362-
// FIXME: handle properly char (signed or unsigned depending on host)
363361
def TLSignedInts : TypeList<[Char, Short, Int, Long]>;
364362
def TLUnsignedInts : TypeList<[UChar, UShort, UInt, ULong]>;
365363

366364
// Signed to Unsigned conversion
367-
// FIXME: handle properly char (signed or unsigned depending on host)
368365
def TLSToUSignedInts : TypeList<[Char, Short, Int, Long]>;
369366
def TLSToUUnsignedInts : TypeList<[UChar, UShort, UInt, ULong]>;
370367

@@ -375,7 +372,7 @@ def TLIntLongFloats : TypeList<[Int, UInt, Long, ULong, Float, Double, Half]>;
375372
// uchar abs(uchar).
376373
def TLAllUIntsTwice : TypeList<[UChar, UChar, UChar, UShort, UShort, UInt, UInt, ULong, ULong]>;
377374

378-
def TLAllInts : TypeList<[Char, UChar, Short, UShort, Int, UInt, Long, ULong]>;
375+
def TLAllInts : TypeList<[Char, SChar, UChar, Short, UShort, Int, UInt, Long, ULong]>;
379376

380377
// GenType definitions for multiple base types (e.g. all floating point types,
381378
// or all integer types).
@@ -402,7 +399,7 @@ def IntLongFloatGenType1 : GenericType<"IntLongFloatGenType1", TLIntLongFloats
402399

403400
// GenType definitions for every single base type (e.g. fp32 only).
404401
// Names are like: GenTypeFloatVecAndScalar.
405-
foreach Type = [Char, UChar, SChar, Short, UShort,
402+
foreach Type = [Char, SChar, UChar, Short, UShort,
406403
Int, UInt, Long, ULong,
407404
Float, Double, Half] in {
408405
foreach VecSizes = [VecAndScalar, VecNoScalar] in {
@@ -557,6 +554,7 @@ foreach name = ["s_clamp", "s_mad_hi", "s_mad_sat"] in {
557554

558555
foreach name = ["s_upsample"] in {
559556
def : ConstOCLSPVBuiltin<name, [GenTypeShortVecAndScalar, GenTypeCharVecAndScalar, GenTypeUCharVecAndScalar]>;
557+
def : ConstOCLSPVBuiltin<name, [GenTypeShortVecAndScalar, GenTypeSCharVecAndScalar, GenTypeUCharVecAndScalar]>;
560558
def : ConstOCLSPVBuiltin<name, [GenTypeIntVecAndScalar, GenTypeShortVecAndScalar, GenTypeUShortVecAndScalar]>;
561559
def : ConstOCLSPVBuiltin<name, [GenTypeLongVecAndScalar, GenTypeIntVecAndScalar, GenTypeUIntVecAndScalar]>;
562560
}
@@ -724,7 +722,7 @@ foreach VSize1 = [Vec2, Vec4, Vec8, Vec16] in {
724722

725723
let IsVariadic = 1 in {
726724
foreach name = ["printf"] in {
727-
def : OCLSPVBuiltin<name, [Int, PointerType<ConstType<TrueChar>, ConstantAS>]>;
725+
def : OCLSPVBuiltin<name, [Int, PointerType<ConstType<Char>, ConstantAS>]>;
728726
}
729727
}
730728

clang/test/Driver/sycl-libspirv-invalid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
// RUN: -fsycl-targets=nvptx64-nvidia-nvcl-sycldevice --cuda-path=%S/Inputs/CUDA/usr/local/cuda \
77
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/no-libspirv-exists-here.bc %s 2>&1 \
88
// RUN: | FileCheck --check-prefix=ERR %s
9-
// ERR: cannot find `libspirv-nvptx64--nvidiacl.bc`
9+
// ERR: cannot find suitable `libspirv-nvptx64--nvidiacl.bc` variant
1010

1111
// RUN: %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \
1212
// RUN: -fsycl-targets=nvptx64-nvidia-nvcl-sycldevice --cuda-path=%S/Inputs/CUDA/usr/local/cuda \
1313
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/no-libspirv-exists-here.bc -fno-sycl-libspirv %s 2>&1 \
1414
// RUN: | FileCheck --check-prefix=OK %s
15-
// OK-NOT: cannot find `libspirv-nvptx64--nvidiacl.bc`
15+
// OK-NOT: cannot find suitable `libspirv-nvptx64--nvidiacl.bc` variant

libclc/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ set( LIBCLC_TARGETS_TO_BUILD "all"
6565
option( ENABLE_RUNTIME_SUBNORMAL "Enable runtime linking of subnormal support."
6666
OFF )
6767

68+
option( LIBCLC_GENERATE_REMANGLED_VARIANTS
69+
"Generate remangled variants of enabled libclc targets."
70+
OFF )
71+
6872
# mesa3d environment is only available since LLVM 4.0
6973
if( ${LLVM_VERSION} VERSION_GREATER "3.9.0" )
7074
set( LIBCLC_TARGETS_ALL ${LIBCLC_TARGETS_ALL} amdgcn-mesa-mesa3d )
@@ -119,15 +123,19 @@ find_program( LLVM_AS llvm-as PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
119123
find_program( LLVM_LINK llvm-link PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
120124
find_program( LLVM_OPT opt PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
121125
find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
126+
find_program( LIBCLC_REMANGLER libclc-remangler PATHS ${LLVM_BINDIR}
127+
NO_DEFAULT_PATH )
122128

123129
# Print toolchain
124130
message( "clang: ${LLVM_CLANG}" )
125131
message( "llvm-as: ${LLVM_AS}" )
126132
message( "llvm-link: ${LLVM_LINK}" )
127133
message( "opt: ${LLVM_OPT}" )
128134
message( "llvm-spirv: ${LLVM_SPIRV}" )
135+
message( "libclc-remangler: ${LIBCLC_REMANGLER}" )
129136
message( "" )
130-
if( NOT LLVM_CLANG OR NOT LLVM_OPT OR NOT LLVM_AS OR NOT LLVM_LINK )
137+
if( NOT LLVM_CLANG OR NOT LLVM_OPT OR NOT LLVM_AS OR NOT LLVM_LINK
138+
OR NOT LIBCLC_REMANGLER )
131139
message( FATAL_ERROR "toolchain incomplete!" )
132140
endif()
133141

libclc/cmake/modules/AddLibclc.cmake

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,40 @@ macro(add_libclc_builtin_set arch_suffix)
105105
install(
106106
FILES ${LIBCLC_LIBRARY_OUTPUT_INTDIR}/${obj_suffix}
107107
DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )
108+
109+
# Generate remangled variants if requested
110+
if( LIBCLC_GENERATE_REMANGLED_VARIANTS )
111+
set(long_widths l32 l64)
112+
set(char_signedness signed unsigned)
113+
# All permutations of [l32, l64] and [signed, unsigned]
114+
foreach(long_width ${long_widths})
115+
foreach(signedness ${char_signedness})
116+
# Remangle
117+
set( builtins_remangle_path
118+
"${LIBCLC_LIBRARY_OUTPUT_INTDIR}/remangled-${long_width}-${signedness}_char.${obj_suffix}" )
119+
add_custom_command( OUTPUT "${builtins_remangle_path}"
120+
COMMAND libclc-remangler
121+
-o "${builtins_remangle_path}"
122+
--long-width=${long_width}
123+
--char-signedness=${signedness}
124+
"$<TARGET_PROPERTY:prepare-${obj_suffix},TARGET_FILE>"
125+
DEPENDS "prepare-${obj_suffix}" libclc-remangler )
126+
add_custom_target( "remangled-${long_width}-${signedness}_char.${obj_suffix}" ALL
127+
DEPENDS "${builtins_remangle_path}" )
128+
set_target_properties("remangled-${long_width}-${signedness}_char.${obj_suffix}"
129+
PROPERTIES TARGET_FILE "${builtins_remangle_path}")
130+
131+
# Add dependency to top-level pseudo target to ease making other
132+
# targets dependent on libclc.
133+
add_dependencies(${ARG_PARENT_TARGET} "remangled-${long_width}-${signedness}_char.${obj_suffix}")
134+
135+
# Keep remangled variants
136+
install(
137+
FILES ${builtins_remangle_path}
138+
DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )
139+
endforeach()
140+
endforeach()
141+
endif()
108142

109143
# nvptx-- targets don't include workitem builtins
110144
if( NOT ${t} MATCHES ".*ptx.*--$" )

libclc/cmake/modules/HandleInLLVMTree.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ macro(configure_in_llvm_tree)
33
set(LLVM_AS ${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-as)
44
set(LLVM_LINK ${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-link)
55
set(LLVM_OPT ${LLVM_RUNTIME_OUTPUT_INTDIR}/opt)
6+
set(LIBCLC_REMANGLER ${LLVM_RUNTIME_OUTPUT_INTDIR}/libclc-remangler)
67

78
if (NOT EXISTS ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
89
file(WRITE ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang "" )
@@ -16,6 +17,9 @@ macro(configure_in_llvm_tree)
1617
if (NOT EXISTS ${LLVM_RUNTIME_OUTPUT_INTDIR}/opt)
1718
file(WRITE ${LLVM_RUNTIME_OUTPUT_INTDIR}/opt "" )
1819
endif (NOT EXISTS ${LLVM_RUNTIME_OUTPUT_INTDIR}/opt)
20+
if (NOT EXISTS ${LLVM_RUNTIME_OUTPUT_INTDIR}/libclc-remangler)
21+
file(WRITE ${LLVM_RUNTIME_OUTPUT_INTDIR}/libclc-remangler "" )
22+
endif (NOT EXISTS ${LLVM_RUNTIME_OUTPUT_INTDIR}/libclc-remangler)
1923

2024
# Assume all works well
2125
# We can't test the compilers as they haven't been built yet

libclc/cmake/modules/HandleOutOfTreeLLVM.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ macro(configure_out_of_tree_llvm)
4646
get_property(LLVM_AS TARGET llvm-as PROPERTY LOCATION)
4747
get_property(LLVM_LINK TARGET llvm-link PROPERTY LOCATION)
4848
get_property(LLVM_OPT TARGET opt PROPERTY LOCATION)
49+
get_property(LIBCLC_REMANGLER TARGET libclc-remangler PROPERTY LOCATION)
4950

5051
set(LLVM_ENABLE_PIC OFF)
5152

libclc/generic/gen_convert_common.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This file contains common variables and helper functions used by the
22
# `gen_convert.py` in both the libclc and libspirv libraries.
33

4-
types = ['char', 'schar', 'uchar', 'short', 'ushort', 'int', 'uint', 'long', 'ulong', 'half', 'float', 'double']
5-
int_types = ['char', 'schar', 'uchar', 'short', 'ushort', 'int', 'uint', 'long', 'ulong']
4+
types = ['char', 'uchar', 'short', 'ushort', 'int', 'uint', 'long', 'ulong', 'half', 'float', 'double']
5+
int_types = ['char', 'uchar', 'short', 'ushort', 'int', 'uint', 'long', 'ulong']
66
unsigned_types = ['uchar', 'ushort', 'uint', 'ulong']
7-
signed_types = ['char', 'schar', 'short', 'int', 'long']
7+
signed_types = ['char', 'short', 'int', 'long']
88
float_types = ['half', 'float', 'double']
99
int64_types = ['long', 'ulong']
1010
float64_types = ['double']
@@ -18,8 +18,7 @@
1818
float_suffix = {'float':'f', 'double':''}
1919

2020
bool_type = {'char' : 'char',
21-
'schar' : 'schar',
22-
'uchar' : 'schar',
21+
'uchar' : 'char',
2322
'short' : 'short',
2423
'ushort' : 'short',
2524
'int' : 'int',
@@ -31,7 +30,6 @@
3130
'double' : 'long'}
3231

3332
unsigned_type = {'char' : 'uchar',
34-
'schar' : 'uchar',
3533
'uchar' : 'uchar',
3634
'short' : 'ushort',
3735
'ushort': 'ushort',
@@ -40,15 +38,14 @@
4038
'long' : 'ulong',
4139
'ulong' : 'ulong'}
4240

43-
sizeof_type = {'char' : 1, 'schar' : 1, 'uchar' : 1,
41+
sizeof_type = {'char' : 1, 'uchar' : 1,
4442
'short' : 2, 'ushort' : 2,
4543
'int' : 4, 'uint' : 4,
4644
'long' : 8, 'ulong' : 8,
4745
'half' : 2, 'float' : 4,
4846
'double': 8}
4947

5048
limit_max = {'char' : 'CHAR_MAX',
51-
'schar' : 'CHAR_MAX',
5249
'uchar' : 'UCHAR_MAX',
5350
'short' : 'SHRT_MAX',
5451
'ushort': 'USHRT_MAX',
@@ -58,7 +55,6 @@
5855
'ulong' : 'ULONG_MAX'}
5956

6057
limit_min = {'char' : 'CHAR_MIN',
61-
'schar' : 'CHAR_MIN',
6258
'uchar' : '0',
6359
'short' : 'SHRT_MIN',
6460
'ushort': '0',

libclc/generic/include/as_type.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define CLC_AS_TYPE
33

44
#define as_char(x) __builtin_astype(x, char)
5-
#define as_schar(x) __builtin_astype(x, schar)
65
#define as_uchar(x) __builtin_astype(x, uchar)
76
#define as_short(x) __builtin_astype(x, short)
87
#define as_ushort(x) __builtin_astype(x, ushort)
@@ -13,7 +12,6 @@
1312
#define as_float(x) __builtin_astype(x, float)
1413

1514
#define as_char2(x) __builtin_astype(x, char2)
16-
#define as_schar2(x) __builtin_astype(x, schar2)
1715
#define as_uchar2(x) __builtin_astype(x, uchar2)
1816
#define as_short2(x) __builtin_astype(x, short2)
1917
#define as_ushort2(x) __builtin_astype(x, ushort2)
@@ -24,7 +22,6 @@
2422
#define as_float2(x) __builtin_astype(x, float2)
2523

2624
#define as_char3(x) __builtin_astype(x, char3)
27-
#define as_schar3(x) __builtin_astype(x, schar3)
2825
#define as_uchar3(x) __builtin_astype(x, uchar3)
2926
#define as_short3(x) __builtin_astype(x, short3)
3027
#define as_ushort3(x) __builtin_astype(x, ushort3)
@@ -35,7 +32,6 @@
3532
#define as_float3(x) __builtin_astype(x, float3)
3633

3734
#define as_char4(x) __builtin_astype(x, char4)
38-
#define as_schar4(x) __builtin_astype(x, schar4)
3935
#define as_uchar4(x) __builtin_astype(x, uchar4)
4036
#define as_short4(x) __builtin_astype(x, short4)
4137
#define as_ushort4(x) __builtin_astype(x, ushort4)
@@ -46,7 +42,6 @@
4642
#define as_float4(x) __builtin_astype(x, float4)
4743

4844
#define as_char8(x) __builtin_astype(x, char8)
49-
#define as_schar8(x) __builtin_astype(x, schar8)
5045
#define as_uchar8(x) __builtin_astype(x, uchar8)
5146
#define as_short8(x) __builtin_astype(x, short8)
5247
#define as_ushort8(x) __builtin_astype(x, ushort8)
@@ -57,7 +52,6 @@
5752
#define as_float8(x) __builtin_astype(x, float8)
5853

5954
#define as_char16(x) __builtin_astype(x, char16)
60-
#define as_schar16(x) __builtin_astype(x, schar16)
6155
#define as_uchar16(x) __builtin_astype(x, uchar16)
6256
#define as_short16(x) __builtin_astype(x, short16)
6357
#define as_ushort16(x) __builtin_astype(x, ushort16)

libclc/generic/include/clc/async/gentype.inc

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -39,46 +39,6 @@
3939
#undef __CLC_GENTYPE_MANGLED
4040
#undef __CLC_GENTYPE
4141

42-
#ifndef __CLC_NO_SCHAR
43-
#define __CLC_GENTYPE schar
44-
#define __CLC_GENTYPE_MANGLED a
45-
#include __CLC_BODY
46-
#undef __CLC_GENTYPE_MANGLED
47-
#undef __CLC_GENTYPE
48-
49-
#define __CLC_GENTYPE schar2
50-
#define __CLC_GENTYPE_MANGLED Dv2_a
51-
#include __CLC_BODY
52-
#undef __CLC_GENTYPE_MANGLED
53-
#undef __CLC_GENTYPE
54-
55-
#ifdef __CLC_GEN_VEC3
56-
#define __CLC_GENTYPE schar3
57-
#define __CLC_GENTYPE_MANGLED Dv3_a
58-
#include __CLC_BODY
59-
#undef __CLC_GENTYPE_MANGLED
60-
#undef __CLC_GENTYPE
61-
#endif
62-
63-
#define __CLC_GENTYPE schar4
64-
#define __CLC_GENTYPE_MANGLED Dv4_a
65-
#include __CLC_BODY
66-
#undef __CLC_GENTYPE_MANGLED
67-
#undef __CLC_GENTYPE
68-
69-
#define __CLC_GENTYPE schar8
70-
#define __CLC_GENTYPE_MANGLED Dv8_a
71-
#include __CLC_BODY
72-
#undef __CLC_GENTYPE_MANGLED
73-
#undef __CLC_GENTYPE
74-
75-
#define __CLC_GENTYPE schar16
76-
#define __CLC_GENTYPE_MANGLED Dv16_a
77-
#include __CLC_BODY
78-
#undef __CLC_GENTYPE_MANGLED
79-
#undef __CLC_GENTYPE
80-
#endif
81-
8242
#define __CLC_GENTYPE uchar
8343
#define __CLC_GENTYPE_MANGLED h
8444
#include __CLC_BODY

libclc/generic/include/clc/clc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
1313
#endif
1414

15-
#define __CLC_NO_SCHAR
16-
1715
/* Function Attributes */
1816
#include <func.h>
1917

0 commit comments

Comments
 (0)