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

Attachment: llvm_vectorization_warn-svn.patch
Description: Binary data


Clang

Attachment: clang_pragma_warn-svn.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to