[Mlir-commits] [mlir] [MLIR][DLTI] Introduce DLTIQueryInterface and impl for DLTI attrs (PR #104595)
Rolf Morel
llvmlistbot at llvm.org
Sun Aug 18 05:42:54 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);
----------------
rolfmorel wrote:
The commit I added today makes the `getClosestQueryable` method/function private.
The two functions I removed - `getDataLayoutSpec` and `getTargetSystemSpec` - are the two I introduced in https://github.com/llvm/llvm-project/pull/101561 so that `transform.dlti.query` could use them to implement the query logic. As that logic has now moved into `dlti::query()` and `transform.dlti.query` makes use of that function directly, there are no more users of these (very recently introduced) public methods/functions.
That is, there is no risk of breaking downstream users as they would have needed to start using these public methods in the last week or so.
https://github.com/llvm/llvm-project/pull/104595
More information about the Mlir-commits
mailing list