summaryrefslogtreecommitdiff
path: root/lib/Transforms/Vectorize/LoopVectorize.cpp
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2014-04-29 14:27:31 +0000
committerDiego Novillo <dnovillo@google.com>2014-04-29 14:27:31 +0000
commit44180390f8c484e946e61fa800bfd8cf24d4af30 (patch)
tree9d01ca78a806aabcb64ceb4eb114c5eda3c47969 /lib/Transforms/Vectorize/LoopVectorize.cpp
parentedc45954721e8fb27537319dc276f0b2dddf2863 (diff)
downloadllvm-44180390f8c484e946e61fa800bfd8cf24d4af30.tar.gz
llvm-44180390f8c484e946e61fa800bfd8cf24d4af30.tar.bz2
llvm-44180390f8c484e946e61fa800bfd8cf24d4af30.tar.xz
Add optimization remarks to the loop unroller and vectorizer.
Summary: This calls emitOptimizationRemark from the loop unroller and vectorizer at the point where they make a positive transformation. For the vectorizer, it reports vectorization and interleave factors. For the loop unroller, it reports all the different supported types of unrolling. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3456 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index cf210d679d..586c220162 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1222,6 +1222,12 @@ struct LoopVectorize : public FunctionPass {
// Mark the loop as already vectorized to avoid vectorizing again.
Hints.setAlreadyVectorized(L);
+ // Report the vectorization decision.
+ F->getContext().emitOptimizationRemark(
+ DEBUG_TYPE, *F, L->getStartLoc(),
+ Twine("vectorized loop (vectorization factor: ") + Twine(VF.Width) +
+ ", unroll factor: " + Twine(UF) + ")");
+
DEBUG(verifyFunction(*L->getHeader()->getParent()));
return true;
}