diff options
author | Diego Novillo <dnovillo@google.com> | 2014-04-29 14:27:31 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2014-04-29 14:27:31 +0000 |
commit | 34fc8a7c4c9201e0496d157a41147deed7b3b705 (patch) | |
tree | 052219fe90d54ef1c3cb618a25a3dc2df4d99cfb /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | |
parent | 35995679c65c36363e347054c966b6b0ac81f8bd (diff) | |
download | bcm5719-llvm-34fc8a7c4c9201e0496d157a41147deed7b3b705.tar.gz bcm5719-llvm-34fc8a7c4c9201e0496d157a41147deed7b3b705.zip |
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
llvm-svn: 207528
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index cf210d679d8..586c220162f 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/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; } |