[PATCH] D80133: [mlir] Toy tutorial: insert terminators at the end of the loop during rewrite

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 07:36:20 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa655144f57f8: [mlir] Toy tutorial: insert terminators at the end of the loop during rewrite (authored by ftynse).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80133

Files:
  mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
  mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp


Index: mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
===================================================================
--- mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
+++ mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
@@ -73,7 +73,7 @@
       loopIvs.push_back(loop.getInductionVar());
 
       // Terminate the loop body.
-      rewriter.setInsertionPointToStart(loop.getBody());
+      rewriter.setInsertionPointToEnd(loop.getBody());
 
       // Insert a newline after each of the inner dimensions of the shape.
       if (i != e - 1)
Index: mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
===================================================================
--- mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
+++ mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
@@ -73,7 +73,7 @@
       loopIvs.push_back(loop.getInductionVar());
 
       // Terminate the loop body.
-      rewriter.setInsertionPointToStart(loop.getBody());
+      rewriter.setInsertionPointToEnd(loop.getBody());
 
       // Insert a newline after each of the inner dimensions of the shape.
       if (i != e - 1)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80133.265240.patch
Type: text/x-patch
Size: 1064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200520/7db8d217/attachment.bin>


More information about the llvm-commits mailing list