[Mlir-commits] [mlir] fc64a16 - [mlir] Use rewriter in linalg Detensorize
Tres Popp
llvmlistbot at llvm.org
Wed Dec 15 02:28:26 PST 2021
Author: Tres Popp
Date: 2021-12-15T11:28:18+01:00
New Revision: fc64a164ec5830cb668008d2e3c62e422a07dfae
URL: https://github.com/llvm/llvm-project/commit/fc64a164ec5830cb668008d2e3c62e422a07dfae
DIFF: https://github.com/llvm/llvm-project/commit/fc64a164ec5830cb668008d2e3c62e422a07dfae.diff
LOG: [mlir] Use rewriter in linalg Detensorize
This is to allow rollbacks on failures of dialect lowering to succeed.
Differential Revision: https://reviews.llvm.org/D115789
Added:
Modified:
mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp b/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
index 276d4b728017..0257014bfbcd 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
@@ -73,7 +73,7 @@ class DetensorizeGenericOp : public OpConversionPattern<GenericOp> {
// Split the op's region before the op. This way, we have a clear insertion
// point in which the op can be inlined.
- Block *newBlock = originalBlock->splitBlock(op);
+ Block *newBlock = rewriter.splitBlock(originalBlock, Block::iterator(op));
rewriter.inlineRegionBefore(op.region(), newBlock);
// Now that op's region is inlined, the operands of its YieldOp are mapped
// to the materialized target values. Therefore, we can replace the op's
More information about the Mlir-commits
mailing list