[PATCH] D32563: Improve code placement algorithm in Reassociate pass.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 13:26:59 PDT 2017


efriedma added inline comments.


================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:1697
+                       return DT.dominates(ia, ib);
+                     });
     Value *V = EmitAddTreeOfValues(I, NewMulOps);
----------------
dominates() isn't a strict weak ordering in general.  But maybe you don't actually hit those cases because of the way NewMulOps is constructed?  In any case, needs a explanation.

Also, this could be kind of slow: dominates() will iterate over the basic block if ia and ib have the same parent.


https://reviews.llvm.org/D32563





More information about the llvm-commits mailing list