<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" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"></div></div></div></div></blockquote></div><div>Just to expand on one part:</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" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
Just to get what you are aiming for. Would a post-dominator tree of the<br class="gmail_msg">
form:<br class="gmail_msg">
<br class="gmail_msg">
[1]  <<exit node>><br class="gmail_msg">
  [2] %bb35<br class="gmail_msg">
    [3] %bb35.loopexit3<br class="gmail_msg">
    [3] %entry<br class="gmail_msg">
      [4] %bb3.i<br class="gmail_msg">
<br class="gmail_msg">
be something you would be happy with? </blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">No.</div><div class="gmail_msg">Because i do not believe  it is not correct in any arguable sense :)</div><div class="gmail_msg">It implies that bb35 post-dominates bb3.i, but it does not.</div><div class="gmail_msg">In fact, *zero* paths from bb3.i to program exit go through bb35, </div><div class="gmail_msg">Your argument seems to be  is "bb3.i doesn't exit so it doesn't matter".  But the fact that it's not a child of the virtual exit implies such a path *does exist*.</div></div></div></div></blockquote></div><div><br></div><div>To expand on this, in order for x to be a parent of y in the Dom/pdom tree, there must be a path (in the walk direction) from x to y.  This is a guaranteed property of Dom tree (in fact, it's a defining property)  See <a href="https://arxiv.org/pdf/1604.02711">https://arxiv.org/pdf/1604.02711</a> lemma 2.1 and theorem 2.2. As mentioned, algorithms depend on this for correctness</div><div> Your suggestion breaks this. The only way to guarantee this invariant if you include infinite loops and  noreturn functions is to connect them to a virtual exit.  </div><div>(Yes, I'm aware it mentions reachable paths, but unless you want to argue even further that any path not exiting should be not in the pdt, it is definitely virtually reachable.</div><div><br></div><div>If we avoid paths not exiting in the pdt, we will not be able to correctly determine control dependence or legal sink points. The answers we get will simply be wrong because they will assume any infinite loop has no effect, as I demonstrated in the review.  This is not a thing we should do by default, as it makes the tree useless for every case other than yours)</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div>