[PATCH] D40375: Use MemorySSA in LICM to do sinking and hoisting.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 16:41:46 PST 2018


asbirlea marked an inline comment as done.
asbirlea added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:1159
+      if (EnableLicmCap)
+        MSSA->getWalker()->getClobberingMemoryAccess(OldMemAcc);
+    }
----------------
sanjoy wrote:
> sanjoy wrote:
> > I not convinced this is a good idea -- it looks like we're coding to the implementation of `getClobberingMemoryAccess` here instead of coding to its interface.  But if @george.burgess.iv is fine with it, I am too.
> It looks like `MemorySSA::CachingWalker::getClobberingMemoryAccess` has an early exit if `OldMemAcc` was optimized.  Are we okay not updating the defining access in that case?
If it's been optimized, then the defining access should have been updated, and viceversa.
@george.burgess.iv: Could you clarify this please? I don't see resetOptimized being called on any path for the call chain starting with moreToPlace->insertDef, though it would make sense for this to happen. Am I missing something here?


Repository:
  rL LLVM

https://reviews.llvm.org/D40375





More information about the llvm-commits mailing list