[Mlir-commits] [mlir] [MLIR][Python] Impl XOpInterface(s) from Python, with X=Transform and X=MemoryEffects (PR #176920)

Rolf Morel llvmlistbot at llvm.org
Wed Jan 28 05:24:57 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";
----------------
rolfmorel wrote:

The issue is that `PyOpOperandList` is an iterator of the operands as `Value`s. 

I chose this name due to this naming conflict and to keep to the convention here of `PyOp` prefixes. As we are really returning `Py`thon version of `OpOperand`s on an `Op` here, the name seems okay-ish (though definitely not great).

https://github.com/llvm/llvm-project/pull/176920


More information about the Mlir-commits mailing list