[Mlir-commits] [mlir] [MLIR][DLTI] Introduce DLTIQueryInterface and impl for DLTI attrs (PR #104595)
Renato Golin
llvmlistbot at llvm.org
Fri Aug 16 09:54:19 PDT 2024
================
@@ -33,6 +33,17 @@ DataLayoutSpecInterface getDataLayoutSpec(Operation *op);
/// DataLayoutOpInterface, a method on ModuleOp, or an attribute implementing
/// the interface, on `op` and else on `op`'s ancestors in turn.
TargetSystemSpecInterface getTargetSystemSpec(Operation *op);
+
+/// Retrieve the first `DLTIQueryInterface`-implementing attribute that is
+/// attached to `op` or such an attr on as close as possible an ancestor. The
+/// op the attribute is attached to is returned as well.
+std::pair<DLTIQueryInterface, Operation *> getClosestQueryable(Operation *op);
----------------
rengolin wrote:
If the `query` method is already recursive, why do we need this to be a public method?
In other words, what are the patterns that a downstream implementation may have that will need this - that is not just overriding the `query` method?
https://github.com/llvm/llvm-project/pull/104595
More information about the Mlir-commits
mailing list