[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)
commita48f58c97feca138f772e2cf122f229d6e341d82
treecbbebea1d0812d3b8092c53429aa27b1fb332f55
parent3e023a6dbceca8dba9763d102079aff0d9861e05
[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

llvm-svn: 366989
13 files changed:
clang/docs/LanguageExtensions.rst
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/lib/CodeGen/CGLoopInfo.cpp
clang/lib/CodeGen/CGLoopInfo.h
clang/lib/Parse/ParsePragma.cpp
clang/lib/Sema/SemaStmtAttr.cpp
clang/test/AST/ast-print-pragmas.cpp
clang/test/CodeGenCXX/pragma-loop-predicate.cpp [new file with mode: 0644]
clang/test/Parser/pragma-loop.cpp
clang/test/Parser/pragma-unroll-and-jam.cpp
llvm/docs/LangRef.rst