diff options
| author | Fangrui Song <maskray@google.com> | 2018-02-15 17:56:43 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2018-02-15 17:56:43 +0000 |
| commit | 258a9590849fcb94ce8709036de3a833f580118e (patch) | |
| tree | c6bf03e055a1e8d9fa5adbf2611c888617a87941 /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | |
| parent | b2c508b43fea374cccea89ae5445a94d56491a02 (diff) | |
| download | bcm5719-llvm-258a9590849fcb94ce8709036de3a833f580118e.tar.gz bcm5719-llvm-258a9590849fcb94ce8709036de3a833f580118e.zip | |
[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
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp index f39e4a1e5f6..619a44829d2 100644 --- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp @@ -31,6 +31,7 @@ #include "RedundantSmartptrGetCheck.h" #include "RedundantStringCStrCheck.h" #include "RedundantStringInitCheck.h" +#include "SIMDIntrinsicsCheck.h" #include "SimplifyBooleanExprCheck.h" #include "StaticAccessedThroughInstanceCheck.h" #include "StaticDefinitionInAnonymousNamespaceCheck.h" @@ -92,6 +93,8 @@ public: "readability-redundant-string-cstr"); CheckFactories.registerCheck<RedundantStringInitCheck>( "readability-redundant-string-init"); + CheckFactories.registerCheck<SIMDIntrinsicsCheck>( + "readability-simd-intrinsics"); CheckFactories.registerCheck<SimplifyBooleanExprCheck>( "readability-simplify-boolean-expr"); CheckFactories.registerCheck<UniqueptrDeleteReleaseCheck>( |

