[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:35:13 PDT 2017
dberlin added inline comments.
================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:1076
+ Value *Prev = Ops[0];
+ bool InsertToI = Prev->getNumUses() > 1;
+ for (unsigned i = 1; i < Ops.size(); i++) {
----------------
Please use !hasOneUse (we already know they are not empty, right?)
It's a lot faster.
https://reviews.llvm.org/D32563
More information about the llvm-commits
mailing list