<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://1214/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The problem is that you are trying to bring front-end mechanisms into the backend.<div><div>If you want to perform optimizations in your backend they should be standalone and independent of the front end.</div><div>For example, the llvm backend can perform a whole bunch of optimizations in its own IR.</div><div>TInt is a service provided by m3middle to the front-end.</div><div>Feel free to add whatever you like to your backend. I just don’t want to see unnecessary stuff introduced into m3middle.</div><div><br><div><div>On Oct 25, 2012, at 4:12 AM, Jay K <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr"><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">When faced with</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">VAR a := FIRST(INTEGER) + 1;</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">VAR b := LAST(INTEGER) + 1;</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">VAR c := LAST(INTEGER) + 1 - 1;</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">VAR d := (a > 0);</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">I would like backends to optimize initialization a,</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">not optimize initialization of b,</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">and probably not optimize initialization of c,</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">and hopefully optimize initialization of d, but that is more</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">difficult in the C backend.</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">Fold constants when it is obviously safe.</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">Do not fold constants when there is a chance of overflow -- even</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">at intermediate points of the expression.</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">This is why I believe TIntN is useful.</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">I bring this up because I'm about to add constant folding to M3C.m3.</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">And to introduce use of TIntN.</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">Which Tony has insisted is wrong, i.e. use in M3x86.m3.</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"><br></font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif">Thanks,</font></div><div style="font-family: Times; font-size: medium; "><font face="Calibri, sans-serif"> - Jay</font></div></div></div></blockquote></div><br></div></div></body></html>