[PATCH] D92974: [OpenMPIRBuilder] Implement tileLoops.

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 09:08:57 PST 2020


ftynse added inline comments.


================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:302
+  ///
+  /// Tiles the loops of \p CL by the tile sizes in \p Sizes. Loops in \p Loops
+  /// must be perfectly nested, from outermost to innermost loop (i.e.
----------------
Nit: I don't see `CL` and `Sizes` in the argument list


================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:318
+  ///   for (int i1 = 0; i1 < 3; ++i1)
+  ///     for (int j1 = 0; j1 < 2; ++j)
+  ///       for (int i2 = 0; i2 < 5; ++i2)
----------------



================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:323
+  /// \endcode
+  ///
+  /// The returned vector are the loops {i1,j1,i2,j2}. The loops i1 and j1 are
----------------
What happens when tile sizes don't divide loop sizes perfectly?


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:1234
+  // body, these BasicBlocks will be sunk into the loop nest body. That is,
+  // these instructions may be executed more often than before the tiling.
+  // TODO: It would be sufficient to only sink them into body of the
----------------
What happens if they have side effects?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92974



More information about the llvm-commits mailing list