<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 9, 2016, at 11:44 AM, Friedman, Eli <<a href="mailto:efriedma@codeaurora.org" class="">efriedma@codeaurora.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="Singleton"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><br class="">After solving is finished, anything left as undef can then be filled in<br class="">unconstrained, because you are guaranteed it is not forced to a certain<br class="">value (or that your solver sucks :P)<br class=""><br class="">(note that in the freeze/poison proposal, this should just work because the<br class="">freezes will be different ssa names)<br class=""><br class=""></blockquote>Uh, thanks. Out of curiosity, do you happen to know why undef wasn't<br class="">represented as a lattice value from the beginning (and instead we end<br class="">up trying values that match up?) Is there a particular reason (e.g.<br class="">efficiency)? I can't think of one.<br class="">--<br class=""></blockquote><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;" class="">This is very old code; see r17044, r18776 and r32715.  I doubt Chris remembers the details (but CC'ing him in case he does).  I haven't really considered it before, but as far as I know, there isn't any particular reason we can't treat undef like a constant rather than "unknown".  Constant folding knows how to fold operations involving undef correctly.  You probably need to special-case branches and PHI nodes with undef operands.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;" class=""></div></div></blockquote></div><br class=""><div class="">Eli is right, the SCCP lattice predated undef being part of IR.</div><div class=""><br class=""></div><div class="">-Chris</div></body></html>