<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 30, 2016 at 7:28 PM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I tend to agree with Hal -- value numbering computes equivalent *values*,</div></div></blockquote></span><div>Sorry, but this is just flat out wrong</div><div><br></div><div>"A Global Value Numbering(GVN) algorithm is considered to be complete (or precise), if it can detect all Herbrand equivalences among expressions in a program.</div><div>Two expressions are said to be Herbrand equivalent (or transparent equivalent ), if they are computed by the same operator applied to equivalent operands "</div><div><br></div><div>This is, AFAIK, precisely what you want.<br></div><div><br></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">I'm not entirely happy with this definition (IMHO, it's overly restrictive), but this in irrelevant.</div><div class="gmail_extra"><br></div><div class="gmail_extra">What relevant is what one considers to be "equivalent operands". Take my example again -- for outlining (Jessica's name) / code folding (your name) optimization reads of "a" and "b" globals are equivalent; for VN and its users they are not.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Yours,</div><div class="gmail_extra">Andrey</div><div class="gmail_extra"><br></div></div>