summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Add VP2INTERSECT instructionsPengfei Wang2019-05-314-0/+210
| | | | | | | | | | Support intel AVX512 VP2INTERSECT instructions in clang Patch by Xiang Zhang (xiangzhangllvm) Differential Revision: https://reviews.llvm.org/D62367 llvm-svn: 362196
* re-commit r361928: [PowerPC] [Clang] Port SSE intrinsics to PowerPCZi Xuan Wu2019-05-313-0/+1888
| | | | | | | | | | | | | | | Port xmmintrin.h which include Intel SSE intrinsics implementation to PowerPC platform (using Altivec). The new headers containing those implemenations are located into a directory named ppc_wrappers which has higher priority when the platform is PowerPC on Linux. They are mainly developed by Steven Munroe, with contributions from Paul Clarke, Bill Schmidt, Jinsong Ji and Zixuan Wu. Patched by: Qiu Chaofan <qiucf@cn.ibm.com> Reviewed By: Jinsong Ji Differential Revision: https://reviews.llvm.org/D62121 llvm-svn: 362190
* revert rC361928: [PowerPC] [Clang] Port SSE intrinsics to PowerPCZi Xuan Wu2019-05-293-1888/+0
| | | | | | Because test fails in other targets rather than PowerPC llvm-svn: 361930
* [PowerPC] [Clang] Port SSE intrinsics to PowerPCZi Xuan Wu2019-05-293-0/+1888
| | | | | | | | | | | | | | | Port xmmintrin.h which include Intel SSE intrinsics implementation to PowerPC platform (using Altivec). The new headers containing those implemenations are located into a directory named ppc_wrappers which has higher priority when the platform is PowerPC on Linux. They are mainly developed by Steven Munroe, with contributions from Paul Clarke, Bill Schmidt, Jinsong Ji and Zixuan Wu. Patched by: Qiu Chaofan <qiucf@cn.ibm.com> Reviewed By: Jinsong Ji Differential Revision: https://reviews.llvm.org/D62121 llvm-svn: 361928
* [OpenCL] Add support for the cl_arm_integer_dot_product extensionsKevin Petit2019-05-241-0/+28
| | | | | | | | | The specification is available in the Khronos OpenCL registry: https://www.khronos.org/registry/OpenCL/extensions/arm/cl_arm_integer_dot_product.txt Signed-off-by: Kevin Petit <kevin.petit@arm.com> llvm-svn: 361641
* [X86] Remove semicolons at the end of intrinsics implemented as macros so ↵Craig Topper2019-05-193-28/+28
| | | | | | | | | | they can be used as arguments to other intrinsics. Also fix one intrinsic that was using variable names without underscores. Fixes PR41932 llvm-svn: 361109
* [OpenMP][bugfix] Add missing math functions variants for log and abs.Gheorghe-Teodor Bercea2019-05-172-0/+16
| | | | | | | | | | | | | | | | Summary: When including the random header in C++, some of the math functions it relies on are not present in the CUDA headers. We include this variants in this case. Reviewers: jdoerfert, hfinkel, tra, caomhin Reviewed By: tra Subscribers: efriedma, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62046 llvm-svn: 361066
* [X86] Stop implicitly enabling avx512vl when avx512bf16 is enabled.Craig Topper2019-05-162-14/+18
| | | | | | | | Previously we were doing this so that the 256 bit selectw builtin could be used in the implementation of the 512->256 bit conversion intrinsic. After this commit we now use a masked convert builtin that will emit the intrinsic call and the 256-bit select from custom code in CGBuiltin. Then the header only needs to call that one intrinsic. llvm-svn: 360924
* [X86] Update doxygen comments for AVX512BF16 to not refer to masks as ↵Craig Topper2019-05-162-54/+55
| | | | | | 'immediates'. Refer to parameter names instead of 'src', 'src1', 'src2'. NFC llvm-svn: 360918
* [OpenMP][Bugfix] Move double and float versions of abs under c++ macroGheorghe-Teodor Bercea2019-05-152-3/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This is a fix for the reported bug: [[ https://bugs.llvm.org/show_bug.cgi?id=41861 | 41861 ]] abs functions need to be moved under the c++ macro to avoid conflicts with included headers. Reviewers: tra, jdoerfert, hfinkel, ABataev, caomhin Reviewed By: jdoerfert Subscribers: guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61959 llvm-svn: 360809
* [OpenMP][bugfix] Fix issues with C++ 17 compilation when handling math functionsGheorghe-Teodor Bercea2019-05-153-11/+41
| | | | | | | | | | | | | | | | Summary: In OpenMP device offloading we must ensure that unde C++ 17, the inclusion of cstdlib will works correctly. Reviewers: ABataev, tra, jdoerfert, hfinkel, caomhin Reviewed By: jdoerfert Subscribers: Hahnfeld, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61949 llvm-svn: 360804
* [X86] Make `x86intrin.h`, `immintrin.h` includable with `-fno-gnu-inline-asm`.Volodymyr Sapsai2019-05-133-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Currently `immintrin.h` includes `pconfigintrin.h` and `sgxintrin.h` which contain inline assembly. It causes failures when building with the flag `-fno-gnu-inline-asm`. Fix by excluding functions with inline assembly when this extension is disabled. So far there was no need to support `_pconfig_u32`, `_enclu_u32`, `_encls_u32`, `_enclv_u32` on platforms that require `-fno-gnu-inline-asm`. But if developers start using these functions, they'll have compile-time undeclared identifier errors which is preferrable to runtime errors. rdar://problem/49540880 Reviewers: craig.topper, GBuella, rnk, echristo Reviewed By: rnk Subscribers: jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D61621 llvm-svn: 360630
* [OpenMP][Clang][BugFix] Split declares and math functions inclusion.Gheorghe-Teodor Bercea2019-05-138-16/+43
| | | | | | | | | | | | | | | | Summary: This patches fixes an issue in which the __clang_cuda_cmath.h header is being included even when cmath or math.h headers are not included. Reviewers: jdoerfert, ABataev, hfinkel, caomhin, tra Reviewed By: tra Subscribers: tra, mgorny, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61765 llvm-svn: 360626
* Revert Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve ↵Reid Kleckner2019-05-082-11/+0
| | | | | | | | | | | | MS compatibility. This reverts r360271 (git commit a0933bd8ec1515167ea653f7ee788b8bbde27d51) There are concerns on the review that this breaks EFI builds and that the transitive includes (sal.h) are actually heavy enough that we might care. llvm-svn: 360291
* Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MSMike Rice2019-05-082-0/+11
| | | | | | | | | | | compatibility. This allows some applications developed with MSVC to compile with clang without any extra changes. Fixes: llvm.org/PR40789 Differential Revision: https://reviews.llvm.org/D61646 llvm-svn: 360271
* [OpenMP][Clang] Support for target math functionsGheorghe-Teodor Bercea2019-05-088-432/+566
| | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "[OpenMP][Clang] Support for target math functions"Jonas Devlieghere2019-05-078-552/+431
| | | | | | | | | | | | | | This commit appears to be breaking stage-2 builds on GreenDragon. The OpenMP wrappers for cmath and math.h are copied into the root of the resource directory and cause a cyclic dependency in module 'Darwin': Darwin -> std -> Darwin. This blows up when CMake is testing for modules support and breaks all stage 2 module builds, including the ThinLTO bot and all LLDB bots. CMake Error at cmake/modules/HandleLLVMOptions.cmake:497 (message): LLVM_ENABLE_MODULES is not supported by this compiler llvm-svn: 360192
* [OpenMP][Clang] Support for target math functionsGheorghe-Teodor Bercea2019-05-068-431/+552
| | | | | | | | | | | | | | | | | | | | | | | 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: mgorny, guansong, cfe-commits, jdoerfert Tags: #clang Differential Revision: https://reviews.llvm.org/D61399 llvm-svn: 360063
* [X86] Move files to correct directories after D60552Fangrui Song2019-05-062-0/+618
| | | | llvm-svn: 360022
* Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper ↵Luo, Yuanke2019-05-063-0/+14
| | | | | | | | | | | | | | | | | | | | | | | 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
* lib/Header: Fix Visual Studio builds try #2Tom Stellard2019-05-011-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a follow up to r355253 and a better fix than the first attempt which was r359257. We can't install anything from ${CMAKE_CFG_INTDIR}, because this value is only defined at build time, but we still must make sure to copy the headers into ${CMAKE_CFG_INTDIR}/lib/clang/$VERSION/include, because the lit tests look for headers there. So for this fix we revert to the old behavior of copying the headers to ${CMAKE_CFG_INTDIR}/lib/clang/$VERSION/include during the build and then installing them from the source tree. Reviewers: smeenai, vzakhari, phosek Reviewed By: smeenai, vzakhari Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61220 llvm-svn: 359654
* [AArch64] Add support for MTE intrinsicsJaved Absar2019-04-261-0/+10
| | | | | | | | | | | | This provides intrinsics support for Memory Tagging Extension (MTE), which was introduced with the Armv8.5-a architecture. These intrinsics are available when __ARM_FEATURE_MEMORY_TAGGING is defined. Each intrinsic is described in detail in the ACLE Q1 2019 documentation: https://developer.arm.com/docs/101028/latest Reviewed By: Tim Nortover, David Spickett Differential Revision: https://reviews.llvm.org/D60485 llvm-svn: 359348
* Revert lib/Header: Fix Visual Studio buildsTom Stellard2019-04-261-1/+1
| | | | | | | | This reverts r359257 (git commit 00d9789509a4c573a48f60893b95314a119edd42) This broke check-clang. llvm-svn: 359258
* lib/Header: Fix Visual Studio buildsTom Stellard2019-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: This is a follow up to r355253, which inadvertently broke Visual Studio builds by trying to copy files from CMAKE_CFG_INTDIR. See https://reviews.llvm.org/D58537#inline-532492 Reviewers: smeenai, vzakhari, phosek Reviewed By: smeenai Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61054 llvm-svn: 359257
* [PowerPC][NFC]Update licence to Apache 2Jinsong Ji2019-04-251-17/+3
| | | | llvm-svn: 359164
* [PowerPC] [Clang] Port MMX intrinsics and basic test cases to PowerQiu Chaofan2019-04-232-1/+1462
| | | | | | | | | | | | | | Port mmintrin.h which include x86 MMX intrinsics implementation to PowerPC platform (using Altivec). To make the include process correct, PowerPC's toolchain class is overrided to insert new headers directory (named ppc_wrappers) into the path. Basic test cases for several intrinsic functions are added. The header is mainly developed by Steven Munroe, with contributions from Paul Clarke, Bill Schmidt, Jinsong Ji and Zixuan Wu. Reviewed By: Jinsong Ji Differential Revision: https://reviews.llvm.org/D59924 llvm-svn: 358949
* [CUDA][Windows] Restrict long double device functions declarations to WindowsEvgeny Mankov2019-04-183-3/+12
| | | | | | | | | | | | | As agreed in D60220, make long double declarations unobservable on non-windows platforms. [Testing] {Windows 10, Ubuntu 16.04.5}/{Visual C++ 2017 15.9.11 & 2019 16.0.1, gcc+ 5.4.0}/CUDA {8.0, 9.0, 9.1, 9.2, 10.0, 10.1} Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D60818 llvm-svn: 358654
* [X86] Restore the pavg intrinsics.Craig Topper2019-04-153-30/+6
| | | | | | | | | | | | | | | The pattern we replaced these with may be too hard to match as demonstrated by PR41496 and PR41316. This patch restores the intrinsics and then we can start focusing on the optimizing the intrinsics. I've mostly reverted the original patch that removed them. Though I modified the avx512 intrinsics to not have masking built in. Differential Revision: https://reviews.llvm.org/D60674 llvm-svn: 358427
* Move the builtin headers to use the new license file header.Chandler Carruth2019-04-08114-1954/+342
| | | | | | | | | | | | | | | | | | Summary: These all had somewhat custom file headers with different text from the ones I searched for previously, and so I missed them. Thanks to Hal and Kristina and others who prompted me to fix this, and sorry it took so long. Reviewers: hfinkel Subscribers: mcrosier, javed.absar, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60406 llvm-svn: 357941
* [CUDA][Windows] Last fix for the clang Bug 38811 "Clang fails to compile ↵Evgeny Mankov2019-04-053-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with CUDA-9.x on Windows" (https://bugs.llvm.org/show_bug.cgi?id=38811). [IMPORTANT] With that last fix, CUDA has just started being compiling by clang on Windows after nearly a year and two clang’s major releases (7 and 8). As long as the last LLVM release, in which clang was compiling CUDA on Windows successfully, was 6.0.1, this fix and two previous have to be included into upcoming 7.1.0 and 8.0.1 releases. [How to repro] clang++.exe -x cuda "c:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0\0_Simple\simplePrintf\simplePrintf.cu" -I"c:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0\common\inc" --cuda-gpu-arch=sm_50 --cuda-path="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0" -L"c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64" -lcudart.lib -v [Output] In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:390:11: error: no matching function for call to '__isinfl' return (__isinfl(a) != 0); ^~~~~~~~ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2662:14: note: candidate function not viable: call to __host__ function from __device__ function __func__(int __isinfl(long double a)) ^ In file included from <built-in>:1: In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:438:11: error: no matching function for call to '__isnanl' return (__isnanl(a) != 0); ^~~~~~~~ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2672:14: note: candidate function not viable: call to __host__ function from __device__ function __func__(int __isnanl(long double a)) ^ In file included from <built-in>:1: In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:486:11: error: no matching function for call to '__finitel' return (__finitel(a) != 0); ^~~~~~~~~ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2652:14: note: candidate function not viable: call to __host__ function from __device__ function __func__(int __finitel(long double a)) ^ 3 errors generated when compiling for sm_50. [Solution] Add missing long double device functions' declarations. Provide only declarations to prevent any use of long double on the device side, because CUDA does not support long double on the device side. [Testing] {Windows 10, Ubuntu 16.04.5}/{Visual C++ 2017 15.9.9, gcc+ 5.4.0}/CUDA {8.0, 9.0, 9.1, 9.2, 10.0, 10.1} Reviewed by: Artem Belevich Differential Revision: http://reviews.llvm.org/D60220 llvm-svn: 357779
* [X86] Make _bswap intrinsic a function instead of a macro to hopefully fix ↵Craig Topper2019-03-241-1/+5
| | | | | | | | the chromium build. This intrinsic was added in r356848 but was implemented as a macro to match gcc. llvm-svn: 356862
* [X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc.Craig Topper2019-03-242-12/+108
| | | | | | | | | | | | | | | | | | | | Summary: These are all implemented by icc as well. I made bit_scan_forward/reverse forward to the __bsfd/__bsrq since we also have __bsfq/__bsrq. Note, when lzcnt is enabled the bsr intrinsics generates lzcnt+xor instead of bsr. Reviewers: RKSimon, spatel Subscribers: cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59682 llvm-svn: 356848
* [X86] Add __popcntd and __popcntq to ia32intrin.h to match gcc and icc. ↵Craig Topper2019-03-212-32/+42
| | | | | | | | | | Remove popcnt feature flag from _popcnt32/_popcnt64 and move to ia32intrin.h to match gcc gcc and icc both implement popcntd and popcntq which we did not. gcc doesn't seem to require a feature flag for the _popcnt32/_popcnt64 spelling and will use a libcall if its not supported. Differential Revision: https://reviews.llvm.org/D59567 llvm-svn: 356689
* [X86] Add __crc32b/__crc32w/__crc32d/__crc32q intrinsics to match gcc and icc.Craig Topper2019-03-201-0/+86
| | | | | | | | | gcc has these intrinsics in ia32intrin.h as well. And icc implements them though they aren't documented in the Intel Intrinsics Guide. Differential Revision: https://reviews.llvm.org/D59533 llvm-svn: 356609
* [X86] Add gcc rotate intrinsics to ia32intrin.hCraig Topper2019-03-181-0/+60
| | | | | | | | | | | | | | | | This is another attempt at what Erich Keane tried to do in r355322. This adds rolb, rolw, rold, rolq and their ror equivalent as always_inline wrappers around __builtin_rotate* which will lower to funnel shift intrinsics in IR. Additionally, when _MSC_VER is not defined we will define _rotl, _lrotl, _rotr, _lrotr as macros to one of the always_inline intrinsics mentioned above. Making sure that _lrotl/_lrotr use either 32 or 64 bit based on the size of long. These need to be macros because we have builtins with the same name for MS compatibility, but _MSC_VER isn't always defined when those builtins are enabled. We also define _rotwl and _rotwr as macros aliasing to rolw/rorw just like gcc to complete the set. These don't need to be gated with _MSC_VER because these aren't MS builtins. I've added tests both for non-MS and -ms-extensions with and without _MSC_VER being defined. Differential Revision: https://reviews.llvm.org/D59346 llvm-svn: 356423
* [CUDA][Windows] Partial fix for bug 38811 (Step 2 of 3)Evgeny Mankov2019-03-152-11/+11
| | | | | | | | | | | | | | | | | | | | Partial fix for the clang Bug 38811 "Clang fails to compile with CUDA-9.x on Windows". [Synopsis] __sptr is a new Microsoft specific modifier (https://docs.microsoft.com/en-us/cpp/cpp/sptr-uptr?view=vs-2017). [Solution] Replace all `__sptr` occurrences with `__s` (and all `__cptr` with `__c` as well) to eliminate the below clang compilation error on Windows. In file included from C:\GIT\LLVM\trunk\llvm-64-release-vs2017-15.9.5\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:162: C:\GIT\LLVM\trunk\llvm-64-release-vs2017-15.9.5\dist\lib\clang\9.0.0\include\__clang_cuda_device_functions.h:524:33: error: expected expression return __nv_fast_sincosf(__a, __sptr, __cptr); ^ Reviewed by: Artem Belevich Differential Revision: http://reviews.llvm.org/D59423 llvm-svn: 356291
* [CUDA][Windows] Partial fix for bug #38811 (Step 1 of 3)Evgeny Mankov2019-03-151-2/+2
| | | | | | | | | | | | | | | Partial fix for the clang Bug https://bugs.llvm.org/show_bug.cgi?id=38811 "Clang fails to compile with CUDA-9.x on Windows". Adding defined(_WIN64) check along with existing #if defined(__LP64__) eliminates the below clang (64-bit) compilation error on Windows. C:/GIT/LLVM/trunk/llvm-64-release-vs2017/dist/lib/clang/9.0.0\include\__clang_cuda_device_functions.h(1609,45): error GEF7559A7: no matching function for call to 'roundf' __DEVICE__ long lroundf(float __a) { return roundf(__a); } Reviewed by: Artem Belevich Differential Revision: http://reviews.llvm.org/D59361 llvm-svn: 356255
* [build] Rename clang-headers to clang-resource-headersShoaib Meenai2019-03-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* lib/Header: Simplify CMakeLists.txtTom Stellard2019-03-021-39/+30
| | | | | | | | | | | | | | | | | | | | | | | Summary: Replace cut and pasted code with cmake macros and reduce the number of install commands. This fixes an issue where the headers were being installed twice. This clean up should also make future modifications easier, like adding a cmake option to install header files into a custom resource directory. Reviewers: chandlerc, smeenai, mgorny, beanz, phosek Reviewed By: smeenai Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58537 llvm-svn: 355253
* [clang] Only provide C11 features in <float.h> starting with C++17Louis Dionne2019-02-221-2/+2
| | | | | | | | | | | | | | Summary: In r353970, I enabled those features in C++11 and above. To be strictly conforming, those features should only be enabled in C++17 and above. Reviewers: jfb, eli.friedman Subscribers: jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D58289 llvm-svn: 354691
* [clang] Switch to LLVM_ENABLE_IDEShoaib Meenai2019-02-201-1/+1
| | | | | | | | | | | | r344555 switched LLVM to guarding install targets with LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES, which expresses the intent more directly and can be overridden by a user. Make the corresponding change in clang. LLVM_ENABLE_IDE is computed by HandleLLVMOptions, so it should be available for both standalone and integrated builds. Differential Revision: https://reviews.llvm.org/D58284 llvm-svn: 354525
* [clang] Make sure C99/C11 features in <float.h> are provided in C++11Louis Dionne2019-02-131-4/+4
| | | | | | | | | | | | | | | | Summary: Previously, those #defines were only provided in C or when GNU extensions were enabled. We need those #defines in C++11 and above, too. Reviewers: jfb, eli.friedman Subscribers: jkorous, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58149 llvm-svn: 353970
* [Headers][mips] Add `__attribute__((__mode__(__unwind_word__)))` to the ↵Simon Atanasyan2019-02-131-2/+2
| | | | | | | | | | | | | | | | | | _Unwind_Word / _Unwind_SWord definitions The rationale of this change is to fix _Unwind_Word / _Unwind_SWord definitions for MIPS N32 ABI. This ABI uses 32-bit pointers, but _Unwind_Word and _Unwind_SWord types are eight bytes long. # The __attribute__((__mode__(__unwind_word__))) is added to the type definitions. It makes them equal to the corresponding definitions used by GCC and allows to override types using `getUnwindWordWidth` function. # The `getUnwindWordWidth` virtual function override in the `MipsTargetInfo` class and provides correct type size values. Differential revision: https://reviews.llvm.org/D58165 llvm-svn: 353965
* [X86] Use __m128_u for _mm_loadu_ps after r353555Reid Kleckner2019-02-121-1/+1
| | | | | | | | Add secondary triple to existing SSE test for it. I audited other uses of __attribute__((__packed__)) in the intrinsic headers, and this seemed to be the only missing one. llvm-svn: 353878
* [X86] Use the new unaligned vector typedefs for the loadu/storeu intrinsics ↵Craig Topper2019-02-122-8/+8
| | | | | | | | pointer arguments. This matches what gcc does and what was suggested by rnk in PR20670. llvm-svn: 353802
* [COFF, ARM64] Remove definitions for _byteswap library functionsTom Tan2019-02-111-9/+3
| | | | | | | | | | | | | _byteswap_* functions are are implemented in below file as normal function from libucrt.lib and declared in stdlib.h. Define them in intrin.h triggers lld error "conflicting comdat type" and "duplicate symbols" which was just added to LLD (https://reviews.llvm.org/D57324). C:\Program Files (x86)\Windows Kits\10\Source\10.0.17763.0\ucrt\stdlib\byteswap.cpp Differential Revision: https://reviews.llvm.org/D57915 llvm-svn: 353740
* [X86] Add explicit alignment to __m128/__m128i/__m128d/etc. to allow ↵Craig Topper2019-02-088-51/+64
| | | | | | | | | | | | | | | | | | | | | | | matching of MSVC behavior with #pragma pack. Summary: With MSVC, #pragma pack is ignored when there is explicit alignment. This differs from gcc. Clang emulates this difference when compiling for Windows. It appears that MSVC and its headers consider the __m128/__m128i/__m128d/etc. types to be explicitly aligned and ignores #pragma pack for them. Since we don't have explicit alignment on them in our headers, we don't match the MSVC behavior here. This patch adds explicit alignment to match this behavior. I'm hoping this won't cause any problems when we're not emulating MSVC. But if someone knows of something that would be different we can swith to conditionally adding the alignment based on _MSC_VER. I had to add explicitly unaligned types as well so we could use them in the loadu/storeu intrinsics which use __attribute__(__packed__). Using the now explicitly aligned types wouldn't produce align 1 accesses when targeting Windows. Reviewers: rnk, erichkeane, spatel, RKSimon Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57961 llvm-svn: 353555
* [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusRegEli Friedman2019-02-081-2/+2
| | | | | | | | | | r344765 added those intrinsics, but used the wrong types. Patch by Mike Hommey Differential Revision: https://reviews.llvm.org/D57636 llvm-svn: 353493
* Basic CUDA-10 support.Artem Belevich2019-02-051-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D57771 llvm-svn: 353232
* [CUDA] add support for the new kernel launch API in CUDA-9.2+.Artem Belevich2019-01-311-0/+10
| | | | | | | | | | | | | Instead of calling CUDA runtime to arrange function arguments, the new API constructs arguments in a local array and the kernels are launched with __cudaLaunchKernel(). The old API has been deprecated and is expected to go away in the next CUDA release. Differential Revision: https://reviews.llvm.org/D57488 llvm-svn: 352799
OpenPOWER on IntegriCloud