summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Bufferization/TransformOps
diff options
context:
space:
mode:
authordonald chen <chenxunyu1993@gmail.com>2024-06-19 22:10:34 +0800
committerGitHub <noreply@github.com>2024-06-19 22:10:34 +0800
commit2c1ae801e1b66a09a15028ae4ba614e0911eec00 (patch)
treef429333b08bb9f42c901553ab3fac897f24bbaa5 /mlir/lib/Dialect/Bufferization/TransformOps
parente5b0c210cc4cdaae7075ad2d4aa1efe4eb4cb0c5 (diff)
[mlir][side effect] refactor(*): Include more precise side effects (#94213)
This patch adds more precise side effects to the current ops with memory effects, allowing us to determine which OpOperand/OpResult/BlockArgument the operation reads or writes, rather than just recording the reading and writing of values. This allows for convenient use of precise side effects to achieve analysis and optimization. Related discussions: https://discourse.llvm.org/t/rfc-add-operandindex-to-sideeffect-instance/79243
Diffstat (limited to 'mlir/lib/Dialect/Bufferization/TransformOps')
-rw-r--r--mlir/lib/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp b/mlir/lib/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp
index cbb36639a338..e10c7bd914e3 100644
--- a/mlir/lib/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp
+++ b/mlir/lib/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp
@@ -36,7 +36,7 @@ DiagnosedSilenceableFailure transform::BufferLoopHoistingOp::applyToOne(
void transform::BufferLoopHoistingOp::getEffects(
SmallVectorImpl<MemoryEffects::EffectInstance> &effects) {
- onlyReadsHandle(getTarget(), effects);
+ onlyReadsHandle(getTargetMutable(), effects);
modifiesPayload(effects);
}
@@ -110,7 +110,7 @@ transform::OneShotBufferizeOp::apply(transform::TransformRewriter &rewriter,
void transform::EliminateEmptyTensorsOp::getEffects(
SmallVectorImpl<MemoryEffects::EffectInstance> &effects) {
- onlyReadsHandle(getTarget(), effects);
+ onlyReadsHandle(getTargetMutable(), effects);
modifiesPayload(effects);
}