[PATCH] #pragma vectorize

Nadav Rotem nrotem at apple.com
Tue Apr 22 12:26:32 PDT 2014


On Apr 22, 2014, at 12:07 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> Hrmm; interesting. Is this the behavior we want? I'd be inclined to say that the pragma should imply safety.

I prefer to implement ‘unsafe’ vectorization with a separate pragma keyword.  I would like to discourage users from using this option because it can break the correctness of their program, and I think that ’safe’ is a better default.  Vectorizing a loop in an ‘unsafe’ mode adds a risk and marking the loop with the ‘unsafe’ keyword makes the decision explicit and documents.  
I think that it is reasonable to require users to write: #pragma vectorize unsafe width(4) …  

Thanks,
Nadav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140422/e1d0e09f/attachment.html>


More information about the cfe-commits mailing list