<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 15, 2016 at 4:27 PM, Andrew Trick <span dir="ltr"><<a href="mailto:atrick@apple.com" target="_blank">atrick@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Jul 15, 2016, at 4:21 PM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>> wrote:</div><br><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>Doing a CFG walk instead of a PostDom walk is typically not such a big deal.</div></div></div></blockquote><div><br></div><div>Using post-dom to approximate classical control dependence, as we do in several places, has led to a mess nobody quite understands in those places.</div><div> </div><div>But, like i said, i have a plan to fix this by making post-dom updates automatic. There are now incremental dominance update algorithms that are very fast in the common case (IE 100x faster than computing from scratch) and even in the very pathological cases, 2x faster than computing from scratch.  This comes out to "fast enough" to maintain postdom without anyone having to think about anything other than saying "i added an edge" or "i deleted an edge”.</div></div></blockquote><div><br></div></span>Ok, I do love incremental domtree update. It’s just that for postdom you have to be aware of addition/removal of maythrow sort of calls.</div></div></blockquote><div><br></div><div>These create block edges in the post-dom tree, even now (or at least, they have to for correctness).  They still will be then.  So it'll just be an edge add/removal  in the actual tree ;) </div><div>From an API standpoint, the only thing an API would actually care about for this is the block they were added/removed from, and the count of such calls before add/removal (If there are any, you need an edge, if there are none, you don't).</div><div><br></div><div>So as long as things changing these types of calls (or erasing/duplicating them) notify postdom, it'll still work just fine.</div><div><br></div><div>That seems doable.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div><br><blockquote type="cite"><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">I often overload the term “control dependence” here. When I say a load is control dependent on a branch, I don’t mean that the load’s block is classically control dependent on the branch, I mean that the load is illegal to speculate above the branch. Yes they are two different things, but I don’t have a better term to use for that dependence information.</div></div></blockquote></div></blockquote><br></div></span><div>I still don’t know how to talk about a load’s dependencies without calling it “control dependence”</div></div></blockquote><div><br></div><div>Yeah, i'm working on it :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>-Andy</div></div></blockquote></div><br></div></div>