<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Arnold,</div><div class=""><br class=""></div><div class="">It might be possible to combine both methods. Soon I’ll be extending AddBasicRecurrenceVar() to identify other uses of a recurrence, such as a store. I’ll try to combine them after that.</div><div class=""><br class=""></div><div class="">This is better?</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  // A value in the basic recurrence can be used:                              <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //  - By the recurrence:                                                     <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //      - Recurrence operation:                                              <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //        - One use of recurrence value (safe).                              <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //        - Multiple use of recurrence value (not safe).                     <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //      - PHI:                                                               <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //        - All uses of the PHI must be the recurrence (safe).               <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //        - Otherwise, not safe.                                             <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //  - By out-of-loop instructions (not safe).                                <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //  - By non-recurrence instructions in the loop:                            <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //      - Multiple uses by reductions (safe).                                <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //      - Otherwise, not safe.                                               <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //    This is either:                                                        <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //      * An instruction type other than PHI or the recurrence operation.    <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7" class=""> </span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  //      * A PHI in the header other than the initial PHI.</div></div><div class=""><br class=""></div><div class="">Thanks for the review!</div><div class=""><br class=""></div><div class="">Tyler</div><div><br class=""><blockquote type="cite" class=""><div class="">+  // A value in the simple recurrence can be used:<br class="">+  //  - By the recurrence:<br class="">+  //      - Recurrence operation:<br class="">+  //        - One use of recurrence value (safe).<br class="">+  //        - Multiple use of recurrence value (not safe).<br class="">+  //      - PHI:<br class="">+  //        - All uses of the PHI must be the recurrence (safe).<br class="">+  //        - Otherwise, not safe.<br class="">+  //  - By any instructions outside of the loop (not safe).<br class=""><br class="">Here.<br class=""><br class="">+  //  - By an instruction that is not part of the recurrence:<br class="">+  //      - Multiple uses by reductions (safe).<br class="">+  //      - Multiple uses by stores (safe).<br class="">+  //      - Otherwise, not safe.<br class="">+  //    This is either:<br class="">+  //      * An instruction type other than PHI or the reduction operation.<br class="">+  //      * A PHI in the header other than the initial PHI.<br class=""><br class=""><br class="">We should be able to refactor AddReductionVar and AddBasicRecurrenceVar into a common utility? They are largely identical.<br class=""><br class="">Other than that this LGTM.<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Jun 13, 2015, at 6:59 PM, Tyler Nowicki <<a href="mailto:tnowicki@apple.com" class="">tnowicki@apple.com</a>> wrote:<br class=""><br class="">Hi,<br class=""><br class="">I would appreciate a review of this patch. It builds off a couple of other patches that are also in review.<br class=""><br class="">Thanks,<br class=""><br class="">Tyler<br class=""><br class=""><blockquote type="cite" class="">On Jun 3, 2015, at 6:29 PM, Tyler Nowicki <<a href="mailto:tnowicki@apple.com" class="">tnowicki@apple.com</a>> wrote:<br class=""><br class="">Hi,<br class=""><br class="">This patch builds on the refactoring patches in "[PATCH][VECTORIZER] Refactor ReductionDescriptor to also support floating-point recurrences".<br class=""><br class="">The patch identifies basic floating-point recurrences and emits diagnostic remarks when a recurrence is found. Tests in the patch look for the diagnostic messages to verify the recurrences were found.<br class=""><br class="">Subsequent patches will make the loop vectorizer generate code for the basic recurrences. Basic recurrences are a lot like the basic reductions that are already identified and vectorized.<br class=""><br class="">Thanks,<br class=""><br class="">Tyler<br class=""><br class=""><0003-Identify-Basic-FP-Recurrences-In-Loop-Vectorizer.patch><br class=""></blockquote><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br class=""></blockquote><br class=""></div></blockquote></div><br class=""></body></html>