[Mlir-commits] [mlir] [MLIR][Python] Impl XOpInterface(s) from Python, with X=Transform and X=MemoryEffects (PR #176920)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Feb 3 01:01:27 PST 2026
================
@@ -2306,6 +2298,44 @@ PyOpOperandList PyOpOperandList::slice(intptr_t startIndex, intptr_t length,
return PyOpOperandList(operation, startIndex, length, step);
}
+/// A list of OpOperands. Internally, these are stored as consecutive elements,
+/// random access is cheap. The (returned) OpOperand list is associated with the
+/// operation whose operands these are, and thus extends the lifetime of this
+/// operation.
+class PyOpOpOperandList : public Sliceable<PyOpOpOperandList, PyOpOperand> {
+public:
+ static constexpr const char *pyClassName = "OpOpOperandList";
----------------
PragmaTwice wrote:
yah i'm fine to introduce this type / functionality, just not a fan of this name.
> I would not object to introducing something named OpOpOpOperand in the Python codebase if this mirrored an OpOpOperand in the C++ codebase.
yah but we don't have `OpOpOperand` in C++ side, right?
> Also to the brilliantly named OperandRangeRange
TBH `OperandRangeRange` is easier to understand for me than this name. You can know that it's a range of a OperandRange. But for `OpOpOperand` you cannot treat it as "an Op of OpOperand".
I'm ok with this name if we cannot find a better name. Maybe we can ask other reviewers for their suggestions?
https://github.com/llvm/llvm-project/pull/176920
More information about the Mlir-commits
mailing list