<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 14, 2016 at 10:36 AM, Lawrence, Peter <span dir="ltr"><<a href="mailto:c_plawre@qca.qualcomm.com" target="_blank">c_plawre@qca.qualcomm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Daniel,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">              What am I missing in the following chain of logic:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">As far as constant-prop, value-prop, range-prop, and general property-propagation,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">1. the compiler/optimizer *<b>has</b>* to get it right for if-then-else and while-do or else we should all start over
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1f497d">J</span></p></div></div></blockquote><div><br></div><div>Only certain parts of the compiler know how to do this.</div><div>This is precisely one of the reasons i'm proposing we've gotten it wrong.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">2. “assert” takes advantage of this by being translated into if-then logic early on in the compilation<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">3. “assume” should also take advantage of this the same way. (generate a call to “pseudoabort” which<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">At some late stage gets deleted)</span></p></div></div></blockquote><div><br></div><div>This would fix precisely nothing, because of the above.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Sanjoy’s argument is faulty, if it were true we would also find our handling of “assert” to be unacceptable<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">but this is not the case, no one is arguing that we need to re-design “assert”.</span></p></div></div></blockquote><div><br></div><div>Asserts occur much more often than assumes, it may or may not be sensible to handle them the same way.</div><div>I would argue it is sensible, but it's also reasonable to argue it is not.</div><div>I would also argue our current way of propagating information for if-then conditions is in fact, quite crappy. Only a small number of passes know how to do it, and they do it either by ad-hoc analysis (GVN) or very expensive methods (LVI).<br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">And any argument you can make about needing to handle “assume” conditions in some special way can be<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Turned around and applied to “if-then” conditions, but again no one is arguing that we need to re-design “if-then”<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Information propagation.</span></p></div></div></blockquote><div>I would argue we do, in fact need to do that.</div><div><br></div><div>That said, it is a larger longer term change.</div><div><br></div><div>Fixing assume is a good start on that, and by fixing assume, we can prove out whether a new model will work well and expand it.</div><div>If we start by trying to fix the general propagation problem, that's a huge job to start, and if we get it wrong, a lot larger to fix.</div><div>Better to start small and go from there.</div><div><br></div></div></div></div>