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)
commit641d8a06bdf6a503355d55b7a0e993a979787696
treee8af7de77b07cf25c8ee330cb437472c09f1afc7
parent4e32604f60c03c71c81f3f30fb31b1b0734e467d
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

llvm-svn: 213110
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/lib/IR/DiagnosticInfo.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll
llvm/test/Transforms/LoopVectorize/no_array_bounds.ll [new file with mode: 0644]
llvm/test/Transforms/LoopVectorize/no_switch.ll