[PATCH] D13220: Optimize DeadCodeEliminationPass
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 10:42:12 PDT 2015
reames added inline comments.
================
Comment at: lib/Transforms/Scalar/DCE.cpp:102
@@ +101,3 @@
+ // dead as we go.
+ for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
+ Value *OpV = I->getOperand(i);
----------------
escha wrote:
> sanjoy wrote:
> > I think this can be a range for loop, like
> >
> > ```
> > for (Use &Op : I->uses()) {
> > ...
> > ```
> Is this a good idea? It feels iterating over the operands is a bit iffy given that we're modifying the operand list as we go.
I'd agree.
Repository:
rL LLVM
http://reviews.llvm.org/D13220
More information about the llvm-commits
mailing list