[PATCH] D76132: [LoopUnrollAndJam] Changed safety checks to consider more than 2-levels loop nest.

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 08:08:16 PDT 2020


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


================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp:760-761
+      SmallVector<Value *, 4> DstLoadsAndStores;
+      if (!getLoadsAndStores(*I, SrcLoadsAndStores) ||
+          !getLoadsAndStores(*J, DstLoadsAndStores))
+        return false;
----------------
Whitney wrote:
> dmgreen wrote:
> > This looks like it would recalculate LoadsAndStores a lot? Src and Dst don't seem like the right nomenclature too, but that's just a small nit.
> Renamed, and removed the calculation of one of the LoadsAndStores in the outer loop. I considered creating a map, but the code may get complicated. Is the current change okay with you, or you prefer a map?
Renamed, and moved the calculation of one of the LoadsAndStores in the outer loop. I considered creating a map, but the code may get complicated. Is the current change okay with you, or you prefer a map?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76132/new/

https://reviews.llvm.org/D76132





More information about the llvm-commits mailing list