Print vectorization analysis when loop hint is specified.
authorTyler Nowicki <tyler.nowicki@gmail.com>
Tue, 11 Aug 2015 01:09:15 +0000 (01:09 +0000)
committerTyler Nowicki <tyler.nowicki@gmail.com>
Tue, 11 Aug 2015 01:09:15 +0000 (01:09 +0000)
commitc94d6ad241782de3d44a930db5990162da1c309e
tree581d4b0eaeb8d9faedca5e6a7ed49830562b6dc3
parent149d04c29a7bb86df5c6fcfaee90098db2e3c9dd
Print vectorization analysis when loop hint is specified.

This patch and a relatec clang patch solve the problem of having to explicitly enable analysis when specifying a loop hint pragma to get the diagnostics. Passing AlwasyPrint as the pass name (see below) causes the front-end to print the diagnostic if the user has specified '-Rpass-analysis' without an '=<target-pass>’. Users of loop hints can pass that compiler option without having to specify the pass and they will get diagnostics for only those loops with loop hints.

llvm-svn: 244555
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/lib/IR/DiagnosticInfo.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/control-flow.ll
llvm/test/Transforms/LoopVectorize/no_outside_user.ll
llvm/test/Transforms/LoopVectorize/no_switch.ll