<span style="font-size:13px">On Fri, Aug 19, 2016, 14:47 Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>> wrote:</span><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dberlin added a subscriber: dberlin.<br>
<br>
================<br>
Comment at: lib/Transforms/Scalar/NaryReassociate.cpp:212<br>
@@ -211,3 +211,3 @@<br>
   // ensures that all bases of a candidate are in Candidates when we process it.<br>
   for (auto Node = GraphTraits<DominatorTree *>::nodes_begin(DT);<br>
        Node != GraphTraits<DominatorTree *>::nodes_end(DT); ++Node) {<br>
----------------<br>
This is actually not preorder :)<br>
It's depth first.<br>
<br>
and could be replaced with the depth first iterator<br>
<br>
<br>
================<br>
Comment at: lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:1155<br>
@@ -1154,3 +1154,3 @@<br>
        Node != GraphTraits<DominatorTree *>::nodes_end(DT); ++Node) {<br>
-    BasicBlock *BB = Node->getBlock();<br>
+    BasicBlock *BB = (*Node)->getBlock();<br>
     for (auto I = BB->begin(); I != BB->end(); ) {<br>
----------------<br>
Ditto, this is just depth_first, and should use that.<br>
<br>
<br>
================<br>
Comment at: lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:680<br>
@@ -680,2 +679,3 @@<br>
+    for (auto &I : *(*node)->getBlock())<br>
       allocateCandidatesAndFindBasis(&I);<br>
   }<br>
----------------<br>
This whole glop is just a fancy way of saying:<br>
<br>
 for (const auto *Node : depth_first(DT)) { allocateCandidatesAndFindBasis(I->getBlock()); }<br>
<br>
I'll fix it if you don't :)<br></blockquote></div><div><br></div><div>Sorry, I missed your email earlier :P</div><div><br></div><div>Thanks for the fix (and partial revert)!</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">
<br>
<br>
<br>
<a href="https://reviews.llvm.org/D23704" rel="noreferrer" target="_blank">https://reviews.llvm.org/D23704</a><br>
<br>
<br>
<br>
</blockquote></div>