<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Nice!</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Mon, Aug 10, 2015 at 6:57 PM, Tyler Nowicki <span dir="ltr"><<a href="mailto:tnowicki@apple.com" target="_blank">tnowicki@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Mark: Would you be interested in extending this to the loop unroller as well?</div></div></blockquote><div><br></div><div>I'd be happy to. I'm about to head off on vacation, but I'll get to it when I return.</div><div><br></div><div>Mark</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div><br></div><div><blockquote type="cite"><span style="display:inline!important">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.</span></blockquote></div><div><br></div></span><div><div>Hal: Thanks for the all the reviews Hal!</div><div><br></div><div>Committed in r244550, r<span style="font-family:Menlo;font-size:11px">244552,r</span><span style="font-family:Menlo;font-size:11px">244555, and r</span><span style="font-family:Menlo;font-size:11px">244556.</span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Tyler</div></font></span><div><div class="h5"><div><font face="Menlo"><span style="font-size:11px"><br></span></font><div><blockquote type="cite"><div>On Aug 9, 2015, at 9:59 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>> wrote:</div><br><div><!--
--><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Hi Tyler,</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><!--
--><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Thanks for working on this!</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><!--
--><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">+ // If a loop hint is provided the diagnostic is always produced.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">+ const char *name = Hints.isForced() ? DiagnosticInfo::AlwaysPrint : LV_NAME;</span><!--
--><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">name -> Name</span><!--
--><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">These LGTM.</span><!--
--><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">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.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">-Hal</span><!--
--><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">----- Original Message -----</span><!--
--><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">From: "Tyler Nowicki" <<a href="mailto:tnowicki@apple.com" target="_blank">tnowicki@apple.com</a>><br>To: "Gonzalo BG" <<a href="mailto:gonzalobg88@gmail.com" target="_blank">gonzalobg88@gmail.com</a>>, "Hal J. Finkel" <<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>>, "Commit Messages and Patches for LLVM"<br><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>>, "<!--
-->llvm cfe" <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>><br>Cc: "Gerolf Hoflehner" <<a href="mailto:ghoflehner@apple.com" target="_blank">ghoflehner@apple.com</a>><br>Sent: Friday, August 7, 2015 4:15:51 PM<br>Subject: [Patch][LoopVectorize] Print vectorization analysis when loop hint pragma is specified<br><br><br>Hi,<br><br><br><br><br><br>Currently, when loop hint is used but vectorization fails we generate<br>a warning. To get the analysis the user needs to provide the command<br>line option -Rpass-analysis=<passname> with the correct pass name.<br>BUT we don’t tell the user which pass name they will need to get the<br>analysis message. We should be displaying the analysis without<br>having to request it.<br><br><br>These patches print the analysis information when vectorization fails<br>on loops with hints when the compiler option ‘-Rpass-analysis’ is<br>provided without ‘=<passname<!--
-->>'. Users of loop hints can provide the<br>compiler option with their regular debug builds to ensure they<br>always get the analysis when vectorization fails. This approach is<br>preferred because diagnostic printing needs line number tracking<br>which is not enabled by normally. Specifying the option without a<br>pass-target enables line number tracking and makes viewing the<br>messages optional.<br><br><br>The LLVM patches modify the pass-name of the diagnostic to<br>DiagnosticInfo::AlwaysPrint, which is an empty const char*. The use<br>of DiagnosticInfo::AlwaysPrint is recognized when filtering the<br>diagnostics allowing the message to be printed even if the filter<br>doesn’t match. Note that the analysis of loops with hints will<br>always be printed whenever the compiler option is provided even if<br>‘=<pass name>' is specified. This allows both types of analyses to<br>be printed at the same time rather than hiding the analysis on loops<br>with hints <!--
-->with an pass-target is given.<br><br><br>*These patches build on several previous patches still in review to<br>add late-diagnostics for fp-commut and aliasing. See threads ' Late<br>evaluation of vectorization r equirements’ and ' Late evaluate of<br>runtime pointer check's threshold' .<br><br><br>Comments and reviews are much appreciated!<br><br><br>Tyler<br><br><br>(sorry if you received this twice. I used the wrong mailing list<br>addresses)<br><br><br><br><br><br><br><br><br><br><br><br></blockquote><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><!--
--><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">--<span> </span></span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Hal Finkel</span><!--
--><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Assistant Computational Scientist</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><!--
--><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Leadership Computing Facility</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Argonne National Laboratory</span></div></blockquote></div><br></div></div></div></div></div></blockquote></div><br></div></div>