[Mlir-commits] [mlir] [MLIR][Transform][Python] Wrapper for transform.foreach (PR #171544)
Rolf Morel
llvmlistbot at llvm.org
Wed Dec 10 05:05:17 PST 2025
================
@@ -14,8 +14,10 @@
def _is_constant_int_like(i):
return (
isinstance(i, Value)
- and isinstance(i.owner, Operation)
- and isinstance(i.owner.opview, ConstantOp)
+ and (
+ (isinstance(i.owner, Operation) and isinstance(i.owner.opview, ConstantOp))
----------------
rolfmorel wrote:
The op returned by `Value` is still `Operation`: https://github.com/llvm/llvm-project/blob/5160a05b0e9f4c0d1df0ac8da41c6090955777cb/mlir/lib/Bindings/Python/IRCore.cpp#L4649
All others IR objects which return an op for `.owner` return an OpView. I will change `Value.owner` to also return an OpView.
I do have a question regarding this though: what is it that happens when there's no (registered) OpView for an operation('s name)? It appears some OpView instance is still constructed.
https://github.com/llvm/llvm-project/pull/171544
More information about the Mlir-commits
mailing list