#pragma clang loop - documentation
Tyler Nowicki
tnowicki at apple.com
Wed Jun 11 16:00:51 PDT 2014
Thanks for the reviews Aaron and Dmitri.
Here is the final docs with all suggestions made.
Tyler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pragma_doc-svn.patch
Type: application/octet-stream
Size: 4543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140611/af685000/attachment.obj>
-------------- next part --------------
On Jun 11, 2014, at 7:51 AM, Aaron Ballman <aaron.ballman at gmail.com> wrote:
>> +A vectorized loop performs multiple iterations of the original loop
>> +simultaneously using vector instructions. The vector width is determined
>> +automatically when vectorization is enabled. It can also be specified by
>> +``vectorize_width(_value_)``, a width of 1 implies no vectorization.
>
> It's not entirely clear of what the value actually means.
I added a line defining _value_ as a positive integer.
> So this pragma does not communicate extra information about safety of
> the trasformation, compiler should still prove it as if the pragma was
> absent? (IOW, the user can apply this pragma to every loop, and it
> will not result in incorrect code being produced; suboptimal --
> certainly, but still correct.)
Yes that is correct. Safety, specified with #pragma clang loop vectorize_safe or similar, is still on the drawing board.
More information about the cfe-commits
mailing list