[Mlir-commits] [mlir] [SCF] Set Insertion point after the root op when tiling using scf.for_all (PR #76874)

Nirvedh Meshram llvmlistbot at llvm.org
Wed Jan 3 14:53:54 PST 2024


https://github.com/nirvedhmeshram updated https://github.com/llvm/llvm-project/pull/76874

>From 9bb41cbb4dba6eafd343a318bb825e4732c0b42a Mon Sep 17 00:00:00 2001
From: Nirvedh Meshram <nmeshram at amd.com>
Date: Wed, 3 Jan 2024 22:42:38 +0000
Subject: [PATCH] [SCF] Set Insertion point after the root op when tiling using
 scf.for_all

This is consistent with that is done for tiling with scf.for

Co-authored-by: Abhishek Varma <abhvarma at amd.com>
---
 mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp b/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
index 1b6b4db9d20907..da83ddc8e5b6f8 100644
--- a/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
@@ -804,6 +804,7 @@ mlir::scf::tileUsingSCFForallOp(RewriterBase &rewriter, TilingInterface op,
                                 const scf::SCFTilingOptions &options) {
   Location loc = op->getLoc();
   OpBuilder::InsertionGuard g(rewriter);
+  rewriter.setInsertionPointAfter(op);
 
   // 1. Get the range of loops that are represented by the operation.
   SmallVector<Range> loopRanges = op.getIterationDomain(rewriter);



More information about the Mlir-commits mailing list