Emit warnings if vectorization is forced and fails.
authorTyler Nowicki <tnowicki@apple.com>
Wed, 16 Jul 2014 00:36:00 +0000 (00:36 +0000)
committerTyler Nowicki <tnowicki@apple.com>
Wed, 16 Jul 2014 00:36:00 +0000 (00:36 +0000)
commit77f03040d5989b6a905496b3777e112fc3f24c8e
tree825787d90d8db0881e0a118796fba04a7ab9fae0
parent7e752a311a999fe53546f57eb203eaad23296fe7
Emit warnings if vectorization is forced and fails.

This patch modifies the existing DiagnosticInfo system to create a generic base
class that is inherited to produce diagnostic-based warnings. This is used by
the loop vectorizer to trigger a warning when vectorization is forced and
fails. Several tests have been added to verify this behavior.

Reviewed by: Arnold Schwaighofer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213110 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DiagnosticInfo.h
lib/IR/DiagnosticInfo.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll
test/Transforms/LoopVectorize/no_array_bounds.ll [new file with mode: 0644]
test/Transforms/LoopVectorize/no_switch.ll