[PATCH] D21613: [DSE] Avoid iterator invalidation bugs by deferring deletion.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 11:46:57 PDT 2016
mcrosier added a comment.
In http://reviews.llvm.org/D21613#466632, @eli.friedman wrote:
> " can you please explain why the phi nodes must stick around (at least in the short term)? I don't follow.."
>
> Err, the PHI nodes don't need to stick around; you just need to make sure you don't delete the instruction the iterator is pointing at, and the operand of a phi node could be that instruction. There are other ways around the issue, I guess... you could even pass a pointer to the iterator to deleteDeadInstruction and make it update the iterator, I guess, instead of postponing deleting it.
Okay, my understanding of the problem appears to be the same as yours; I must have just misinterpreted one of your earlier comments.
http://reviews.llvm.org/D21613
More information about the llvm-commits
mailing list