diff options
author | Tyler Nowicki <tnowicki@apple.com> | 2014-07-31 21:22:22 +0000 |
---|---|---|
committer | Tyler Nowicki <tnowicki@apple.com> | 2014-07-31 21:22:22 +0000 |
commit | b5a65395ccec9554181640cd1d484d7567f20862 (patch) | |
tree | 362bb0fe649ebf06445352cbde2d29a12f2fdf6e /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | |
parent | 59265af9ebfeed1abde7ab10e558e3f12e9c8306 (diff) | |
download | bcm5719-llvm-b5a65395ccec9554181640cd1d484d7567f20862.tar.gz bcm5719-llvm-b5a65395ccec9554181640cd1d484d7567f20862.zip |
Improve the remark generated for -Rpass-missed.
The current remark is ambiguous and makes it sounds like explicitly specifying vectorization will allow the loop to be vectorized. This is not the case. The improved remark directs the user to -Rpass-analysis=loop-vectorize to determine the cause of the pass-miss.
Reviewed by Arnold Schwaighofer`
llvm-svn: 214445
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 2cde0871bc4..9daee603f3b 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -1021,24 +1021,20 @@ public: std::string emitRemark() const { Report R; - R << "vectorization "; - switch (Force) { - case LoopVectorizeHints::FK_Disabled: - R << "is explicitly disabled"; - break; - case LoopVectorizeHints::FK_Enabled: - R << "is explicitly enabled"; - if (Width != 0 && Unroll != 0) - R << " with width " << Width << " and interleave count " << Unroll; - else if (Width != 0) - R << " with width " << Width; - else if (Unroll != 0) - R << " with interleave count " << Unroll; - break; - case LoopVectorizeHints::FK_Undefined: - R << "was not specified"; - break; + if (Force == LoopVectorizeHints::FK_Disabled) + R << "vectorization is explicitly disabled"; + else { + R << "use -Rpass-analysis=loop-vectorize for more info"; + if (Force == LoopVectorizeHints::FK_Enabled) { + R << " (Force=true"; + if (Width != 0) + R << ", Vector Width=" << Width; + if (Unroll != 0) + R << ", Interleave Count=" << Unroll; + R << ")"; + } } + return R.str(); } |