[clang-tidy] Add `readability-simd-intrinsics` check.
authorFangrui Song <maskray@google.com>
Thu, 15 Feb 2018 17:56:43 +0000 (17:56 +0000)
committerFangrui Song <maskray@google.com>
Thu, 15 Feb 2018 17:56:43 +0000 (17:56 +0000)
commit258a9590849fcb94ce8709036de3a833f580118e
treec6bf03e055a1e8d9fa5adbf2611c888617a87941
parentb2c508b43fea374cccea89ae5445a94d56491a02
[clang-tidy] Add `readability-simd-intrinsics` check.

Summary:
Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX,
ARM NEON). It is common that SIMD code implementing the same algorithm, is
written in multiple target-dispatching pieces to optimize for different
architectures or micro-architectures.

The C++ standard proposal P0214 and its extensions cover many common SIMD
operations. By migrating from target-dependent intrinsics to P0214 operations,
the SIMD code can be simplified and pieces for different targets can be unified.

Refer to http://wg21.link/p0214 for introduction and motivation for the
data-parallel standard library.

Subscribers: klimek, aemerson, mgorny, xazax.hun, kristof.beyls, hintonda, cfe-commits

Differential Revision: https://reviews.llvm.org/D42983

llvm-svn: 325272
clang-tools-extra/clang-tidy/readability/CMakeLists.txt
clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tools-extra/clang-tidy/readability/SIMDIntrinsicsCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/readability/SIMDIntrinsicsCheck.h [new file with mode: 0644]
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/readability-simd-intrinsics.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/readability-simd-intrinsics-ppc.cpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/readability-simd-intrinsics-x86.cpp [new file with mode: 0644]