[Mlir-commits] [mlir] 9dbffe4 - [mlir] Reorder shape assuming bufferization.
Tres Popp
llvmlistbot at llvm.org
Thu Oct 29 03:36:16 PDT 2020
Author: Tres Popp
Date: 2020-10-29T11:36:05+01:00
New Revision: 9dbffe4a28f46a9fd5dab36bf443a090588ac6de
URL: https://github.com/llvm/llvm-project/commit/9dbffe4a28f46a9fd5dab36bf443a090588ac6de
DIFF: https://github.com/llvm/llvm-project/commit/9dbffe4a28f46a9fd5dab36bf443a090588ac6de.diff
LOG: [mlir] Reorder shape assuming bufferization.
The previous ordering continued to use the original assuming after
replacing it which is not allowed. Now, inline the region from the old
into the new before the replacement.
Differential Revision: https://reviews.llvm.org/D90375
Added:
Modified:
mlir/lib/Dialect/Shape/Transforms/StructuralTypeConversions.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Shape/Transforms/StructuralTypeConversions.cpp b/mlir/lib/Dialect/Shape/Transforms/StructuralTypeConversions.cpp
index 61e862836a73..041b54b3bd14 100644
--- a/mlir/lib/Dialect/Shape/Transforms/StructuralTypeConversions.cpp
+++ b/mlir/lib/Dialect/Shape/Transforms/StructuralTypeConversions.cpp
@@ -32,10 +32,9 @@ class ConvertAssumingOpTypes : public OpConversionPattern<AssumingOp> {
auto newAssumingOp =
rewriter.create<AssumingOp>(op.getLoc(), newResultTypes, op.witness());
-
- rewriter.replaceOp(op, newAssumingOp.getResults());
rewriter.inlineRegionBefore(op.doRegion(), newAssumingOp.doRegion(),
newAssumingOp.doRegion().end());
+ rewriter.replaceOp(op, newAssumingOp.getResults());
return success();
}
More information about the Mlir-commits
mailing list