2008-10-26 08:56:18 +08:00
|
|
|
set(files
|
2014-09-19 18:17:06 +08:00
|
|
|
adxintrin.h
|
2010-04-14 11:54:58 +08:00
|
|
|
altivec.h
|
2012-05-30 03:36:17 +08:00
|
|
|
ammintrin.h
|
2020-07-07 09:50:17 +08:00
|
|
|
amxintrin.h
|
2014-06-28 05:25:42 +08:00
|
|
|
arm_acle.h
|
2019-12-12 22:59:04 +08:00
|
|
|
arm_cmse.h
|
2016-08-07 01:58:24 +08:00
|
|
|
armintr.h
|
2017-07-26 13:29:40 +08:00
|
|
|
arm64intr.h
|
2011-12-19 13:04:33 +08:00
|
|
|
avx2intrin.h
|
Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper Lake
Summary:
1. Enable infrastructure of AVX512_BF16, which is supported for BFLOAT16 in Cooper Lake;
2. Enable intrinsics for VCVTNE2PS2BF16, VCVTNEPS2BF16 and DPBF16PS instructions, which are Vector Neural Network Instructions supporting BFLOAT16 inputs and conversion instructions from IEEE single precision.
For more details about BF16 intrinsic, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference
Patch by LiuTianle
Reviewers: craig.topper, smaslov, LuoYuanke, wxiao3, annita.zhang, spatel, RKSimon
Reviewed By: craig.topper
Subscribers: mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60552
llvm-svn: 360018
2019-05-06 16:25:11 +08:00
|
|
|
avx512bf16intrin.h
|
2014-10-09 01:37:51 +08:00
|
|
|
avx512bwintrin.h
|
2017-12-27 18:01:00 +08:00
|
|
|
avx512bitalgintrin.h
|
|
|
|
avx512vlbitalgintrin.h
|
2015-06-29 20:51:53 +08:00
|
|
|
avx512cdintrin.h
|
2017-05-25 21:44:11 +08:00
|
|
|
avx512vpopcntdqintrin.h
|
2016-05-20 09:07:10 +08:00
|
|
|
avx512dqintrin.h
|
2014-07-22 20:08:25 +08:00
|
|
|
avx512erintrin.h
|
2014-10-15 07:15:43 +08:00
|
|
|
avx512fintrin.h
|
2016-05-20 09:07:10 +08:00
|
|
|
avx512ifmaintrin.h
|
|
|
|
avx512ifmavlintrin.h
|
2016-04-21 20:47:27 +08:00
|
|
|
avx512pfintrin.h
|
2016-05-20 09:07:10 +08:00
|
|
|
avx512vbmiintrin.h
|
|
|
|
avx512vbmivlintrin.h
|
[x86][icelake][vbmi2]
added vbmi2 feature recognition
added intrinsics support for vbmi2 instructions
_mm[128,256,512]_mask[z]_compress_epi[16,32]
_mm[128,256,512]_mask_compressstoreu_epi[16,32]
_mm[128,256,512]_mask[z]_expand_epi[16,32]
_mm[128,256,512]_mask[z]_expandloadu_epi[16,32]
_mm[128,256,512]_mask[z]_sh[l,r]di_epi[16,32,64]
_mm[128,256,512]_mask_sh[l,r]dv_epi[16,32,64]
matching a similar work on the backend (D40206)
Differential Revision: https://reviews.llvm.org/D41557
llvm-svn: 321487
2017-12-27 19:25:07 +08:00
|
|
|
avx512vbmi2intrin.h
|
|
|
|
avx512vlvbmi2intrin.h
|
Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper Lake
Summary:
1. Enable infrastructure of AVX512_BF16, which is supported for BFLOAT16 in Cooper Lake;
2. Enable intrinsics for VCVTNE2PS2BF16, VCVTNEPS2BF16 and DPBF16PS instructions, which are Vector Neural Network Instructions supporting BFLOAT16 inputs and conversion instructions from IEEE single precision.
For more details about BF16 intrinsic, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference
Patch by LiuTianle
Reviewers: craig.topper, smaslov, LuoYuanke, wxiao3, annita.zhang, spatel, RKSimon
Reviewed By: craig.topper
Subscribers: mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60552
llvm-svn: 360018
2019-05-06 16:25:11 +08:00
|
|
|
avx512vlbf16intrin.h
|
2014-10-09 01:37:51 +08:00
|
|
|
avx512vlbwintrin.h
|
2016-04-27 19:43:14 +08:00
|
|
|
avx512vlcdintrin.h
|
2015-04-30 17:24:29 +08:00
|
|
|
avx512vldqintrin.h
|
2016-05-20 09:07:10 +08:00
|
|
|
avx512vlintrin.h
|
2019-05-31 14:09:35 +08:00
|
|
|
avx512vp2intersectintrin.h
|
|
|
|
avx512vlvp2intersectintrin.h
|
2017-12-16 14:02:31 +08:00
|
|
|
avx512vpopcntdqvlintrin.h
|
2017-12-27 18:37:51 +08:00
|
|
|
avx512vnniintrin.h
|
|
|
|
avx512vlvnniintrin.h
|
2014-10-15 07:15:43 +08:00
|
|
|
avxintrin.h
|
2020-10-30 12:58:05 +08:00
|
|
|
avxvnniintrin.h
|
2011-12-26 11:20:06 +08:00
|
|
|
bmi2intrin.h
|
2014-10-15 07:15:43 +08:00
|
|
|
bmiintrin.h
|
2016-10-09 06:16:08 +08:00
|
|
|
__clang_cuda_builtin_vars.h
|
2020-04-02 11:22:13 +08:00
|
|
|
__clang_cuda_math.h
|
2016-01-27 07:37:29 +08:00
|
|
|
__clang_cuda_cmath.h
|
2016-10-12 01:36:03 +08:00
|
|
|
__clang_cuda_complex_builtins.h
|
2018-01-30 08:00:12 +08:00
|
|
|
__clang_cuda_device_functions.h
|
2016-05-20 06:49:13 +08:00
|
|
|
__clang_cuda_intrinsics.h
|
2018-01-30 08:00:12 +08:00
|
|
|
__clang_cuda_libdevice_declares.h
|
2016-03-31 07:30:14 +08:00
|
|
|
__clang_cuda_math_forward_declares.h
|
2015-12-17 02:51:59 +08:00
|
|
|
__clang_cuda_runtime_wrapper.h
|
2020-06-06 04:49:38 +08:00
|
|
|
__clang_hip_libdevice_declares.h
|
2020-10-02 05:43:52 +08:00
|
|
|
__clang_hip_cmath.h
|
2020-06-06 04:49:38 +08:00
|
|
|
__clang_hip_math.h
|
|
|
|
__clang_hip_runtime_wrapper.h
|
2017-11-26 20:34:54 +08:00
|
|
|
cetintrin.h
|
2020-05-19 13:29:30 +08:00
|
|
|
cet.h
|
2018-04-13 15:37:24 +08:00
|
|
|
cldemoteintrin.h
|
2017-02-09 14:10:14 +08:00
|
|
|
clzerointrin.h
|
2014-10-15 07:15:43 +08:00
|
|
|
cpuid.h
|
2016-07-05 23:56:03 +08:00
|
|
|
clflushoptintrin.h
|
2017-10-13 02:57:15 +08:00
|
|
|
clwbintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
emmintrin.h
|
2019-06-06 16:28:42 +08:00
|
|
|
enqcmdintrin.h
|
2012-10-11 09:10:04 +08:00
|
|
|
f16cintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
float.h
|
2011-12-30 18:38:16 +08:00
|
|
|
fma4intrin.h
|
2012-06-04 11:42:47 +08:00
|
|
|
fmaintrin.h
|
2015-06-30 17:45:38 +08:00
|
|
|
fxsrintrin.h
|
2017-12-27 16:37:47 +08:00
|
|
|
gfniintrin.h
|
2020-10-13 08:42:46 +08:00
|
|
|
hresetintrin.h
|
2015-04-01 22:15:35 +08:00
|
|
|
htmintrin.h
|
|
|
|
htmxlintrin.h
|
2014-03-04 14:28:23 +08:00
|
|
|
ia32intrin.h
|
2010-08-21 02:04:07 +08:00
|
|
|
immintrin.h
|
2016-06-15 04:14:24 +08:00
|
|
|
intrin.h
|
2015-06-26 08:19:32 +08:00
|
|
|
inttypes.h
|
2018-05-25 14:34:42 +08:00
|
|
|
invpcidintrin.h
|
2014-10-15 07:15:43 +08:00
|
|
|
iso646.h
|
2020-09-30 18:01:15 +08:00
|
|
|
keylockerintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
limits.h
|
2017-05-08 20:09:45 +08:00
|
|
|
lwpintrin.h
|
2011-12-25 20:47:46 +08:00
|
|
|
lzcntintrin.h
|
2011-04-15 23:11:21 +08:00
|
|
|
mm3dnow.h
|
2011-02-27 21:33:31 +08:00
|
|
|
mmintrin.h
|
|
|
|
mm_malloc.h
|
2014-10-15 07:15:43 +08:00
|
|
|
module.modulemap
|
2018-05-01 18:05:42 +08:00
|
|
|
movdirintrin.h
|
2016-09-20 23:07:36 +08:00
|
|
|
msa.h
|
2016-05-20 09:07:10 +08:00
|
|
|
mwaitxintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
nmmintrin.h
|
2016-05-30 10:22:28 +08:00
|
|
|
opencl-c.h
|
2019-06-19 20:48:22 +08:00
|
|
|
opencl-c-base.h
|
2016-05-20 09:07:10 +08:00
|
|
|
pkuintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
pmmintrin.h
|
2018-05-08 14:49:41 +08:00
|
|
|
pconfigintrin.h
|
2011-12-30 05:42:29 +08:00
|
|
|
popcntintrin.h
|
2013-03-27 01:52:08 +08:00
|
|
|
prfchwintrin.h
|
2018-05-10 15:28:54 +08:00
|
|
|
ptwriteintrin.h
|
2013-03-29 13:17:55 +08:00
|
|
|
rdseedintrin.h
|
2012-11-10 13:17:46 +08:00
|
|
|
rtmintrin.h
|
2020-04-02 16:15:34 +08:00
|
|
|
serializeintrin.h
|
2018-05-08 15:12:34 +08:00
|
|
|
sgxintrin.h
|
2015-04-01 22:15:35 +08:00
|
|
|
s390intrin.h
|
2013-09-19 21:22:04 +08:00
|
|
|
shaintrin.h
|
2010-08-21 01:24:02 +08:00
|
|
|
smmintrin.h
|
2011-09-30 02:04:28 +08:00
|
|
|
stdalign.h
|
2011-02-27 21:33:31 +08:00
|
|
|
stdarg.h
|
Add an implementation of C11's stdatomic.h
Adds a Clang-specific implementation of C11's stdatomic.h header. On systems,
such as FreeBSD, where a stdatomic.h header is already provided, we defer to
that header instead (using our __has_include_next technology). Otherwise, we
provide an implementation in terms of our __c11_atomic_* intrinsics (that were
created for this purpose).
C11 7.1.4p1 requires function declarations for atomic_thread_fence,
atomic_signal_fence, atomic_flag_test_and_set,
atomic_flag_test_and_set_explicit, and atomic_flag_clear, and requires that
they have external linkage. Accordingly, we provide these declarations, but if
a user elides the shadowing macros and uses them, then they must have a libc
(or similar) that actually provides definitions.
atomic_flag is implemented using _Bool as the underlying type. This is
consistent with the implementation provided by FreeBSD and also GCC 4.9 (at
least when __GCC_ATOMIC_TEST_AND_SET_TRUEVAL == 1).
Patch by Richard Smith (rebased and slightly edited by me -- Richard said I
should drive at this point).
llvm-svn: 218957
2014-10-03 12:29:40 +08:00
|
|
|
stdatomic.h
|
2011-02-27 21:33:31 +08:00
|
|
|
stdbool.h
|
|
|
|
stddef.h
|
2014-10-03 08:31:35 +08:00
|
|
|
__stddef_max_align_t.h
|
2011-02-27 21:33:31 +08:00
|
|
|
stdint.h
|
2013-01-18 06:16:11 +08:00
|
|
|
stdnoreturn.h
|
2013-10-01 01:25:14 +08:00
|
|
|
tbmintrin.h
|
2009-06-07 15:09:23 +08:00
|
|
|
tgmath.h
|
|
|
|
tmmintrin.h
|
2020-04-09 13:15:42 +08:00
|
|
|
tsxldtrkintrin.h
|
2020-10-22 16:46:07 +08:00
|
|
|
uintrintrin.h
|
2014-10-15 07:15:43 +08:00
|
|
|
unwind.h
|
2014-10-15 06:35:42 +08:00
|
|
|
vadefs.h
|
2017-12-27 16:16:54 +08:00
|
|
|
vaesintrin.h
|
2014-10-15 07:15:43 +08:00
|
|
|
varargs.h
|
2015-07-30 22:10:43 +08:00
|
|
|
vecintrin.h
|
2017-12-27 17:00:31 +08:00
|
|
|
vpclmulqdqintrin.h
|
2018-04-21 02:44:33 +08:00
|
|
|
waitpkgintrin.h
|
2020-03-28 07:34:27 +08:00
|
|
|
wasm_simd128.h
|
2018-04-12 04:09:09 +08:00
|
|
|
wbnoinvdintrin.h
|
2014-10-15 07:15:43 +08:00
|
|
|
wmmintrin.h
|
2016-05-20 09:07:10 +08:00
|
|
|
__wmmintrin_aes.h
|
2012-11-06 07:30:26 +08:00
|
|
|
__wmmintrin_pclmul.h
|
2020-10-13 08:42:46 +08:00
|
|
|
x86gprintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
x86intrin.h
|
|
|
|
xmmintrin.h
|
2012-06-10 08:39:38 +08:00
|
|
|
xopintrin.h
|
2016-05-20 09:07:10 +08:00
|
|
|
xsavecintrin.h
|
2015-10-13 20:29:35 +08:00
|
|
|
xsaveintrin.h
|
|
|
|
xsaveoptintrin.h
|
|
|
|
xsavesintrin.h
|
2015-06-18 02:42:07 +08:00
|
|
|
xtestintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
)
|
2008-10-26 08:56:18 +08:00
|
|
|
|
2016-10-12 01:36:03 +08:00
|
|
|
set(cuda_wrapper_files
|
|
|
|
cuda_wrappers/algorithm
|
|
|
|
cuda_wrappers/complex
|
2016-10-27 06:13:26 +08:00
|
|
|
cuda_wrappers/new
|
2016-10-12 01:36:03 +08:00
|
|
|
)
|
|
|
|
|
2019-04-23 13:50:24 +08:00
|
|
|
set(ppc_wrapper_files
|
|
|
|
ppc_wrappers/mmintrin.h
|
2019-05-31 12:42:13 +08:00
|
|
|
ppc_wrappers/xmmintrin.h
|
|
|
|
ppc_wrappers/mm_malloc.h
|
2019-06-12 13:25:40 +08:00
|
|
|
ppc_wrappers/emmintrin.h
|
2019-08-09 11:39:55 +08:00
|
|
|
ppc_wrappers/pmmintrin.h
|
|
|
|
ppc_wrappers/tmmintrin.h
|
|
|
|
ppc_wrappers/smmintrin.h
|
2019-04-23 13:50:24 +08:00
|
|
|
)
|
|
|
|
|
[OpenMP][Clang] Support for target math functions
Summary:
In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temporary until OpenMP variant is supported by Clang.
We intercept the inclusion of math.h and cmath headers and if we are in the OpenMP-NVPTX case, we re-use CUDA's math function resolution mechanism.
Authors:
@gtbercea
@jdoerfert
Reviewers: hfinkel, caomhin, ABataev, tra
Reviewed By: hfinkel, ABataev, tra
Subscribers: JDevlieghere, mgorny, guansong, cfe-commits, jdoerfert
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61399
llvm-svn: 360265
2019-05-08 23:52:33 +08:00
|
|
|
set(openmp_wrapper_files
|
|
|
|
openmp_wrappers/math.h
|
|
|
|
openmp_wrappers/cmath
|
2020-04-12 15:10:28 +08:00
|
|
|
openmp_wrappers/complex.h
|
|
|
|
openmp_wrappers/complex
|
2020-03-28 09:36:30 +08:00
|
|
|
openmp_wrappers/__clang_openmp_device_functions.h
|
2020-08-07 04:46:44 +08:00
|
|
|
openmp_wrappers/complex_cmath.h
|
2020-01-22 03:16:29 +08:00
|
|
|
openmp_wrappers/new
|
[OpenMP][Clang] Support for target math functions
Summary:
In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temporary until OpenMP variant is supported by Clang.
We intercept the inclusion of math.h and cmath headers and if we are in the OpenMP-NVPTX case, we re-use CUDA's math function resolution mechanism.
Authors:
@gtbercea
@jdoerfert
Reviewers: hfinkel, caomhin, ABataev, tra
Reviewed By: hfinkel, ABataev, tra
Subscribers: JDevlieghere, mgorny, guansong, cfe-commits, jdoerfert
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61399
llvm-svn: 360265
2019-05-08 23:52:33 +08:00
|
|
|
)
|
|
|
|
|
2019-04-26 09:43:59 +08:00
|
|
|
set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
|
2010-10-12 07:17:59 +08:00
|
|
|
set(out_files)
|
2019-05-01 14:18:03 +08:00
|
|
|
set(generated_files)
|
2019-03-02 08:50:13 +08:00
|
|
|
|
|
|
|
function(copy_header_to_output_dir src_dir file)
|
|
|
|
set(src ${src_dir}/${file})
|
|
|
|
set(dst ${output_dir}/${file})
|
2008-10-26 08:56:18 +08:00
|
|
|
add_custom_command(OUTPUT ${dst}
|
|
|
|
DEPENDS ${src}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
|
2019-03-02 08:50:13 +08:00
|
|
|
COMMENT "Copying clang's ${file}...")
|
2010-10-12 07:17:59 +08:00
|
|
|
list(APPEND out_files ${dst})
|
2019-03-02 08:50:13 +08:00
|
|
|
set(out_files ${out_files} PARENT_SCOPE)
|
|
|
|
endfunction(copy_header_to_output_dir)
|
|
|
|
|
|
|
|
function(clang_generate_header td_option td_file out_file)
|
|
|
|
clang_tablegen(${out_file} ${td_option}
|
|
|
|
-I ${CLANG_SOURCE_DIR}/include/clang/Basic/
|
|
|
|
SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/${td_file})
|
|
|
|
|
|
|
|
copy_header_to_output_dir(${CMAKE_CURRENT_BINARY_DIR} ${out_file})
|
|
|
|
set(out_files ${out_files} PARENT_SCOPE)
|
2019-05-01 14:18:03 +08:00
|
|
|
list(APPEND generated_files "${CMAKE_CURRENT_BINARY_DIR}/${out_file}")
|
|
|
|
set(generated_files ${generated_files} PARENT_SCOPE)
|
2019-03-02 08:50:13 +08:00
|
|
|
endfunction(clang_generate_header)
|
|
|
|
|
|
|
|
|
|
|
|
# Copy header files from the source directory to the build directory
|
[OpenMP][Clang] Support for target math functions
Summary:
In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temporary until OpenMP variant is supported by Clang.
We intercept the inclusion of math.h and cmath headers and if we are in the OpenMP-NVPTX case, we re-use CUDA's math function resolution mechanism.
Authors:
@gtbercea
@jdoerfert
Reviewers: hfinkel, caomhin, ABataev, tra
Reviewed By: hfinkel, ABataev, tra
Subscribers: JDevlieghere, mgorny, guansong, cfe-commits, jdoerfert
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61399
llvm-svn: 360265
2019-05-08 23:52:33 +08:00
|
|
|
foreach( f ${files} ${cuda_wrapper_files} ${ppc_wrapper_files} ${openmp_wrapper_files})
|
2019-03-02 08:50:13 +08:00
|
|
|
copy_header_to_output_dir(${CMAKE_CURRENT_SOURCE_DIR} ${f})
|
2008-10-26 08:56:18 +08:00
|
|
|
endforeach( f )
|
|
|
|
|
2019-03-02 08:50:13 +08:00
|
|
|
# Generate header files and copy them to the build directory
|
|
|
|
# Generate arm_neon.h
|
|
|
|
clang_generate_header(-gen-arm-neon arm_neon.td arm_neon.h)
|
|
|
|
# Generate arm_fp16.h
|
|
|
|
clang_generate_header(-gen-arm-fp16 arm_fp16.td arm_fp16.h)
|
2020-03-15 22:29:45 +08:00
|
|
|
# Generate arm_sve.h
|
|
|
|
clang_generate_header(-gen-arm-sve-header arm_sve.td arm_sve.h)
|
[clang][BFloat] add NEON emitter for bfloat
Summary:
This patch adds the bfloat16_t struct typedefs (e.g. bfloat16x8x2_t) to
arm_neon.h
This patch is part of a series implementing the Bfloat16 extension of the
Armv8.6-a architecture, as detailed here:
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/arm-architecture-developments-armv8-6-a
The bfloat type, and its properties are specified in the Arm Architecture
Reference Manual:
https://developer.arm.com/docs/ddi0487/latest/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile
The following people contributed to this patch:
- Luke Cheeseman
- Simon Tatham
- Ties Stuij
Reviewers: t.p.northover, fpetrogalli, sdesmalen, az, LukeGeeson
Reviewed By: fpetrogalli
Subscribers: SjoerdMeijer, LukeGeeson, pbarrio, mgorny, kristof.beyls, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79708
2020-06-05 20:06:01 +08:00
|
|
|
# Generate arm_bf16.h
|
|
|
|
clang_generate_header(-gen-arm-bf16 arm_bf16.td arm_bf16.h)
|
[clang,ARM] Initial ACLE intrinsics for MVE.
This commit sets up the infrastructure for auto-generating <arm_mve.h>
and doing clang-side code generation for the builtins it relies on,
and demonstrates that it works by implementing a representative sample
of the ACLE intrinsics, more or less matching the ones introduced in
LLVM IR by D67158,D68699,D68700.
Like NEON, that header file will provide a set of vector types like
uint16x8_t and C functions with names like vaddq_u32(). Unlike NEON,
the ACLE spec for <arm_mve.h> includes a polymorphism system, so that
you can write plain vaddq() and disambiguate by the vector types you
pass to it.
Unlike the corresponding NEON code, I've arranged to make every user-
facing ACLE intrinsic into a clang builtin, and implement all the code
generation inside clang. So <arm_mve.h> itself contains nothing but
typedefs and function declarations, with the latter all using the new
`__attribute__((__clang_builtin))` system to arrange that the user-
facing function names correspond to the right internal BuiltinIDs.
So the new MveEmitter tablegen system specifies the full sequence of
IRBuilder operations that each user-facing ACLE intrinsic should
translate into. Where possible, the ACLE intrinsics map to standard IR
operations such as vector-typed `add` and `fadd`; where no standard
representation exists, I call down to the sample IR intrinsics
introduced in an earlier commit.
Doing it like this means that you get the polymorphism for free just
by using __attribute__((overloadable)): the clang overload resolution
decides which function declaration is the relevant one, and _then_ its
BuiltinID is looked up, so by the time we're doing code generation,
that's all been resolved by the standard system. It also means that
you get really nice error messages if the user passes the wrong
combination of types: clang will show the declarations from the header
file and explain why each one doesn't match.
(The obvious alternative approach would be to have wrapper functions
in <arm_mve.h> which pass their arguments to the underlying builtins.
But that doesn't work in the case where one of the arguments has to be
a constant integer: the wrapper function can't pass the constantness
through. So you'd have to do that case using a macro instead, and then
use C11 `_Generic` to handle the polymorphism. Then you have to add
horrible workarounds because `_Generic` requires even the untaken
branches to type-check successfully, and //then// if the user gets the
types wrong, the error message is totally unreadable!)
Reviewers: dmgreen, miyuki, ostannard
Subscribers: mgorny, javed.absar, kristof.beyls, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67161
2019-09-02 22:50:50 +08:00
|
|
|
# Generate arm_mve.h
|
|
|
|
clang_generate_header(-gen-arm-mve-header arm_mve.td arm_mve.h)
|
[ARM,CDE] Generalize MVE intrinsics infrastructure to support CDE
Summary:
This patch generalizes the existing code to support CDE intrinsics
which will share some properties with existing MVE intrinsics
(some of the intrinsics will be polymorphic and accept/return values
of MVE vector types).
Specifically the patch:
* Adds new tablegen backends -gen-arm-cde-builtin-def,
-gen-arm-cde-builtin-codegen, -gen-arm-cde-builtin-sema,
-gen-arm-cde-builtin-aliases, -gen-arm-cde-builtin-header based on
existing MVE backends.
* Renames the '__clang_arm_mve_alias' attribute into
'__clang_arm_builtin_alias' (it will be used with CDE intrinsics as
well as MVE intrinsics)
* Implements semantic checks for the coprocessor argument of the CDE
intrinsics as well as the existing coprocessor intrinsics.
* Adds one CDE intrinsic __arm_cx1 to test the above changes
Reviewers: simon_tatham, MarkMurrayARM, ostannard, dmgreen
Reviewed By: simon_tatham
Subscribers: sdesmalen, mgorny, kristof.beyls, danielkiss, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D75850
2020-03-10 22:01:42 +08:00
|
|
|
# Generate arm_cde.h
|
|
|
|
clang_generate_header(-gen-arm-cde-header arm_cde.td arm_cde.h)
|
2021-03-05 23:40:28 +08:00
|
|
|
# Generate riscv_vector.h
|
|
|
|
clang_generate_header(-gen-riscv-vector-header riscv_vector.td riscv_vector.h)
|
2010-10-12 07:17:59 +08:00
|
|
|
|
[build] Rename clang-headers to clang-resource-headers
Summary:
The current install-clang-headers target installs clang's resource
directory headers. This is different from the install-llvm-headers
target, which installs LLVM's API headers. We want to introduce the
corresponding target to clang, and the natural name for that new target
would be install-clang-headers. Rename the existing target to
install-clang-resource-headers to free up the install-clang-headers name
for the new target, following the discussion on cfe-dev [1].
I didn't find any bots on zorg referencing install-clang-headers. I'll
send out another PSA to cfe-dev to accompany this rename.
[1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html
Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille
Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits
Tags: #clang, #sanitizers, #lldb, #openmp, #llvm
Differential Revision: https://reviews.llvm.org/D58791
llvm-svn: 355340
2019-03-05 05:19:53 +08:00
|
|
|
add_custom_target(clang-resource-headers ALL DEPENDS ${out_files})
|
|
|
|
set_target_properties(clang-resource-headers PROPERTIES
|
2018-12-03 18:34:25 +08:00
|
|
|
FOLDER "Misc"
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
|
2008-10-26 08:56:18 +08:00
|
|
|
|
2019-05-01 14:18:03 +08:00
|
|
|
set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
|
2018-01-20 07:11:18 +08:00
|
|
|
|
2016-10-12 01:36:03 +08:00
|
|
|
install(
|
2019-05-01 14:18:03 +08:00
|
|
|
FILES ${files} ${generated_files}
|
2019-03-02 08:50:13 +08:00
|
|
|
DESTINATION ${header_install_dir}
|
[build] Rename clang-headers to clang-resource-headers
Summary:
The current install-clang-headers target installs clang's resource
directory headers. This is different from the install-llvm-headers
target, which installs LLVM's API headers. We want to introduce the
corresponding target to clang, and the natural name for that new target
would be install-clang-headers. Rename the existing target to
install-clang-resource-headers to free up the install-clang-headers name
for the new target, following the discussion on cfe-dev [1].
I didn't find any bots on zorg referencing install-clang-headers. I'll
send out another PSA to cfe-dev to accompany this rename.
[1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html
Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille
Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits
Tags: #clang, #sanitizers, #lldb, #openmp, #llvm
Differential Revision: https://reviews.llvm.org/D58791
llvm-svn: 355340
2019-03-05 05:19:53 +08:00
|
|
|
COMPONENT clang-resource-headers)
|
2016-10-12 01:36:03 +08:00
|
|
|
|
2019-05-01 14:18:03 +08:00
|
|
|
install(
|
|
|
|
FILES ${cuda_wrapper_files}
|
|
|
|
DESTINATION ${header_install_dir}/cuda_wrappers
|
|
|
|
COMPONENT clang-resource-headers)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES ${ppc_wrapper_files}
|
|
|
|
DESTINATION ${header_install_dir}/ppc_wrappers
|
|
|
|
COMPONENT clang-resource-headers)
|
|
|
|
|
[OpenMP][Clang] Support for target math functions
Summary:
In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temporary until OpenMP variant is supported by Clang.
We intercept the inclusion of math.h and cmath headers and if we are in the OpenMP-NVPTX case, we re-use CUDA's math function resolution mechanism.
Authors:
@gtbercea
@jdoerfert
Reviewers: hfinkel, caomhin, ABataev, tra
Reviewed By: hfinkel, ABataev, tra
Subscribers: JDevlieghere, mgorny, guansong, cfe-commits, jdoerfert
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61399
llvm-svn: 360265
2019-05-08 23:52:33 +08:00
|
|
|
install(
|
|
|
|
FILES ${openmp_wrapper_files}
|
|
|
|
DESTINATION ${header_install_dir}/openmp_wrappers
|
|
|
|
COMPONENT clang-resource-headers)
|
|
|
|
|
2019-02-21 07:08:43 +08:00
|
|
|
if (NOT LLVM_ENABLE_IDE)
|
[build] Rename clang-headers to clang-resource-headers
Summary:
The current install-clang-headers target installs clang's resource
directory headers. This is different from the install-llvm-headers
target, which installs LLVM's API headers. We want to introduce the
corresponding target to clang, and the natural name for that new target
would be install-clang-headers. Rename the existing target to
install-clang-resource-headers to free up the install-clang-headers name
for the new target, following the discussion on cfe-dev [1].
I didn't find any bots on zorg referencing install-clang-headers. I'll
send out another PSA to cfe-dev to accompany this rename.
[1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html
Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille
Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits
Tags: #clang, #sanitizers, #lldb, #openmp, #llvm
Differential Revision: https://reviews.llvm.org/D58791
llvm-svn: 355340
2019-03-05 05:19:53 +08:00
|
|
|
add_llvm_install_targets(install-clang-resource-headers
|
|
|
|
DEPENDS clang-resource-headers
|
|
|
|
COMPONENT clang-resource-headers)
|
2015-11-20 10:24:03 +08:00
|
|
|
endif()
|