<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Oct 17, 2013, at 7:02 AM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">----- Original Message -----<br><blockquote type="cite"><br><br><br>On Oct 16, 2013, at 6:25 PM, Andrew Trick < <a href="mailto:atrick@apple.com">atrick@apple.com</a> > wrote:<br><br><br><br><br>But it seems, that being the case, we could still return 'n/5' for<br>loops with only one exiting block? I thought that is what<br>SE->hasLoopInvariantBackedgeTakenCount(L) was for. It would only say<br>that there was a backedge-taken count if the loop structure was<br>simple enough that there was one unambiguous answer. Is this just an<br>implementation oversight, or are there additional complications?<br><br><br><br><br>So you could get a minimum taken count for a particular loop back<br>edge in this case if we adapt the SCEV API to communicate properly.<br><br>I recall discussing this before, and so I apologize, but can you<br>elaborate on what 'communicate properly' will entail?<br><br>I’m open to anything. For each branch exit we could distinguish<br>between a min vs. exact backedge taken count.<br><br>Minimum taken count is the wrong term. We have either an<br>“exact-may-exit” count or an “exact-must-exit” count. The<br>implication of exact-may-exit is that either:<br>- the loop exits at this iteration<br>- the loop exits at a later iteration via another exit<br>- the loop terminates at a later iteration<br>- the loop exhibits undefined behavior (at a later iteration)<br><br><br>Of course, in either case, the loop may exit earlier via another exit<br>or terminate early.<br></blockquote><br>This makes sense. Maybe something as simple as getBackedgeTakenCount(bool MayExitElsewhere = true)?<br></div></blockquote><div><br></div>Sure. As long as the comments make it clear.</div><div><br></div><div>Internally, SCEV has a per-exit BECount object that will need to know whether it has a may-exit or must-exit count.</div><div>-Andy</div><div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>-Hal<br><br><blockquote type="cite"><br><br>-Andy<br></blockquote><br>--<span class="Apple-converted-space"> </span><br>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory</div></blockquote></div><br></body></html>