[Mlir-commits] [mlir] [mlir][bufferization]-Refactor findValueInReverseUseDefChain to accept opOperand (PR #121304)
Amir Bishara
llvmlistbot at llvm.org
Mon Dec 30 11:00:24 PST 2024
================
@@ -464,20 +469,22 @@ static void annotateConflict(OpOperand *uRead, OpOperand *uConflictingWrite,
/// indexing. I.e., the tensor types do not change along the use-def chain,
/// apart from static <-> dynamic dim casts.
static bool hasEquivalentValueInReverseUseDefChain(AnalysisState &state,
- Value start, Value other) {
+ OpOperand *start,
+ OpOperand *other) {
TraversalConfig config;
config.followEquivalentOnly = true;
config.alwaysIncludeLeaves = false;
config.followSameTypeOrCastsOnly = true;
return !state
.findValueInReverseUseDefChain(
- start, [&](Value v) { return v == other; }, config)
+ start, [&](Value v) { return v == other->get(); }, config)
.empty();
}
-/// Return "true" if `value` is originating from a subset that is equivalent to
-/// the subset that `subsetOp` inserts into.
-static bool matchesInsertDestination(const AnalysisState &state, Value value,
+/// Return "true" if `opOperand` is originating from a subset that is equivalent
----------------
amirBish wrote:
Nice, fixed.
https://github.com/llvm/llvm-project/pull/121304
More information about the Mlir-commits
mailing list