[PATCH] D21613: [DSE] Avoid iterator invalidation bugs.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 5 10:46:01 PDT 2016


eli.friedman added a comment.

Sorry about the delay; I thought I had sent review comments, but apparently they were saved/unsent.


================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:822
@@ -814,3 +821,3 @@
     if (CallInst *F = isFreeCall(Inst, TLI)) {
       MadeChange |= handleFree(F, AA, MD, DT, TLI);
       continue;
----------------
BBI doesn't point at the free instruction here.

================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:912
@@ +911,3 @@
+          // deleteDeadInstruction can delete the current instruction.
+          WeakVH TryAgain(Inst);
+
----------------
I don't follow how Inst could ever be killed by deleteDeadInstruction... an instruction which writes to memory can't be trivially dead.


http://reviews.llvm.org/D21613





More information about the llvm-commits mailing list