<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 30, 2016 at 8:09 PM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span>It was chosen by taking a number of very large codebases, finding the max number, etc.</span><div><br><div>1. I just use it for finding infinite loops and bugpointing them, so we should remove it at some point.</div><div>2. The number is basically "what is the max number of loop connectedness of a program we will ever see".</div><div>For most normal programs, it's like "2".</div><div>For generated code, you can get to like 10.</div><div>It would be an impressive mess of code to get more than that.</div><div><br></div><div>We could make it 1000 for now if we want.</div><div><br></div><div>We could also directly compute the loop connectedness and assert if we go more than that, but it's mostly a waste of time :)</div></div></div></blockquote><div><br></div><div>This is fine if it is just for debugging / bringup.</div><div><br></div><div>From your description though, it sounds like this is in fact not technically an `assert`. I.e. it is possible to construct an input to (say) `opt` with enough loop-connectedness to hit this assertion, and hitting the assertion in that case would not be due to a bug.</div><div><br></div><div>It would be good to have a comment explaining this a bit better, ideally mentioning the use right now only for debugging, the connection with loop-connectedness, and the assumptions we're making about the loop-connectedness of the inputs.</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div class="h5"><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 30, 2016, 6:51 PM Davide Italiano <<a href="mailto:davide@freebsd.org" target="_blank">davide@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Dec 30, 2016 at 3:55 PM, Sean Silva <<a href="mailto:chisophugis@gmail.com" class="m_-7633224928972339219m_1016324470432200246gmail_msg" target="_blank">chisophugis@gmail.com</a>> wrote:<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
> Why 100? It seems weird to have an `assert` against a magic number like<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
> this; presumably the assert would fail if the magic number were 2 or<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
> something? What makes 100 "impossible"? It would be good to have this in a<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
> comment.<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
><br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
I think the number "100" is chosen kinda arbitrarily. Ideally we<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
shouldn't process every instruction more than an handful of times so<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
having an instruction processed 100 times is  likely an indication for<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
bugs. I agree it could be explained in a comment (happy to change),<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
but I'd like Danny to comment further if 100 was chosen for a<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
particular reason.<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
Thanks!<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
--<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
Davide<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
"There are no solved problems; there are only problems that are more<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
or less solved" -- Henri Poincare<br class="m_-7633224928972339219m_1016324470432200246gmail_msg">
</blockquote></div></div></div></div></div></div>
</blockquote></div><br></div></div>