[PATCH] D8688: Update MergedLoadStoreMotion to use MemorySSA

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 08:41:17 PDT 2016

dberlin added inline comments.

Comment at: lib/Transforms/Scalar/MergedLoadStoreMotion.cpp:769
@@ +768,3 @@
+    auto CurrIter = AI;
+    ++AI;
+    const MemoryUse *MU = dyn_cast<MemoryUse>(&*CurrIter);
dberlin wrote:
> mcrosier wrote:
> > Any reason we don't just increment in the for statement itself?
> Fixed. Originally, the updater was modifying the accesslist we were walking on and invalidating the iterator.
> It turns out to be non-trivial to change this, but i never moved this loop back to account for this.
Actually, it can't be done, we still invalidate the current iterator for loads.
I'll document this.


More information about the llvm-commits mailing list