<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 16, 2013, at 6:25 PM, Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">But it seems, that being the case, we could still return 'n/5' for loops with only one exiting block? I thought that is what SE->hasLoopInvariantBackedgeTakenCount(L) was for. It would only say that there was a backedge-taken count if the loop structure was simple enough that there was one unambiguous answer. Is this just an implementation oversight, or are there additional complications?<br><br><blockquote type="cite"><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></blockquote><br>I recall discussing this before, and so I apologize, but can you elaborate on what 'communicate properly' will entail?<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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; 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; float: none; display: inline !important;">I’m open to anything. For each branch exit we could distinguish between a min vs. exact backedge taken count.<span class="Apple-converted-space"> </span></span></blockquote></div><br><div>Minimum taken count is the wrong term. We have either an “exact-may-exit” count or an “exact-must-exit” count. The implication of exact-may-exit is that either:</div><div>- the loop exits at this iteration</div><div>- the loop exits at a later iteration via another exit</div><div>- the loop terminates at a later iteration</div><div>- the loop exhibits undefined behavior (at a later iteration)</div><div><br></div><div>Of course, in either case, the loop may exit earlier via another exit or terminate early.</div><div><br></div><div>-Andy</div></body></html>