[PATCH] Generate warning when explicitly specified vectorization fails

Bataev, Alexey a.bataev at hotmail.com
Wed Jul 2 20:27:59 PDT 2014


Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team

Hi Tyler,
Try to build clang in 32 bit mode and run test 
test/Transforms/LoopVectorize/no_array_bounds.ll. Will it pass?

Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team
Intel Corp.

03.07.2014 6:17, Tyler Nowicki ?????:
> Hi,
>
> Here are a pair of patches to clang and llvm that cause llvm to generate a warning when vectorization is explicitly enabled but fails to occur. For example, if the programmer wants vectorization and has specified #pragma clang loop vectorize(enable) before a loop and the loop fails to vectorize a warning will be generated.
>
> This will improve the usefulness of the #pragma clang loop vectorize/interleave directives because it gives users feedback without having to check the Rpass diagnostics to verify vectorization has occurred.
>
> The implementation is similar to the way remarks are generated. Clang installs a diagnostic handler into llvm to catch the warnings so it can print the line of code and carrot where vectorization failed. Also works with interleaving. We should probably also add this to unrolling for symmetry.
>
> Let me know what you think.
>
> Tyler
>
> LLVM
>
>
>
> Clang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140703/47c9e0b6/attachment.html>


More information about the cfe-commits mailing list