[PATCH] D8688: Update MergedLoadStoreMotion to use MemorySSA

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 09:38:40 PDT 2016


dberlin added a comment.

Any other comments?
If not, because it's off by default (and it looked like there are no real objections), my plan was to commit it.


================
Comment at: lib/Transforms/Scalar/MergedLoadStoreMotion.cpp:761
@@ +760,3 @@
+    LoadInfo.insert({Load0, CachingWalker->getClobberingMemoryAccess(Load0)});
+    ++NLoads;
+    if (NLoads * Size1 >= MagicCompileTimeControl)
----------------
mcrosier wrote:
> Sorry if I wasn't clear.  I was suggesting we remove the pre-increment above and do it in the if statement.
> 
>   ++NLoads;
>   if (NLoads * Size1 ...)
> 
> vs
> 
>   if (++NLoads * Size1 ...)
> 
Oh, sorry. I copied this code from the non-memoryssa version.
(In truth, the code can stand a lot of cleaning up, improvement, and reducing of restrictions)


http://reviews.llvm.org/D8688





More information about the llvm-commits mailing list