Improve vectorization diagnostic messages and extend vectorize(enable) pragma.
authorTyler Nowicki <tyler.nowicki@gmail.com>
Thu, 27 Aug 2015 18:56:49 +0000 (18:56 +0000)
committerTyler Nowicki <tyler.nowicki@gmail.com>
Thu, 27 Aug 2015 18:56:49 +0000 (18:56 +0000)
commit5e59aab216c2ce41abbf2ba850fb5f19d2384559
tree7580f4de0a73051d41f142d3385d949a38fabe6e
parent75e205d68223e849ef6f4889dee63adb093ef9d9
Improve vectorization diagnostic messages and extend vectorize(enable) pragma.

This patch changes the analysis diagnostics produced when loops with
floating-point recurrences or memory operations are identified. The new messages
say "cannot prove it is safe to reorder * operations; allow reordering by
specifying #pragma clang loop vectorize(enable)". Depending on the type of
diagnostic the message will include additional options such as ffast-math or
__restrict__.

This patch also allows the vectorize(enable) pragma to override the low pointer
memory check threshold. When the hint is given a higher threshold is used.

See the clang patch for the options produced for each diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246187 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/X86/no_fpmath.ll
test/Transforms/LoopVectorize/runtime-limit.ll