Hi Tyler, Thanks for working on this!
+ // If a loop hint is provided the diagnostic is always produced. + const char *name = Hints.isForced() ? DiagnosticInfo::AlwaysPrint : LV_NAME; name -> Name These LGTM. P.S. I assume we should add similar logic to the loop unroller (please add a FIXME if you're not going to do this yourself). Another place where this would be useful is to warn the user when a function marked always_inline is not actually inlined. -Hal ----- Original Message ----- > From: "Tyler Nowicki" <tnowi...@apple.com> > To: "Gonzalo BG" <gonzalob...@gmail.com>, "Hal J. Finkel" <hfin...@anl.gov>, > "Commit Messages and Patches for LLVM" > <llvm-comm...@lists.llvm.org>, "llvm cfe" <cfe-commits@lists.llvm.org> > Cc: "Gerolf Hoflehner" <ghofleh...@apple.com> > Sent: Friday, August 7, 2015 4:15:51 PM > Subject: [Patch][LoopVectorize] Print vectorization analysis when loop hint > pragma is specified > > > Hi, > > > > > > Currently, when loop hint is used but vectorization fails we generate > a warning. To get the analysis the user needs to provide the command > line option -Rpass-analysis=<passname> with the correct pass name. > BUT we don’t tell the user which pass name they will need to get the > analysis message. We should be displaying the analysis without > having to request it. > > > These patches print the analysis information when vectorization fails > on loops with hints when the compiler option ‘-Rpass-analysis’ is > provided without ‘=<passname>'. Users of loop hints can provide the > compiler option with their regular debug builds to ensure they > always get the analysis when vectorization fails. This approach is > preferred because diagnostic printing needs line number tracking > which is not enabled by normally. Specifying the option without a > pass-target enables line number tracking and makes viewing the > messages optional. > > > The LLVM patches modify the pass-name of the diagnostic to > DiagnosticInfo::AlwaysPrint, which is an empty const char*. The use > of DiagnosticInfo::AlwaysPrint is recognized when filtering the > diagnostics allowing the message to be printed even if the filter > doesn’t match. Note that the analysis of loops with hints will > always be printed whenever the compiler option is provided even if > ‘=<pass name>' is specified. This allows both types of analyses to > be printed at the same time rather than hiding the analysis on loops > with hints with an pass-target is given. > > > *These patches build on several previous patches still in review to > add late-diagnostics for fp-commut and aliasing. See threads ' Late > evaluation of vectorization r equirements’ and ' Late evaluate of > runtime pointer check's threshold' . > > > Comments and reviews are much appreciated! > > > Tyler > > > (sorry if you received this twice. I used the wrong mailing list > addresses) > > > > > > > > > > > -- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits