[PATCH] Improved vectorization diagnostics remarks

Arnold Schwaighofer aschwaighofer at apple.com
Wed Jul 30 08:22:07 PDT 2014


Index: lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- lib/Transforms/Vectorize/LoopVectorize.cpp	(revision 214114)
+++ lib/Transforms/Vectorize/LoopVectorize.cpp	(working copy)
@@ -3676,7 +3676,8 @@
           continue;
         }
 
-        emitAnalysis(Report(it) << "unvectorizable operation");
+        emitAnalysis(Report(it) << "value that could not be identified as "
+                                   "reduction is used outside the loop");
         DEBUG(dbgs() << "LV: Found an unidentified PHI."<< *Phi <<"\n");
         return false;
       }// end of PHI handling

The loop vectorizer classifies phi cycles as either induction or reduction variables. If it ends up here it could identify them as neither. 

“value could not be identified as induction or reduction variable”

With the change LGTM.

> On Jul 28, 2014, at 12:42 PM, Tyler Nowicki <tnowicki at apple.com> wrote:
> 
> Hi,
> 
> Here is two patches to improve the vectorization diagnostic remarks so the output is more intelligible. The first patch improves the remark generated when a variable is used outside the loop but it is not a reduction. The second patch improves the remark generated for -Rpass-missed.
> 
> Tyler
> 
> <improve_no_outside_user_remarks-svn.patch>
> 
> <improve_pass-missed-remarks-svn.patch>





More information about the llvm-commits mailing list