]> granicus.if.org Git - clang/commit
[Clang] New loop pragma vectorize_predicate
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 25 Jul 2019 07:33:13 +0000 (07:33 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 25 Jul 2019 07:33:13 +0000 (07:33 +0000)
commitdfb6cacf9c29f492202b77d55f9c174a2917b190
tree8683d6e2bf33282f9b8350da39e51e593d2a7d82
parentc7a4550a9dec3c6a09f8214a28dcbeee8032a1c1
[Clang] New loop pragma vectorize_predicate

This adds a new vectorize predication loop hint:

  #pragma clang loop vectorize_predicate(enable)

that can be used to indicate to the vectoriser that all (load/store)
instructions should be predicated (masked). This allows, for example, folding
of the remainder loop into the main loop.

This patch will be followed up with D64916 and D65197. The former is a
refactoring in the loopvectorizer and the groundwork to make tail loop folding
a more general concept, and in the latter the actual tail loop folding
transformation will be implemented.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366989 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
docs/LanguageExtensions.rst
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds.td
lib/CodeGen/CGLoopInfo.cpp
lib/CodeGen/CGLoopInfo.h
lib/Parse/ParsePragma.cpp
lib/Sema/SemaStmtAttr.cpp
test/AST/ast-print-pragmas.cpp
test/CodeGenCXX/pragma-loop-predicate.cpp [new file with mode: 0644]
test/Parser/pragma-loop.cpp
test/Parser/pragma-unroll-and-jam.cpp