[Patch][LoopVectorize] Late evaluate of runtime pointer check's threshold

Tyler Nowicki via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 6 13:25:26 PDT 2015


Hi,

This patch extends the patches in 'Late evaluation of vectorization requirements’ (still in review). This makes the num runtime pointer checks test into a late diagnostic so we can give the user a better diagnostic message. Clang appends the diagnostic with options for getting the loop vectorized. Here is an example of the diagnostic the user will see:

"remark: loop not vectorized: cannot prove pointers refer to independent arrays in memory. The loop requires 9 runtime independence checks to safely vectorize the loop, but that would exceed the limit of 8 checks; increase the number of runtime pointer checks with the compiler option ‘-mllvm -runtime-memory-check-threshold=’. To avoid runtime pointer checking when you know the arrays will always be independent specify ‘#pragma clang loop vectorize(assume_safety)’ before the loop or specify ‘restrict’ on the array arguments. Erroneous results will occur if these options are incorrectly applied."

The diagnostic is produced when the command line option -Rpass-analysis=loop-vectorize is provided.

Reviews/comments are much appreciated!

Tyler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150806/1bed884e/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-Extend-late-diagnostics-to-include-late-test-for-run.patch
Type: application/octet-stream
Size: 9423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150806/1bed884e/attachment-0002.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150806/1bed884e/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Clang-Extended-late-diagnostics-to-ammend-options-related-.patch
Type: application/octet-stream
Size: 5106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150806/1bed884e/attachment-0003.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150806/1bed884e/attachment-0005.html>


More information about the cfe-commits mailing list