diff options
author | David Sherwood <david.sherwood@arm.com> | 2020-10-02 07:46:42 +0100 |
---|---|---|
committer | David Sherwood <david.sherwood@arm.com> | 2021-01-08 11:37:27 +0000 |
commit | 38d18d93534d290d045bbbfa86337e70f1139dc2 (patch) | |
tree | 34584f20cd70ee97154ca19c5480a1d156debd74 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 1e7efd397ac259429df9f212c9ec16bec8ff2533 (diff) | |
download | llvm-38d18d93534d290d045bbbfa86337e70f1139dc2.zip llvm-38d18d93534d290d045bbbfa86337e70f1139dc2.tar.gz llvm-38d18d93534d290d045bbbfa86337e70f1139dc2.tar.bz2 |
[SVE] Add support to vectorize_width loop pragma for scalable vectors
This patch adds support for two new variants of the vectorize_width
pragma:
1. vectorize_width(X[, fixed|scalable]) where an optional second
parameter is passed to the vectorize_width pragma, which indicates if
the user wishes to use fixed width or scalable vectorization. For
example the user can now write something like:
#pragma clang loop vectorize_width(4, fixed)
or
#pragma clang loop vectorize_width(4, scalable)
In the absence of a second parameter it is assumed the user wants
fixed width vectorization, in order to maintain compatibility with
existing code.
2. vectorize_width(fixed|scalable) where the width is left unspecified,
but the user hints what type of vectorization they prefer, either
fixed width or scalable.
I have implemented this by making use of the LLVM loop hint attribute:
llvm.loop.vectorize.scalable.enable
Tests were added to
clang/test/CodeGenCXX/pragma-loop.cpp
for both the 'fixed' and 'scalable' optional parameter.
See this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html
Differential Revision: https://reviews.llvm.org/D89031
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions