<div dir="ltr">If we think dominates is necessary, go for it.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 6:19 PM, George Burgess IV <span dir="ltr"><<a href="mailto:george.burgess.iv@gmail.com" target="_blank">george.burgess.iv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">george.burgess.iv marked an inline comment as done.<br>
<span class=""><br>
================<br>
Comment at: lib/Transforms/Utils/MemorySSA.cpp:551<br>
@@ -550,3 +605,1 @@<br>
-}<br>
-<br>
 /// \brief Returns true if \p Replacer dominates \p Replacee .<br>
----------------<br>
</span><span class="">dberlin wrote:<br>
> I see you removed this - this is a utility being used as part of updating for another pass i haven't submitted yet.<br>
><br>
><br>
</span>Sounds good; will unremove. Thanks for the heads up.<br>
<span class=""><br>
================<br>
Comment at: lib/Transforms/Utils/MemorySSA.cpp:856<br>
@@ -805,1 +855,3 @@<br>
+  // A node dominates itself, and liveOnEntry dominates everything.<br>
+  if (Dominatee == Dominator || isLiveOnEntryDef(Dominator))<br>
     return true;<br>
----------------<br>
</span><span class="">dberlin wrote:<br>
> This makes no sense unless the block we are talking about is the entry block.<br>
> Otherwise, how are they in the same block?<br>
><br>
> (if it is the entry block, the loop below will give the correct answer, no?)<br>
</span>This is just a refactor of the old (and the new changes `locallyDominates` to `dominates`, since the only user of `locallyDominates` that I could find was the current walker, so we'd probably readd `isLiveOnEntryDef(Dominator)` anyway, since it could save domtree stuff.).<br>
<br>
If we don't want to kill `locallyDominates`, I'm happy to remove this, because yes, the below loop should catch this case.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D21776" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21776</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>