[llvm-dev] vectorize.enable
Michael Kruse via llvm-dev
llvm-dev at lists.llvm.org
Mon Oct 7 13:42:14 PDT 2019
Am Mo., 7. Okt. 2019 um 08:12 Uhr schrieb Hans Wennborg <hans at chromium.org>:
> Yes it will be correct, but again it's not entirely clear what action
> the user should take. Should one always use this #pragma with some
> #ifdef to check optimization level? I don't mean to complain, I'm just
> not sure what the answer is to these problems.
These warnings depend on optimization options, toolchain (e.g.
LTO,PGO) and target platform. That is, the warning may appear in many
circumstances that have not been tested by an upsteam project. My
suggestion to compile without warning would be:
If the vectorization is not very important, remove the pragma and
leave the decision to the compiler.
If code size in -Oz is more important than vectorization, add
-Wno-pass-failed to the command line in that configuration.
If vectorization is critical (it seems not to since the #pragma is
already guarded by an #if), I see no other way than maintaining a list
of supported configurations or manual vectorization. The vector width
is target-specific already.
This kind of warning has been introduced in r213110, r213112 [1,2].
Unfortunately I have not found a discussion about the unpredictable
nature of forced transformation failure warnings. Maybe we have one
now.
Michael
[1] https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20140714/225803.html
[2] https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20140714/110132.html
More information about the llvm-dev
mailing list