[PATCH] D29047: Introduce a basic MemorySSA updater, that supports insertDef and insertUse operations.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 15:25:02 PST 2017


dberlin added inline comments.


================
Comment at: lib/Transforms/Utils/MemorySSA.cpp:2736
+      BBPlace = BB->getFirstNonPHI()->getIterator();
+    What->getMemoryInst()->moveBefore(*BB, BBPlace);
+  } else {
----------------
dberlin wrote:
> george.burgess.iv wrote:
> > Coming into this with no updater-related context outside of this patch, it's mildly surprising to me that MemorySSA's updater moves actual `Instruction`s around in BBs. It makes sense, but can we call that we do this out in the comments, please?
> We could make it not do that rather than take an iterator above?
> Then the user is responsible for ordering it relative to the def.
> 
i'm definitely going to do this because it simplifies life considerably.


https://reviews.llvm.org/D29047





More information about the llvm-commits mailing list