Improved Diagnostics and Extended vectorize(enable)
Tyler Nowicki via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 16:19:40 PDT 2015
Hi,
I’ve been working on the vectorization diagnostics a little more. The first patch makes sure the analysis diagnostics are printed unless a disabling hint is provided. And the two pairs of LLVM and Clang patches make the diagnostic messages easier to understand and extend the vectorize(enable) hint to override the mem-pointer check threshold.
The new diagnostics are:
remark: loop not vectorized: cannot prove it is safe to reorder floating-point operations; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop or by providing the compiler option '-ffast-math’.
and
remark: loop not vectorized: cannot prove it is safe to reorder memory operations; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop. If the arrays will always be independent specify '#pragma clang loop vectorize(assume_safety)' before the loop or provide the '__restrict__' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied!
Using 'vectorize(enable)' to reorder memory operations is always safe (but not for fp ops), where as using 'vectorize(assume_safety)' might be dangerous. I removed the references to the mem-check threshold because I realized only compiler developers would know what it means.
Feedback is appreciated!
Tyler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-1-LoopVectorizeHints-produces-the-appropriate-pass-name.patch
Type: application/octet-stream
Size: 10086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150821/4ffe8cdf/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-2-Modify-diagnostics-to-use-reordering-concept.patch
Type: application/octet-stream
Size: 4629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150821/4ffe8cdf/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Clang-2-Modify-diagnostics-to-use-reordering-concept.patch
Type: application/octet-stream
Size: 3586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150821/4ffe8cdf/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-3-Allow-hint-to-override-memcheck-threshold.patch
Type: application/octet-stream
Size: 5404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150821/4ffe8cdf/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Clang-3-Allow-hint-to-override-memcheck-threshold.patch
Type: application/octet-stream
Size: 3045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150821/4ffe8cdf/attachment-0004.obj>
More information about the llvm-commits
mailing list