[PATCH] D74330: [mlir][AffineOps] Adds affine loop fusion transformation function to LoopFusionUtils.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 22:37:25 PST 2020


rriddle added inline comments.


================
Comment at: mlir/lib/Transforms/Utils/LoopFusionUtils.cpp:274
+  // Promote any single iteration slice loops.
+  for (auto forOp : sliceLoops)
+    promoteIfSingleIteration(forOp);
----------------
nit: Spell out auto here. 


================
Comment at: mlir/test/lib/Transforms/TestLoopFusion.cpp:194
+    bool changed = true;
+    while (changed) {
+      depthToLoops.clear();
----------------
do {

} while (iterateLoops(...)); ?


================
Comment at: mlir/test/lib/Transforms/TestLoopFusion.cpp:208
+  // Gather all AffineForOps by loop depth.
+  for (auto &block : getFunction()) {
+    gatherLoops(&block, /*currLoopDepth=*/0, depthToLoops);
----------------
nit: Spell out auto here.


================
Comment at: mlir/test/lib/Transforms/TestLoopFusion.cpp:209
+  for (auto &block : getFunction()) {
+    gatherLoops(&block, /*currLoopDepth=*/0, depthToLoops);
+  }
----------------
Drop trivial braces.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74330





More information about the llvm-commits mailing list