[Mlir-commits] [mlir] 195d857 - [mlir] post-commit review fixes

Alex Zinenko llvmlistbot at llvm.org
Tue Jun 2 03:08:25 PDT 2020


Author: Alex Zinenko
Date: 2020-06-02T12:08:17+02:00
New Revision: 195d8571b9e296e7894d51cf59b7aeed42eaa2d2

URL: https://github.com/llvm/llvm-project/commit/195d8571b9e296e7894d51cf59b7aeed42eaa2d2
DIFF: https://github.com/llvm/llvm-project/commit/195d8571b9e296e7894d51cf59b7aeed42eaa2d2.diff

LOG: [mlir] post-commit review fixes

This fixes several post-commit nits from D79688 and D80135, namely
typos, debug output and control flow inversion.

Added: 
    

Modified: 
    mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp
    mlir/lib/Dialect/SCF/SCF.cpp
    mlir/lib/Transforms/DialectConversion.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp b/mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp
index d99105e04684..c47b87138e2d 100644
--- a/mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp
@@ -85,7 +85,6 @@ static void insertCopyLoops(OpBuilder &builder, Location loc,
     StdIndexedValue fromHandle(from), toHandle(to);
     toHandle(activeIvs) = fromHandle(activeIvs);
   });
-  ivs[0].getParentBlock()->dump();
 
   // Map the innermost loops to threads in reverse order.
   for (auto en :

diff  --git a/mlir/lib/Dialect/SCF/SCF.cpp b/mlir/lib/Dialect/SCF/SCF.cpp
index e7c890c17841..58edd9218098 100644
--- a/mlir/lib/Dialect/SCF/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/SCF.cpp
@@ -288,7 +288,7 @@ ValueVector mlir::scf::buildLoopNest(
           currentLoc = nestedLoc;
         });
     // Set the builder to point to the body of the newly created loop. We don't
-    // do this in the callback beacause the builder is reset when the callback
+    // do this in the callback because the builder is reset when the callback
     // returns.
     builder.setInsertionPointToStart(loop.getBody());
     loops.push_back(loop);

diff  --git a/mlir/lib/Transforms/DialectConversion.cpp b/mlir/lib/Transforms/DialectConversion.cpp
index 871252e65e5d..0e2bf03f9639 100644
--- a/mlir/lib/Transforms/DialectConversion.cpp
+++ b/mlir/lib/Transforms/DialectConversion.cpp
@@ -722,11 +722,9 @@ void ConversionPatternRewriterImpl::resetState(RewriterState state) {
 }
 
 void ConversionPatternRewriterImpl::eraseDanglingBlocks() {
-  for (auto &action : blockActions) {
-    if (action.kind != BlockActionKind::Erase)
-      continue;
-    delete action.block;
-  }
+  for (auto &action : blockActions)
+    if (action.kind == BlockActionKind::Erase)
+      delete action.block;
 }
 
 void ConversionPatternRewriterImpl::undoBlockActions(


        


More information about the Mlir-commits mailing list