[PATCH] #pragma vectorize

Tyler Nowicki tnowicki at apple.com
Mon Apr 21 16:23:02 PDT 2014


Hi,

Please review the attached patch for adding pragma vectorize syntax / vectorization hints to clang.

pragma vectorize
* supports the options enable, disable, unroll(_value_), and width(_value_)
* options are turned into vectorization hints that are used during codegen to add metadata to the conditional branch of the for, while, and do-while loops.
* enable forces the vectorizer to consider the loop, for example when compiling with Os
* disable prevents vectorization of the loop
* The _value_ specified by unroll(_value_) and width(_value_) must be a positive integer. It will be used to set the llvm.vectorizer.unroll or llvm.vectorizer.width metadata values.

Thank you,

Tyler Nowicki
Apple

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pragma_vectorize-svn.patch
Type: application/octet-stream
Size: 23122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140421/d29d8bc8/attachment.obj>


More information about the cfe-commits mailing list