[PATCH] D32563: Improve code placement algorithm in Reassociate pass.
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 14:36:25 PDT 2017
dberlin added inline comments.
================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:1697
+ return DT.dominates(ia, ib);
+ });
Value *V = EmitAddTreeOfValues(I, NewMulOps);
----------------
efriedma wrote:
> 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.
You should use the global and local dominance dfs numbers to do this
https://reviews.llvm.org/D32563
More information about the llvm-commits
mailing list