[PATCH] D41943: [LoopDeletion] Handle users in unreachable block
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 04:22:43 PST 2018
lebedev.ri added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:1370
+ auto *Undef = UndefValue::get(I.getType());
+ for (Value::use_iterator UI = I.use_begin(), E = I.use_end(); UI != E;) {
+ Use &U = *UI;
----------------
skatkov wrote:
> lebedev.ri wrote:
> > I think this can be simplified down to
> > ```
> > for (Use &U : I.uses())
> > ```
> I'm not sure I can do it due to I modify Use in a loop.
> I implemented it in this way to be similar to how Value::replace** routines do it.
So if it is an invalid simplification, either this won't compile, or the testcase will fail, right?
https://reviews.llvm.org/D41943
More information about the llvm-commits
mailing list