[Mlir-commits] [llvm] [mlir] Move InlinerInterface from Transforms to Interfaces. (PR #84878)

Christian Sigg llvmlistbot at llvm.org
Mon Mar 11 23:35:35 PDT 2024


https://github.com/chsigg created https://github.com/llvm/llvm-project/pull/84878

None

>From 3c33c20905558b325c0d81281dfc0e295d565f6f Mon Sep 17 00:00:00 2001
From: Christian Sigg <csigg at google.com>
Date: Tue, 12 Mar 2024 07:31:21 +0100
Subject: [PATCH] Move InlinerInterface from Transforms to Interfaces.

---
 .../mlir/Interfaces/InlinerInterface.h        | 221 ++++++++++++++++++
 mlir/include/mlir/Transforms/InliningUtils.h  | 205 +---------------
 mlir/lib/Dialect/Affine/IR/AffineOps.cpp      |   2 +-
 mlir/lib/Dialect/Affine/IR/CMakeLists.txt     |   1 +
 mlir/lib/Dialect/Arith/IR/ArithDialect.cpp    |   2 +-
 mlir/lib/Dialect/Arith/IR/CMakeLists.txt      |   1 +
 .../Bufferization/IR/BufferizationDialect.cpp |   2 +-
 .../Dialect/Bufferization/IR/CMakeLists.txt   |   1 +
 mlir/lib/Dialect/Complex/IR/CMakeLists.txt    |   1 +
 .../lib/Dialect/Complex/IR/ComplexDialect.cpp |   2 +-
 .../lib/Dialect/ControlFlow/IR/CMakeLists.txt |   1 +
 .../Dialect/ControlFlow/IR/ControlFlowOps.cpp |   2 +-
 .../Dialect/Func/Extensions/CMakeLists.txt    |   1 +
 .../Func/Extensions/InlinerExtension.cpp      |   2 +-
 mlir/lib/Dialect/Func/IR/CMakeLists.txt       |   1 +
 mlir/lib/Dialect/Func/IR/FuncOps.cpp          |   2 +-
 mlir/lib/Dialect/GPU/CMakeLists.txt           |   1 +
 mlir/lib/Dialect/GPU/IR/GPUDialect.cpp        |   2 +-
 mlir/lib/Dialect/LLVMIR/CMakeLists.txt        |   1 +
 mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp   |   2 +-
 mlir/lib/Dialect/Linalg/IR/CMakeLists.txt     |   1 +
 mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp  |   2 +-
 mlir/lib/Dialect/Math/IR/CMakeLists.txt       |   1 +
 mlir/lib/Dialect/Math/IR/MathDialect.cpp      |   2 +-
 mlir/lib/Dialect/MemRef/IR/CMakeLists.txt     |   1 +
 mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp  |   2 +-
 mlir/lib/Dialect/SCF/IR/CMakeLists.txt        |   1 +
 mlir/lib/Dialect/SCF/IR/SCF.cpp               |   2 +-
 mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt      |   1 +
 mlir/lib/Dialect/Shape/IR/CMakeLists.txt      |   1 +
 mlir/lib/Dialect/Shape/IR/Shape.cpp           |   2 +-
 mlir/lib/Dialect/Tensor/IR/CMakeLists.txt     |   3 +-
 mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp  |   2 +-
 mlir/lib/Dialect/UB/IR/CMakeLists.txt         |   1 +
 mlir/lib/Dialect/UB/IR/UBOps.cpp              |   4 +-
 mlir/lib/Dialect/Vector/IR/CMakeLists.txt     |   1 +
 mlir/lib/Dialect/Vector/IR/VectorOps.cpp      |   2 +-
 mlir/lib/Interfaces/CMakeLists.txt            |  11 +
 mlir/lib/Interfaces/InlinerInterface.cpp      |  91 ++++++++
 mlir/lib/Transforms/CMakeLists.txt            |   1 +
 mlir/lib/Transforms/Utils/CMakeLists.txt      |   1 +
 mlir/lib/Transforms/Utils/InliningUtils.cpp   |  73 ------
 mlir/test/lib/Dialect/Test/TestDialect.cpp    |   2 +-
 .../Dialect/Test/TestDialectInterfaces.cpp    |   2 +-
 .../llvm-project-overlay/mlir/BUILD.bazel     |  42 +++-
 .../mlir/test/BUILD.bazel                     |  24 +-
 46 files changed, 409 insertions(+), 320 deletions(-)
 create mode 100644 mlir/include/mlir/Interfaces/InlinerInterface.h
 create mode 100644 mlir/lib/Interfaces/InlinerInterface.cpp

diff --git a/mlir/include/mlir/Interfaces/InlinerInterface.h b/mlir/include/mlir/Interfaces/InlinerInterface.h
new file mode 100644
index 00000000000000..1caee6c785f495
--- /dev/null
+++ b/mlir/include/mlir/Interfaces/InlinerInterface.h
@@ -0,0 +1,221 @@
+//===- InlinerInterface.h - Inliner interface -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This header file defines interfaces for various inlining utility methods.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MLIR_INTERFACES_INLINERINTERFACE_H
+#define MLIR_INTERFACES_INLINERINTERFACE_H
+
+#include "mlir/IR/BuiltinAttributes.h"
+#include "mlir/IR/DialectInterface.h"
+#include "mlir/IR/Location.h"
+#include "mlir/IR/Region.h"
+#include "mlir/IR/ValueRange.h"
+
+namespace mlir {
+
+class IRMapping;
+class OpBuilder;
+
+//===----------------------------------------------------------------------===//
+// InlinerInterface
+//===----------------------------------------------------------------------===//
+
+/// This is the interface that must be implemented by the dialects of operations
+/// to be inlined. This interface should only handle the operations of the
+/// given dialect.
+class DialectInlinerInterface
+    : public DialectInterface::Base<DialectInlinerInterface> {
+public:
+  DialectInlinerInterface(Dialect *dialect) : Base(dialect) {}
+
+  //===--------------------------------------------------------------------===//
+  // Analysis Hooks
+  //===--------------------------------------------------------------------===//
+
+  /// Returns true if the given operation 'callable', that implements the
+  /// 'CallableOpInterface', can be inlined into the position given call
+  /// operation 'call', that is registered to the current dialect and implements
+  /// the `CallOpInterface`. 'wouldBeCloned' is set to true if the region of the
+  /// given 'callable' is set to be cloned during the inlining process, or false
+  /// if the region is set to be moved in-place(i.e. no duplicates would be
+  /// created).
+  virtual bool isLegalToInline(Operation *call, Operation *callable,
+                               bool wouldBeCloned) const {
+    return false;
+  }
+
+  /// Returns true if the given region 'src' can be inlined into the region
+  /// 'dest' that is attached to an operation registered to the current dialect.
+  /// 'wouldBeCloned' is set to true if the given 'src' region is set to be
+  /// cloned during the inlining process, or false if the region is set to be
+  /// moved in-place(i.e. no duplicates would be created). 'valueMapping'
+  /// contains any remapped values from within the 'src' region. This can be
+  /// used to examine what values will replace entry arguments into the 'src'
+  /// region for example.
+  virtual bool isLegalToInline(Region *dest, Region *src, bool wouldBeCloned,
+                               IRMapping &valueMapping) const {
+    return false;
+  }
+
+  /// Returns true if the given operation 'op', that is registered to this
+  /// dialect, can be inlined into the given region, false otherwise.
+  /// 'wouldBeCloned' is set to true if the given 'op' is set to be cloned
+  /// during the inlining process, or false if the operation is set to be moved
+  /// in-place(i.e. no duplicates would be created). 'valueMapping' contains any
+  /// remapped values from within the 'src' region. This can be used to examine
+  /// what values may potentially replace the operands to 'op'.
+  virtual bool isLegalToInline(Operation *op, Region *dest, bool wouldBeCloned,
+                               IRMapping &valueMapping) const {
+    return false;
+  }
+
+  /// This hook is invoked on an operation that contains regions. It should
+  /// return true if the analyzer should recurse within the regions of this
+  /// operation when computing legality and cost, false otherwise. The default
+  /// implementation returns true.
+  virtual bool shouldAnalyzeRecursively(Operation *op) const { return true; }
+
+  //===--------------------------------------------------------------------===//
+  // Transformation Hooks
+  //===--------------------------------------------------------------------===//
+
+  /// Handle the given inlined terminator by replacing it with a new operation
+  /// as necessary. This overload is called when the inlined region has more
+  /// than one block. The 'newDest' block represents the new final branching
+  /// destination of blocks within this region, i.e. operations that release
+  /// control to the parent operation will likely now branch to this block.
+  /// Its block arguments correspond to any values that need to be replaced by
+  /// terminators within the inlined region.
+  virtual void handleTerminator(Operation *op, Block *newDest) const {
+    llvm_unreachable("must implement handleTerminator in the case of multiple "
+                     "inlined blocks");
+  }
+
+  /// Handle the given inlined terminator by replacing it with a new operation
+  /// as necessary. This overload is called when the inlined region only
+  /// contains one block. 'valuesToReplace' contains the previously returned
+  /// values of the call site before inlining. These values must be replaced by
+  /// this callback if they had any users (for example for traditional function
+  /// calls, these are directly replaced with the operands of the `return`
+  /// operation). The given 'op' will be removed by the caller, after this
+  /// function has been called.
+  virtual void handleTerminator(Operation *op,
+                                ValueRange valuesToReplace) const {
+    llvm_unreachable(
+        "must implement handleTerminator in the case of one inlined block");
+  }
+
+  /// Attempt to materialize a conversion for a type mismatch between a call
+  /// from this dialect, and a callable region. This method should generate an
+  /// operation that takes 'input' as the only operand, and produces a single
+  /// result of 'resultType'. If a conversion can not be generated, nullptr
+  /// should be returned. For example, this hook may be invoked in the following
+  /// scenarios:
+  ///   func @foo(i32) -> i32 { ... }
+  ///
+  ///   // Mismatched input operand
+  ///   ... = foo.call @foo(%input : i16) -> i32
+  ///
+  ///   // Mismatched result type.
+  ///   ... = foo.call @foo(%input : i32) -> i16
+  ///
+  /// NOTE: This hook may be invoked before the 'isLegal' checks above.
+  virtual Operation *materializeCallConversion(OpBuilder &builder, Value input,
+                                               Type resultType,
+                                               Location conversionLoc) const {
+    return nullptr;
+  }
+
+  /// Hook to transform the call arguments before using them to replace the
+  /// callee arguments. Returns a value of the same type or the `argument`
+  /// itself if nothing changed. The `argumentAttrs` dictionary is non-null even
+  /// if no attribute is present. The hook is called after converting the
+  /// callsite argument types using the materializeCallConversion callback, and
+  /// right before inlining the callee region. Any operations created using the
+  /// provided `builder` are inserted right before the inlined callee region. An
+  /// example use case is the insertion of copies for by value arguments.
+  virtual Value handleArgument(OpBuilder &builder, Operation *call,
+                               Operation *callable, Value argument,
+                               DictionaryAttr argumentAttrs) const {
+    return argument;
+  }
+
+  /// Hook to transform the callee results before using them to replace the call
+  /// results. Returns a value of the same type or the `result` itself if
+  /// nothing changed. The `resultAttrs` dictionary is non-null even if no
+  /// attribute is present. The hook is called right before handling
+  /// terminators, and obtains the callee result before converting its type
+  /// using the `materializeCallConversion` callback. Any operations created
+  /// using the provided `builder` are inserted right after the inlined callee
+  /// region. An example use case is the insertion of copies for by value
+  /// results. NOTE: This hook is invoked after inlining the `callable` region.
+  virtual Value handleResult(OpBuilder &builder, Operation *call,
+                             Operation *callable, Value result,
+                             DictionaryAttr resultAttrs) const {
+    return result;
+  }
+
+  /// Process a set of blocks that have been inlined for a call. This callback
+  /// is invoked before inlined terminator operations have been processed.
+  virtual void processInlinedCallBlocks(
+      Operation *call, iterator_range<Region::iterator> inlinedBlocks) const {}
+};
+
+/// This interface provides the hooks into the inlining interface.
+/// Note: this class automatically collects 'DialectInlinerInterface' objects
+/// registered to each dialect within the given context.
+class InlinerInterface
+    : public DialectInterfaceCollection<DialectInlinerInterface> {
+public:
+  using Base::Base;
+
+  /// Process a set of blocks that have been inlined. This callback is invoked
+  /// *before* inlined terminator operations have been processed.
+  virtual void
+  processInlinedBlocks(iterator_range<Region::iterator> inlinedBlocks) {}
+
+  /// These hooks mirror the hooks for the DialectInlinerInterface, with default
+  /// implementations that call the hook on the handler for the dialect 'op' is
+  /// registered to.
+
+  //===--------------------------------------------------------------------===//
+  // Analysis Hooks
+  //===--------------------------------------------------------------------===//
+
+  virtual bool isLegalToInline(Operation *call, Operation *callable,
+                               bool wouldBeCloned) const;
+  virtual bool isLegalToInline(Region *dest, Region *src, bool wouldBeCloned,
+                               IRMapping &valueMapping) const;
+  virtual bool isLegalToInline(Operation *op, Region *dest, bool wouldBeCloned,
+                               IRMapping &valueMapping) const;
+  virtual bool shouldAnalyzeRecursively(Operation *op) const;
+
+  //===--------------------------------------------------------------------===//
+  // Transformation Hooks
+  //===--------------------------------------------------------------------===//
+
+  virtual void handleTerminator(Operation *op, Block *newDest) const;
+  virtual void handleTerminator(Operation *op, ValueRange valuesToRepl) const;
+
+  virtual Value handleArgument(OpBuilder &builder, Operation *call,
+                               Operation *callable, Value argument,
+                               DictionaryAttr argumentAttrs) const;
+  virtual Value handleResult(OpBuilder &builder, Operation *call,
+                             Operation *callable, Value result,
+                             DictionaryAttr resultAttrs) const;
+
+  virtual void processInlinedCallBlocks(
+      Operation *call, iterator_range<Region::iterator> inlinedBlocks) const;
+};
+
+} // namespace mlir
+
+#endif // MLIR_INTERFACES_INLINERINTERFACE_H
diff --git a/mlir/include/mlir/Transforms/InliningUtils.h b/mlir/include/mlir/Transforms/InliningUtils.h
index 88fc033a6ab7be..16d12075fee9c4 100644
--- a/mlir/include/mlir/Transforms/InliningUtils.h
+++ b/mlir/include/mlir/Transforms/InliningUtils.h
@@ -13,217 +13,14 @@
 #ifndef MLIR_TRANSFORMS_INLININGUTILS_H
 #define MLIR_TRANSFORMS_INLININGUTILS_H
 
-#include "mlir/IR/BuiltinAttributes.h"
-#include "mlir/IR/DialectInterface.h"
-#include "mlir/IR/Location.h"
-#include "mlir/IR/Region.h"
 #include "mlir/IR/ValueRange.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include <optional>
 
 namespace mlir {
 
-class Block;
-class IRMapping;
 class CallableOpInterface;
 class CallOpInterface;
-class OpBuilder;
-class Operation;
-class Region;
-class TypeRange;
-class Value;
-class ValueRange;
-
-//===----------------------------------------------------------------------===//
-// InlinerInterface
-//===----------------------------------------------------------------------===//
-
-/// This is the interface that must be implemented by the dialects of operations
-/// to be inlined. This interface should only handle the operations of the
-/// given dialect.
-class DialectInlinerInterface
-    : public DialectInterface::Base<DialectInlinerInterface> {
-public:
-  DialectInlinerInterface(Dialect *dialect) : Base(dialect) {}
-
-  //===--------------------------------------------------------------------===//
-  // Analysis Hooks
-  //===--------------------------------------------------------------------===//
-
-  /// Returns true if the given operation 'callable', that implements the
-  /// 'CallableOpInterface', can be inlined into the position given call
-  /// operation 'call', that is registered to the current dialect and implements
-  /// the `CallOpInterface`. 'wouldBeCloned' is set to true if the region of the
-  /// given 'callable' is set to be cloned during the inlining process, or false
-  /// if the region is set to be moved in-place(i.e. no duplicates would be
-  /// created).
-  virtual bool isLegalToInline(Operation *call, Operation *callable,
-                               bool wouldBeCloned) const {
-    return false;
-  }
-
-  /// Returns true if the given region 'src' can be inlined into the region
-  /// 'dest' that is attached to an operation registered to the current dialect.
-  /// 'wouldBeCloned' is set to true if the given 'src' region is set to be
-  /// cloned during the inlining process, or false if the region is set to be
-  /// moved in-place(i.e. no duplicates would be created). 'valueMapping'
-  /// contains any remapped values from within the 'src' region. This can be
-  /// used to examine what values will replace entry arguments into the 'src'
-  /// region for example.
-  virtual bool isLegalToInline(Region *dest, Region *src, bool wouldBeCloned,
-                               IRMapping &valueMapping) const {
-    return false;
-  }
-
-  /// Returns true if the given operation 'op', that is registered to this
-  /// dialect, can be inlined into the given region, false otherwise.
-  /// 'wouldBeCloned' is set to true if the given 'op' is set to be cloned
-  /// during the inlining process, or false if the operation is set to be moved
-  /// in-place(i.e. no duplicates would be created). 'valueMapping' contains any
-  /// remapped values from within the 'src' region. This can be used to examine
-  /// what values may potentially replace the operands to 'op'.
-  virtual bool isLegalToInline(Operation *op, Region *dest, bool wouldBeCloned,
-                               IRMapping &valueMapping) const {
-    return false;
-  }
-
-  /// This hook is invoked on an operation that contains regions. It should
-  /// return true if the analyzer should recurse within the regions of this
-  /// operation when computing legality and cost, false otherwise. The default
-  /// implementation returns true.
-  virtual bool shouldAnalyzeRecursively(Operation *op) const { return true; }
-
-  //===--------------------------------------------------------------------===//
-  // Transformation Hooks
-  //===--------------------------------------------------------------------===//
-
-  /// Handle the given inlined terminator by replacing it with a new operation
-  /// as necessary. This overload is called when the inlined region has more
-  /// than one block. The 'newDest' block represents the new final branching
-  /// destination of blocks within this region, i.e. operations that release
-  /// control to the parent operation will likely now branch to this block.
-  /// Its block arguments correspond to any values that need to be replaced by
-  /// terminators within the inlined region.
-  virtual void handleTerminator(Operation *op, Block *newDest) const {
-    llvm_unreachable("must implement handleTerminator in the case of multiple "
-                     "inlined blocks");
-  }
-
-  /// Handle the given inlined terminator by replacing it with a new operation
-  /// as necessary. This overload is called when the inlined region only
-  /// contains one block. 'valuesToReplace' contains the previously returned
-  /// values of the call site before inlining. These values must be replaced by
-  /// this callback if they had any users (for example for traditional function
-  /// calls, these are directly replaced with the operands of the `return`
-  /// operation). The given 'op' will be removed by the caller, after this
-  /// function has been called.
-  virtual void handleTerminator(Operation *op,
-                                ValueRange valuesToReplace) const {
-    llvm_unreachable(
-        "must implement handleTerminator in the case of one inlined block");
-  }
-
-  /// Attempt to materialize a conversion for a type mismatch between a call
-  /// from this dialect, and a callable region. This method should generate an
-  /// operation that takes 'input' as the only operand, and produces a single
-  /// result of 'resultType'. If a conversion can not be generated, nullptr
-  /// should be returned. For example, this hook may be invoked in the following
-  /// scenarios:
-  ///   func @foo(i32) -> i32 { ... }
-  ///
-  ///   // Mismatched input operand
-  ///   ... = foo.call @foo(%input : i16) -> i32
-  ///
-  ///   // Mismatched result type.
-  ///   ... = foo.call @foo(%input : i32) -> i16
-  ///
-  /// NOTE: This hook may be invoked before the 'isLegal' checks above.
-  virtual Operation *materializeCallConversion(OpBuilder &builder, Value input,
-                                               Type resultType,
-                                               Location conversionLoc) const {
-    return nullptr;
-  }
-
-  /// Hook to transform the call arguments before using them to replace the
-  /// callee arguments. Returns a value of the same type or the `argument`
-  /// itself if nothing changed. The `argumentAttrs` dictionary is non-null even
-  /// if no attribute is present. The hook is called after converting the
-  /// callsite argument types using the materializeCallConversion callback, and
-  /// right before inlining the callee region. Any operations created using the
-  /// provided `builder` are inserted right before the inlined callee region. An
-  /// example use case is the insertion of copies for by value arguments.
-  virtual Value handleArgument(OpBuilder &builder, Operation *call,
-                               Operation *callable, Value argument,
-                               DictionaryAttr argumentAttrs) const {
-    return argument;
-  }
-
-  /// Hook to transform the callee results before using them to replace the call
-  /// results. Returns a value of the same type or the `result` itself if
-  /// nothing changed. The `resultAttrs` dictionary is non-null even if no
-  /// attribute is present. The hook is called right before handling
-  /// terminators, and obtains the callee result before converting its type
-  /// using the `materializeCallConversion` callback. Any operations created
-  /// using the provided `builder` are inserted right after the inlined callee
-  /// region. An example use case is the insertion of copies for by value
-  /// results. NOTE: This hook is invoked after inlining the `callable` region.
-  virtual Value handleResult(OpBuilder &builder, Operation *call,
-                             Operation *callable, Value result,
-                             DictionaryAttr resultAttrs) const {
-    return result;
-  }
-
-  /// Process a set of blocks that have been inlined for a call. This callback
-  /// is invoked before inlined terminator operations have been processed.
-  virtual void processInlinedCallBlocks(
-      Operation *call, iterator_range<Region::iterator> inlinedBlocks) const {}
-};
-
-/// This interface provides the hooks into the inlining interface.
-/// Note: this class automatically collects 'DialectInlinerInterface' objects
-/// registered to each dialect within the given context.
-class InlinerInterface
-    : public DialectInterfaceCollection<DialectInlinerInterface> {
-public:
-  using Base::Base;
-
-  /// Process a set of blocks that have been inlined. This callback is invoked
-  /// *before* inlined terminator operations have been processed.
-  virtual void
-  processInlinedBlocks(iterator_range<Region::iterator> inlinedBlocks) {}
-
-  /// These hooks mirror the hooks for the DialectInlinerInterface, with default
-  /// implementations that call the hook on the handler for the dialect 'op' is
-  /// registered to.
-
-  //===--------------------------------------------------------------------===//
-  // Analysis Hooks
-  //===--------------------------------------------------------------------===//
-
-  virtual bool isLegalToInline(Operation *call, Operation *callable,
-                               bool wouldBeCloned) const;
-  virtual bool isLegalToInline(Region *dest, Region *src, bool wouldBeCloned,
-                               IRMapping &valueMapping) const;
-  virtual bool isLegalToInline(Operation *op, Region *dest, bool wouldBeCloned,
-                               IRMapping &valueMapping) const;
-  virtual bool shouldAnalyzeRecursively(Operation *op) const;
-
-  //===--------------------------------------------------------------------===//
-  // Transformation Hooks
-  //===--------------------------------------------------------------------===//
-
-  virtual void handleTerminator(Operation *op, Block *newDest) const;
-  virtual void handleTerminator(Operation *op, ValueRange valuesToRepl) const;
-
-  virtual Value handleArgument(OpBuilder &builder, Operation *call,
-                               Operation *callable, Value argument,
-                               DictionaryAttr argumentAttrs) const;
-  virtual Value handleResult(OpBuilder &builder, Operation *call,
-                             Operation *callable, Value result,
-                             DictionaryAttr resultAttrs) const;
-
-  virtual void processInlinedCallBlocks(
-      Operation *call, iterator_range<Region::iterator> inlinedBlocks) const;
-};
 
 //===----------------------------------------------------------------------===//
 // Inline Methods.
diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
index 8a070d25639870..512f4efe067010 100644
--- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -16,9 +16,9 @@
 #include "mlir/IR/Matchers.h"
 #include "mlir/IR/OpDefinition.h"
 #include "mlir/IR/PatternMatch.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Interfaces/ShapedOpInterfaces.h"
 #include "mlir/Support/MathExtras.h"
-#include "mlir/Transforms/InliningUtils.h"
 #include "llvm/ADT/ScopeExit.h"
 #include "llvm/ADT/SmallBitVector.h"
 #include "llvm/ADT/SmallVectorExtras.h"
diff --git a/mlir/lib/Dialect/Affine/IR/CMakeLists.txt b/mlir/lib/Dialect/Affine/IR/CMakeLists.txt
index 7f7a01be891e05..a51bf57b2503e9 100644
--- a/mlir/lib/Dialect/Affine/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/IR/CMakeLists.txt
@@ -16,6 +16,7 @@ add_mlir_dialect_library(MLIRAffineDialect
   MLIRDialectUtils
   MLIRIR
   MLIRInferTypeOpInterface
+  MLIRInlinerInterface
   MLIRLoopLikeInterface
   MLIRMemRefDialect
   MLIRShapedOpInterfaces
diff --git a/mlir/lib/Dialect/Arith/IR/ArithDialect.cpp b/mlir/lib/Dialect/Arith/IR/ArithDialect.cpp
index 745c5706a838ce..21c7e517ccee66 100644
--- a/mlir/lib/Dialect/Arith/IR/ArithDialect.cpp
+++ b/mlir/lib/Dialect/Arith/IR/ArithDialect.cpp
@@ -11,7 +11,7 @@
 #include "mlir/Dialect/UB/IR/UBOps.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/DialectImplementation.h"
-#include "mlir/Transforms/InliningUtils.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "llvm/ADT/TypeSwitch.h"
 
 using namespace mlir;
diff --git a/mlir/lib/Dialect/Arith/IR/CMakeLists.txt b/mlir/lib/Dialect/Arith/IR/CMakeLists.txt
index 4beb99ccfdfbab..de2d1d9a0f0407 100644
--- a/mlir/lib/Dialect/Arith/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Arith/IR/CMakeLists.txt
@@ -27,6 +27,7 @@ add_mlir_dialect_library(MLIRArithDialect
   MLIRInferIntRangeCommon
   MLIRInferIntRangeInterface
   MLIRInferTypeOpInterface
+  MLIRInlinerInterface
   MLIRIR
   MLIRUBDialect
   )
diff --git a/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp b/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
index e5a0c3c45b09e2..b8573ca21ef2e4 100644
--- a/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
+++ b/mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
@@ -12,7 +12,7 @@
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
-#include "mlir/Transforms/InliningUtils.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 
 using namespace mlir;
 using namespace mlir::bufferization;
diff --git a/mlir/lib/Dialect/Bufferization/IR/CMakeLists.txt b/mlir/lib/Dialect/Bufferization/IR/CMakeLists.txt
index 9895db9d93ce0b..a130a0027ab6aa 100644
--- a/mlir/lib/Dialect/Bufferization/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Bufferization/IR/CMakeLists.txt
@@ -21,6 +21,7 @@ add_mlir_dialect_library(MLIRBufferizationDialect
   MLIRDialect
   MLIRFuncDialect
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRIR
   MLIRSparseTensorDialect
   MLIRSubsetOpInterface
diff --git a/mlir/lib/Dialect/Complex/IR/CMakeLists.txt b/mlir/lib/Dialect/Complex/IR/CMakeLists.txt
index 3ee0d26f3225f7..9c72196fc05f1a 100644
--- a/mlir/lib/Dialect/Complex/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Complex/IR/CMakeLists.txt
@@ -14,5 +14,6 @@ add_mlir_dialect_library(MLIRComplexDialect
   MLIRArithDialect
   MLIRDialect
   MLIRInferTypeOpInterface
+  MLIRInlinerInterface
   MLIRIR
   )
diff --git a/mlir/lib/Dialect/Complex/IR/ComplexDialect.cpp b/mlir/lib/Dialect/Complex/IR/ComplexDialect.cpp
index ca57171af156f9..a81975bfec48bd 100644
--- a/mlir/lib/Dialect/Complex/IR/ComplexDialect.cpp
+++ b/mlir/lib/Dialect/Complex/IR/ComplexDialect.cpp
@@ -11,7 +11,7 @@
 #include "mlir/Dialect/Complex/IR/Complex.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/DialectImplementation.h"
-#include "mlir/Transforms/InliningUtils.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/TypeSwitch.h"
 
diff --git a/mlir/lib/Dialect/ControlFlow/IR/CMakeLists.txt b/mlir/lib/Dialect/ControlFlow/IR/CMakeLists.txt
index 58551bb435c867..da2c64c05db3c7 100644
--- a/mlir/lib/Dialect/ControlFlow/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/ControlFlow/IR/CMakeLists.txt
@@ -10,6 +10,7 @@ add_mlir_dialect_library(MLIRControlFlowDialect
   LINK_LIBS PUBLIC
   MLIRArithDialect
   MLIRControlFlowInterfaces
+  MLIRInlinerInterface
   MLIRIR
   MLIRSideEffectInterfaces
   )
diff --git a/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp b/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
index d242d75bd51fa7..a3d2922630880c 100644
--- a/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
+++ b/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
@@ -21,8 +21,8 @@
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/IR/Value.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Support/MathExtras.h"
-#include "mlir/Transforms/InliningUtils.h"
 #include "llvm/ADT/APFloat.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/FormatVariadic.h"
diff --git a/mlir/lib/Dialect/Func/Extensions/CMakeLists.txt b/mlir/lib/Dialect/Func/Extensions/CMakeLists.txt
index 47363f48f95cc4..542dbfe84d77a0 100644
--- a/mlir/lib/Dialect/Func/Extensions/CMakeLists.txt
+++ b/mlir/lib/Dialect/Func/Extensions/CMakeLists.txt
@@ -12,6 +12,7 @@ add_mlir_extension_library(MLIRFuncInlinerExtension
 
   LINK_LIBS PUBLIC
   MLIRControlFlowDialect
+  MLIRInlinerInterface
   MLIRInferTypeOpInterface
   MLIRIR
   MLIRFuncDialect
diff --git a/mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp b/mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp
index 719a74a29a6221..25f697348f74c2 100644
--- a/mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp
+++ b/mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp
@@ -10,7 +10,7 @@
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
 #include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/DialectInterface.h"
-#include "mlir/Transforms/InliningUtils.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 
 using namespace mlir;
 using namespace mlir::func;
diff --git a/mlir/lib/Dialect/Func/IR/CMakeLists.txt b/mlir/lib/Dialect/Func/IR/CMakeLists.txt
index 329301c6fbafd2..fd5b90513c2abf 100644
--- a/mlir/lib/Dialect/Func/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Func/IR/CMakeLists.txt
@@ -11,6 +11,7 @@ add_mlir_dialect_library(MLIRFuncDialect
   MLIRCallInterfaces
   MLIRControlFlowInterfaces
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRInferTypeOpInterface
   MLIRIR
   MLIRSideEffectInterfaces
diff --git a/mlir/lib/Dialect/Func/IR/FuncOps.cpp b/mlir/lib/Dialect/Func/IR/FuncOps.cpp
index d18ec279e85c04..d6de2280e28b3e 100644
--- a/mlir/lib/Dialect/Func/IR/FuncOps.cpp
+++ b/mlir/lib/Dialect/Func/IR/FuncOps.cpp
@@ -18,8 +18,8 @@
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/IR/Value.h"
 #include "mlir/Interfaces/FunctionImplementation.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Support/MathExtras.h"
-#include "mlir/Transforms/InliningUtils.h"
 #include "llvm/ADT/APFloat.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/STLExtras.h"
diff --git a/mlir/lib/Dialect/GPU/CMakeLists.txt b/mlir/lib/Dialect/GPU/CMakeLists.txt
index 61ab298ebfb986..10e6bb6b9140c9 100644
--- a/mlir/lib/Dialect/GPU/CMakeLists.txt
+++ b/mlir/lib/Dialect/GPU/CMakeLists.txt
@@ -31,6 +31,7 @@ add_mlir_dialect_library(MLIRGPUDialect
   MLIRDLTIDialect
   MLIRControlFlowInterfaces
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRInferIntRangeInterface
   MLIRIR
   MLIRMemRefDialect
diff --git a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
index 33ce5c159db4f9..8562ea364738c3 100644
--- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
+++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
@@ -27,9 +27,9 @@
 #include "mlir/IR/SymbolTable.h"
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Interfaces/FunctionImplementation.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Interfaces/SideEffectInterfaces.h"
 #include "mlir/Support/LogicalResult.h"
-#include "mlir/Transforms/InliningUtils.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/CommandLine.h"
diff --git a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
index 392065b859ee54..f297c89325cb48 100644
--- a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
+++ b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
@@ -33,6 +33,7 @@ add_mlir_dialect_library(MLIRLLVMDialect
   MLIRControlFlowInterfaces
   MLIRDataLayoutInterfaces
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRInferTypeOpInterface
   MLIRIR
   MLIRMemorySlotInterfaces
diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp
index 4a6154ea6d3004..08b471a44820c1 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp
@@ -15,7 +15,7 @@
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/Interfaces/DataLayoutInterfaces.h"
-#include "mlir/Transforms/InliningUtils.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "llvm/ADT/ScopeExit.h"
 #include "llvm/Support/Debug.h"
 
diff --git a/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt b/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
index c187563b8f0c4e..e9c2f86b889fc4 100644
--- a/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
@@ -23,6 +23,7 @@ add_mlir_dialect_library(MLIRLinalgDialect
   MLIRDialectUtils
   MLIRFunctionInterfaces
   MLIRInferTypeOpInterface
+  MLIRInlinerInterface
   MLIRIR
   MLIRParser
   MLIRShardingInterface
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
index 027058d4de6328..f52ed3cb847975 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
@@ -22,9 +22,9 @@
 #include "mlir/IR/Dialect.h"
 #include "mlir/IR/DialectImplementation.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Parser/Parser.h"
 #include "mlir/Support/LLVM.h"
-#include "mlir/Transforms/InliningUtils.h"
 
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/TypeSwitch.h"
diff --git a/mlir/lib/Dialect/Math/IR/CMakeLists.txt b/mlir/lib/Dialect/Math/IR/CMakeLists.txt
index ed95bf846cdead..0a96043ea62110 100644
--- a/mlir/lib/Dialect/Math/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Math/IR/CMakeLists.txt
@@ -11,6 +11,7 @@ add_mlir_dialect_library(MLIRMathDialect
   LINK_LIBS PUBLIC
   MLIRArithDialect
   MLIRDialect
+  MLIRInlinerInterface
   MLIRIR
   MLIRUBDialect
   )
diff --git a/mlir/lib/Dialect/Math/IR/MathDialect.cpp b/mlir/lib/Dialect/Math/IR/MathDialect.cpp
index a71b24cb1b9737..8a21f924bf87cc 100644
--- a/mlir/lib/Dialect/Math/IR/MathDialect.cpp
+++ b/mlir/lib/Dialect/Math/IR/MathDialect.cpp
@@ -9,7 +9,7 @@
 #include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/UB/IR/UBOps.h"
-#include "mlir/Transforms/InliningUtils.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 
 using namespace mlir;
 using namespace mlir::math;
diff --git a/mlir/lib/Dialect/MemRef/IR/CMakeLists.txt b/mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
index fd2fed28badd63..8be62a0aef9300 100644
--- a/mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
@@ -20,6 +20,7 @@ add_mlir_dialect_library(MLIRMemRefDialect
   MLIRDialect
   MLIRDialectUtils
   MLIRInferTypeOpInterface
+  MLIRInlinerInterface
   MLIRIR
   MLIRMemorySlotInterfaces
   MLIRShapedOpInterfaces
diff --git a/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
index d71669a274b8fc..afc91a269ca795 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
@@ -9,8 +9,8 @@
 #include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Interfaces/SideEffectInterfaces.h"
-#include "mlir/Transforms/InliningUtils.h"
 #include <optional>
 
 using namespace mlir;
diff --git a/mlir/lib/Dialect/SCF/IR/CMakeLists.txt b/mlir/lib/Dialect/SCF/IR/CMakeLists.txt
index 423e1c3e1e042c..2a3b9f2114a133 100644
--- a/mlir/lib/Dialect/SCF/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/SCF/IR/CMakeLists.txt
@@ -14,6 +14,7 @@ add_mlir_dialect_library(MLIRSCFDialect
   MLIRControlFlowDialect
   MLIRDialectUtils
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRIR
   MLIRLoopLikeInterface
   MLIRSideEffectInterfaces
diff --git a/mlir/lib/Dialect/SCF/IR/SCF.cpp b/mlir/lib/Dialect/SCF/IR/SCF.cpp
index 233e702dbb2292..b355ef67625da9 100644
--- a/mlir/lib/Dialect/SCF/IR/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/IR/SCF.cpp
@@ -18,8 +18,8 @@
 #include "mlir/IR/Matchers.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Support/MathExtras.h"
-#include "mlir/Transforms/InliningUtils.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/TypeSwitch.h"
diff --git a/mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt b/mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt
index 2b5cedafae1e85..c4c243eccb997b 100644
--- a/mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt
@@ -38,6 +38,7 @@ add_mlir_dialect_library(MLIRSPIRVDialect
   LINK_LIBS PUBLIC
   MLIRControlFlowInterfaces
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRIR
   MLIRParser
   MLIRSideEffectInterfaces
diff --git a/mlir/lib/Dialect/Shape/IR/CMakeLists.txt b/mlir/lib/Dialect/Shape/IR/CMakeLists.txt
index 32a86b483a49b1..a960c8227d14d0 100644
--- a/mlir/lib/Dialect/Shape/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Shape/IR/CMakeLists.txt
@@ -19,6 +19,7 @@ add_mlir_dialect_library(MLIRShapeDialect
   MLIRDialect
   MLIRFuncDialect
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRInferTypeOpInterface
   MLIRIR
   MLIRSideEffectInterfaces
diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp
index d9ee39a4e8dd32..87a3d8e34f6e20 100644
--- a/mlir/lib/Dialect/Shape/IR/Shape.cpp
+++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp
@@ -22,7 +22,7 @@
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Interfaces/FunctionImplementation.h"
-#include "mlir/Transforms/InliningUtils.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "llvm/ADT/SetOperations.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/TypeSwitch.h"
diff --git a/mlir/lib/Dialect/Tensor/IR/CMakeLists.txt b/mlir/lib/Dialect/Tensor/IR/CMakeLists.txt
index 549b9f10388bd4..e41d645f638577 100644
--- a/mlir/lib/Dialect/Tensor/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Tensor/IR/CMakeLists.txt
@@ -28,8 +28,9 @@ add_mlir_dialect_library(MLIRTensorDialect
   MLIRComplexDialect
   MLIRDestinationStyleOpInterface
   MLIRDialectUtils
-  MLIRIR
   MLIRInferTypeOpInterface
+  MLIRInlinerInterface
+  MLIRIR
   MLIRParallelCombiningOpInterface
   MLIRShapedOpInterfaces
   MLIRSideEffectInterfaces
diff --git a/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp b/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
index 62032ff301bece..87a1e625949910 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
@@ -10,7 +10,7 @@
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Complex/IR/Complex.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
-#include "mlir/Transforms/InliningUtils.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 
 using namespace mlir;
 using namespace mlir::tensor;
diff --git a/mlir/lib/Dialect/UB/IR/CMakeLists.txt b/mlir/lib/Dialect/UB/IR/CMakeLists.txt
index 84125ea0b57181..0f300dba94fafc 100644
--- a/mlir/lib/Dialect/UB/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/UB/IR/CMakeLists.txt
@@ -9,5 +9,6 @@ add_mlir_dialect_library(MLIRUBDialect
   MLIRUBOpsInterfacesIncGen
 
   LINK_LIBS PUBLIC
+  MLIRInlinerInterface
   MLIRIR
   )
diff --git a/mlir/lib/Dialect/UB/IR/UBOps.cpp b/mlir/lib/Dialect/UB/IR/UBOps.cpp
index 3a2010cdcb5c7c..c3c0226727046e 100644
--- a/mlir/lib/Dialect/UB/IR/UBOps.cpp
+++ b/mlir/lib/Dialect/UB/IR/UBOps.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Dialect/UB/IR/UBOps.h"
-#include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"
-#include "mlir/Transforms/InliningUtils.h"
 
+#include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/DialectImplementation.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "llvm/ADT/TypeSwitch.h"
 
 #include "mlir/Dialect/UB/IR/UBOpsDialect.cpp.inc"
diff --git a/mlir/lib/Dialect/Vector/IR/CMakeLists.txt b/mlir/lib/Dialect/Vector/IR/CMakeLists.txt
index 70f3fa8c297d4b..9b3b2befa6578c 100644
--- a/mlir/lib/Dialect/Vector/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Vector/IR/CMakeLists.txt
@@ -17,6 +17,7 @@ add_mlir_dialect_library(MLIRVectorDialect
   MLIRDataLayoutInterfaces
   MLIRDestinationStyleOpInterface
   MLIRDialectUtils
+  MLIRInlinerInterface
   MLIRIR
   MLIRMaskableOpInterface
   MLIRMaskingOpInterface
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 75f6220ad8f3fa..5aade33494859d 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -31,9 +31,9 @@
 #include "mlir/IR/OpImplementation.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/IR/TypeUtilities.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Interfaces/ValueBoundsOpInterface.h"
 #include "mlir/Support/LLVM.h"
-#include "mlir/Transforms/InliningUtils.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
diff --git a/mlir/lib/Interfaces/CMakeLists.txt b/mlir/lib/Interfaces/CMakeLists.txt
index e7c76e70ed6b5d..4e1b1d542024b5 100644
--- a/mlir/lib/Interfaces/CMakeLists.txt
+++ b/mlir/lib/Interfaces/CMakeLists.txt
@@ -10,6 +10,7 @@ set(LLVM_OPTIONAL_SOURCES
   FunctionInterfaces.cpp
   InferIntRangeInterface.cpp
   InferTypeOpInterface.cpp
+  InlinerInterface.cpp
   LoopLikeInterface.cpp
   MemorySlotInterfaces.cpp
   ParallelCombiningOpInterface.cpp
@@ -64,6 +65,16 @@ add_mlir_library(MLIRFunctionInterfaces
 add_mlir_interface_library(InferIntRangeInterface)
 add_mlir_interface_library(InferTypeOpInterface)
 
+add_mlir_library(MLIRInlinerInterface
+  InlinerInterface.cpp
+
+  ADDITIONAL_HEADER_DIRS
+  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
+
+  LINK_LIBS PUBLIC
+  MLIRIR
+)
+
 add_mlir_library(MLIRLoopLikeInterface
   LoopLikeInterface.cpp
 
diff --git a/mlir/lib/Interfaces/InlinerInterface.cpp b/mlir/lib/Interfaces/InlinerInterface.cpp
new file mode 100644
index 00000000000000..40b522f70b3d18
--- /dev/null
+++ b/mlir/lib/Interfaces/InlinerInterface.cpp
@@ -0,0 +1,91 @@
+//===- InlinerInterface.cpp ---- Interface for inlining -------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the inlining interface.
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Interfaces/InlinerInterface.h"
+
+#include "mlir/IR/Builders.h"
+#include "mlir/IR/IRMapping.h"
+
+using namespace mlir;
+
+//===----------------------------------------------------------------------===//
+// InlinerInterface
+//===----------------------------------------------------------------------===//
+
+bool InlinerInterface::isLegalToInline(Operation *call, Operation *callable,
+                                       bool wouldBeCloned) const {
+  if (auto *handler = getInterfaceFor(call))
+    return handler->isLegalToInline(call, callable, wouldBeCloned);
+  return false;
+}
+
+bool InlinerInterface::isLegalToInline(Region *dest, Region *src,
+                                       bool wouldBeCloned,
+                                       IRMapping &valueMapping) const {
+  if (auto *handler = getInterfaceFor(dest->getParentOp()))
+    return handler->isLegalToInline(dest, src, wouldBeCloned, valueMapping);
+  return false;
+}
+
+bool InlinerInterface::isLegalToInline(Operation *op, Region *dest,
+                                       bool wouldBeCloned,
+                                       IRMapping &valueMapping) const {
+  if (auto *handler = getInterfaceFor(op))
+    return handler->isLegalToInline(op, dest, wouldBeCloned, valueMapping);
+  return false;
+}
+
+bool InlinerInterface::shouldAnalyzeRecursively(Operation *op) const {
+  auto *handler = getInterfaceFor(op);
+  return handler ? handler->shouldAnalyzeRecursively(op) : true;
+}
+
+/// Handle the given inlined terminator by replacing it with a new operation
+/// as necessary.
+void InlinerInterface::handleTerminator(Operation *op, Block *newDest) const {
+  auto *handler = getInterfaceFor(op);
+  assert(handler && "expected valid dialect handler");
+  handler->handleTerminator(op, newDest);
+}
+
+/// Handle the given inlined terminator by replacing it with a new operation
+/// as necessary.
+void InlinerInterface::handleTerminator(Operation *op,
+                                        ValueRange valuesToRepl) const {
+  auto *handler = getInterfaceFor(op);
+  assert(handler && "expected valid dialect handler");
+  handler->handleTerminator(op, valuesToRepl);
+}
+
+Value InlinerInterface::handleArgument(OpBuilder &builder, Operation *call,
+                                       Operation *callable, Value argument,
+                                       DictionaryAttr argumentAttrs) const {
+  auto *handler = getInterfaceFor(callable);
+  assert(handler && "expected valid dialect handler");
+  return handler->handleArgument(builder, call, callable, argument,
+                                 argumentAttrs);
+}
+
+Value InlinerInterface::handleResult(OpBuilder &builder, Operation *call,
+                                     Operation *callable, Value result,
+                                     DictionaryAttr resultAttrs) const {
+  auto *handler = getInterfaceFor(callable);
+  assert(handler && "expected valid dialect handler");
+  return handler->handleResult(builder, call, callable, result, resultAttrs);
+}
+
+void InlinerInterface::processInlinedCallBlocks(
+    Operation *call, iterator_range<Region::iterator> inlinedBlocks) const {
+  auto *handler = getInterfaceFor(call);
+  assert(handler && "expected valid dialect handler");
+  handler->processInlinedCallBlocks(call, inlinedBlocks);
+}
diff --git a/mlir/lib/Transforms/CMakeLists.txt b/mlir/lib/Transforms/CMakeLists.txt
index 6c32ecf8a2a2f1..856af9a0511c66 100644
--- a/mlir/lib/Transforms/CMakeLists.txt
+++ b/mlir/lib/Transforms/CMakeLists.txt
@@ -30,6 +30,7 @@ add_mlir_library(MLIRTransforms
   MLIRAnalysis
   MLIRCopyOpInterface
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRLoopLikeInterface
   MLIRMemorySlotInterfaces
   MLIRPass
diff --git a/mlir/lib/Transforms/Utils/CMakeLists.txt b/mlir/lib/Transforms/Utils/CMakeLists.txt
index d6aac0e2da4f5a..481b5215d4ebd7 100644
--- a/mlir/lib/Transforms/Utils/CMakeLists.txt
+++ b/mlir/lib/Transforms/Utils/CMakeLists.txt
@@ -19,6 +19,7 @@ add_mlir_library(MLIRTransformUtils
   MLIRAnalysis
   MLIRControlFlowInterfaces
   MLIRFunctionInterfaces
+  MLIRInlinerInterface
   MLIRLoopLikeInterface
   MLIRSideEffectInterfaces
   MLIRSubsetOpInterface
diff --git a/mlir/lib/Transforms/Utils/InliningUtils.cpp b/mlir/lib/Transforms/Utils/InliningUtils.cpp
index ba146920fae2e9..0f19d3c9d9751e 100644
--- a/mlir/lib/Transforms/Utils/InliningUtils.cpp
+++ b/mlir/lib/Transforms/Utils/InliningUtils.cpp
@@ -54,79 +54,6 @@ static void remapInlinedOperands(iterator_range<Region::iterator> inlinedBlocks,
     block.walk(remapOperands);
 }
 
-//===----------------------------------------------------------------------===//
-// InlinerInterface
-//===----------------------------------------------------------------------===//
-
-bool InlinerInterface::isLegalToInline(Operation *call, Operation *callable,
-                                       bool wouldBeCloned) const {
-  if (auto *handler = getInterfaceFor(call))
-    return handler->isLegalToInline(call, callable, wouldBeCloned);
-  return false;
-}
-
-bool InlinerInterface::isLegalToInline(Region *dest, Region *src,
-                                       bool wouldBeCloned,
-                                       IRMapping &valueMapping) const {
-  if (auto *handler = getInterfaceFor(dest->getParentOp()))
-    return handler->isLegalToInline(dest, src, wouldBeCloned, valueMapping);
-  return false;
-}
-
-bool InlinerInterface::isLegalToInline(Operation *op, Region *dest,
-                                       bool wouldBeCloned,
-                                       IRMapping &valueMapping) const {
-  if (auto *handler = getInterfaceFor(op))
-    return handler->isLegalToInline(op, dest, wouldBeCloned, valueMapping);
-  return false;
-}
-
-bool InlinerInterface::shouldAnalyzeRecursively(Operation *op) const {
-  auto *handler = getInterfaceFor(op);
-  return handler ? handler->shouldAnalyzeRecursively(op) : true;
-}
-
-/// Handle the given inlined terminator by replacing it with a new operation
-/// as necessary.
-void InlinerInterface::handleTerminator(Operation *op, Block *newDest) const {
-  auto *handler = getInterfaceFor(op);
-  assert(handler && "expected valid dialect handler");
-  handler->handleTerminator(op, newDest);
-}
-
-/// Handle the given inlined terminator by replacing it with a new operation
-/// as necessary.
-void InlinerInterface::handleTerminator(Operation *op,
-                                        ValueRange valuesToRepl) const {
-  auto *handler = getInterfaceFor(op);
-  assert(handler && "expected valid dialect handler");
-  handler->handleTerminator(op, valuesToRepl);
-}
-
-Value InlinerInterface::handleArgument(OpBuilder &builder, Operation *call,
-                                       Operation *callable, Value argument,
-                                       DictionaryAttr argumentAttrs) const {
-  auto *handler = getInterfaceFor(callable);
-  assert(handler && "expected valid dialect handler");
-  return handler->handleArgument(builder, call, callable, argument,
-                                 argumentAttrs);
-}
-
-Value InlinerInterface::handleResult(OpBuilder &builder, Operation *call,
-                                     Operation *callable, Value result,
-                                     DictionaryAttr resultAttrs) const {
-  auto *handler = getInterfaceFor(callable);
-  assert(handler && "expected valid dialect handler");
-  return handler->handleResult(builder, call, callable, result, resultAttrs);
-}
-
-void InlinerInterface::processInlinedCallBlocks(
-    Operation *call, iterator_range<Region::iterator> inlinedBlocks) const {
-  auto *handler = getInterfaceFor(call);
-  assert(handler && "expected valid dialect handler");
-  handler->processInlinedCallBlocks(call, inlinedBlocks);
-}
-
 /// Utility to check that all of the operations within 'src' can be inlined.
 static bool isLegalToInline(InlinerInterface &interface, Region *src,
                             Region *insertRegion, bool shouldCloneInlinedRegion,
diff --git a/mlir/test/lib/Dialect/Test/TestDialect.cpp b/mlir/test/lib/Dialect/Test/TestDialect.cpp
index 1ee52fc08d77f6..474c764912cc1d 100644
--- a/mlir/test/lib/Dialect/Test/TestDialect.cpp
+++ b/mlir/test/lib/Dialect/Test/TestDialect.cpp
@@ -28,10 +28,10 @@
 #include "mlir/Interfaces/CallInterfaces.h"
 #include "mlir/Interfaces/FunctionImplementation.h"
 #include "mlir/Interfaces/InferIntRangeInterface.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Support/LLVM.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/FoldUtils.h"
-#include "mlir/Transforms/InliningUtils.h"
 #include "llvm/ADT/STLFunctionalExtras.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringExtras.h"
diff --git a/mlir/test/lib/Dialect/Test/TestDialectInterfaces.cpp b/mlir/test/lib/Dialect/Test/TestDialectInterfaces.cpp
index 66578b246afab1..a774f25daeae61 100644
--- a/mlir/test/lib/Dialect/Test/TestDialectInterfaces.cpp
+++ b/mlir/test/lib/Dialect/Test/TestDialectInterfaces.cpp
@@ -8,8 +8,8 @@
 
 #include "TestDialect.h"
 #include "mlir/Interfaces/FoldInterfaces.h"
+#include "mlir/Interfaces/InlinerInterface.h"
 #include "mlir/Reducer/ReductionPatternInterface.h"
-#include "mlir/Transforms/InliningUtils.h"
 
 using namespace mlir;
 using namespace test;
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 28a69c7ffea1f4..40125753558494 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -3891,6 +3891,7 @@ cc_library(
         ":ControlFlowInterfaces",
         ":DialectUtils",
         ":IR",
+        ":InlinerInterface",
         ":LoopLikeInterface",
         ":MemRefDialect",
         ":ShapedOpInterfaces",
@@ -4298,6 +4299,7 @@ cc_library(
         ":FunctionInterfaces",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":LoopLikeInterface",
         ":MemRefDialect",
         ":ParallelCombiningOpInterface",
@@ -4368,6 +4370,16 @@ cc_library(
     ],
 )
 
+cc_library(
+    name = "InlinerInterface",
+    srcs = ["lib/Interfaces/InlinerInterface.cpp"],
+    hdrs = ["include/mlir/Interfaces/InlinerInterface.h"],
+    includes = ["include"],
+    deps = [
+        ":IR",
+    ],
+)
+
 cc_library(
     name = "LoopLikeInterface",
     srcs = ["lib/Interfaces/LoopLikeInterface.cpp"],
@@ -4545,6 +4557,7 @@ cc_library(
         ":FunctionInterfaces",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":MLIRShapeCanonicalizationIncGen",
         ":ShapeOpsIncGen",
         ":SideEffectInterfaces",
@@ -4708,6 +4721,7 @@ cc_library(
         ":ControlFlowOpsIncGen",
         ":ConvertToLLVMInterface",
         ":IR",
+        ":InlinerInterface",
         ":SideEffectInterfaces",
         ":Support",
         "//llvm:Support",
@@ -4744,7 +4758,7 @@ cc_library(
     hdrs = glob([
         "include/mlir/Dialect/Func/IR/*.h",
         "include/mlir/Dialect/Func/Utils/*.h",
-    ]) + ["include/mlir/Transforms/InliningUtils.h"],
+    ]),
     includes = ["include"],
     deps = [
         ":ArithDialect",
@@ -4758,6 +4772,7 @@ cc_library(
         ":FunctionInterfaces",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":SideEffectInterfaces",
         ":Support",
         "//llvm:Support",
@@ -4774,6 +4789,7 @@ cc_library(
         ":FuncDialect",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":MeshShardingInterface",
     ],
 )
@@ -4930,6 +4946,7 @@ cc_library(
         ":DialectUtils",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":MaskableOpInterface",
         ":MaskingOpInterface",
         ":MemRefDialect",
@@ -5338,7 +5355,6 @@ cc_library(
             "include/mlir/Dialect/LLVMIR/*X86Vector*.h",
         ],
     ) + [
-        "include/mlir/Transforms/InliningUtils.h",
         "include/mlir/Transforms/Mem2Reg.h",
     ],
     includes = ["include"],
@@ -5349,6 +5365,7 @@ cc_library(
         ":FunctionInterfaces",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":LLVMDialectInterfaceIncGen",
         ":LLVMIntrinsicOpsIncGen",
         ":LLVMOpsIncGen",
@@ -5555,6 +5572,7 @@ cc_library(
         ":IR",
         ":InferIntRangeInterface",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":LLVMDialect",
         ":MemRefDialect",
         ":SCFDialect",
@@ -6889,7 +6907,7 @@ cc_library(
     srcs = glob([
         "lib/Dialect/SPIRV/IR/*.cpp",
         "lib/Dialect/SPIRV/IR/*.h",
-    ]) + ["include/mlir/Transforms/InliningUtils.h"],
+    ]),
     hdrs = glob([
         "include/mlir/Dialect/SPIRV/IR/*.h",
     ]),
@@ -6901,6 +6919,7 @@ cc_library(
         ":GPUDialect",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":Parser",
         ":SPIRVAttrUtilsGen",
         ":SPIRVAttributesIncGen",
@@ -7305,7 +7324,6 @@ gentbl_cc_library(
 cc_library(
     name = "TensorDialect",
     srcs = [
-        "include/mlir/Transforms/InliningUtils.h",
         "lib/Dialect/Tensor/IR/TensorDialect.cpp",
         "lib/Dialect/Tensor/IR/TensorOps.cpp",
         "lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp",
@@ -7326,6 +7344,7 @@ cc_library(
         ":DialectUtils",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":LoopLikeInterface",
         ":ParallelCombiningOpInterface",
         ":ShapedOpInterfaces",
@@ -7521,9 +7540,7 @@ cc_library(
         "lib/Transforms/Utils/*.h",
     ]),
     hdrs = glob(
-        [
-            "include/mlir/Transforms/*.h",
-        ],
+        include = ["include/mlir/Transforms/*.h"],
         exclude = ["include/mlir/Transforms/Passes.h"],
     ),
     includes = ["include"],
@@ -7532,6 +7549,7 @@ cc_library(
         ":ControlFlowInterfaces",
         ":FunctionInterfaces",
         ":IR",
+        ":InlinerInterface",
         ":LoopLikeInterface",
         ":MemorySlotInterfaces",
         ":Pass",
@@ -7861,6 +7879,7 @@ cc_library(
         ":ControlFlowInterfaces",
         ":FunctionInterfaces",
         ":IR",
+        ":InlinerInterface",
         ":LoopLikeInterface",
         ":MemorySlotInterfaces",
         ":Pass",
@@ -10957,6 +10976,7 @@ cc_library(
         ":FunctionInterfaces",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":LinalgEnumsIncGen",
         ":LinalgInterfacesIncGen",
         ":LinalgNamedStructuredOpsYamlIncGen",
@@ -12317,6 +12337,7 @@ cc_library(
         ":ConvertToLLVMInterface",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":SideEffectInterfaces",
         "//llvm:Support",
     ],
@@ -12568,7 +12589,6 @@ cc_library(
     ],
     hdrs = [
         "include/mlir/Dialect/Arith/IR/Arith.h",
-        "include/mlir/Transforms/InliningUtils.h",
     ],
     includes = ["include"],
     deps = [
@@ -12583,6 +12603,7 @@ cc_library(
         ":InferIntRangeCommon",
         ":InferIntRangeInterface",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":Support",
         ":UBDialect",
         ":VectorInterfaces",
@@ -12744,6 +12765,7 @@ cc_library(
         ":ConvertToLLVMInterface",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":MathBaseIncGen",
         ":MathOpsIncGen",
         ":SideEffectInterfaces",
@@ -12892,6 +12914,7 @@ cc_library(
         ":DialectUtils",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":MemRefBaseIncGen",
         ":MemRefOpsIncGen",
         ":MemorySlotInterfaces",
@@ -13515,6 +13538,7 @@ cc_library(
         ":FunctionInterfaces",
         ":IR",
         ":InferTypeOpInterface",
+        ":InlinerInterface",
         ":MemRefDialect",
         ":SparseTensorDialect",
         ":SubsetOpInterface",
@@ -13912,7 +13936,6 @@ gentbl_cc_library(
 cc_library(
     name = "UBDialect",
     srcs = [
-        "include/mlir/Transforms/InliningUtils.h",
         "lib/Dialect/UB/IR/UBOps.cpp",
     ],
     hdrs = ["include/mlir/Dialect/UB/IR/UBOps.h"],
@@ -13920,6 +13943,7 @@ cc_library(
     deps = [
         ":ConvertToLLVMInterface",
         ":IR",
+        ":InlinerInterface",
         ":SideEffectInterfaces",
         ":UBOpsIncGen",
         ":UBOpsInterfacesIncGen",
diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
index 91706af935ac5e..8139c1d88d7de2 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
@@ -399,6 +399,7 @@ cc_library(
         "//mlir:IR",
         "//mlir:InferIntRangeInterface",
         "//mlir:InferTypeOpInterface",
+        "//mlir:InlinerInterface",
         "//mlir:LLVMDialect",
         "//mlir:LinalgDialect",
         "//mlir:LoopLikeInterface",
@@ -407,7 +408,6 @@ cc_library(
         "//mlir:SideEffectInterfaces",
         "//mlir:Support",
         "//mlir:TensorDialect",
-        "//mlir:TransformUtils",
         "//mlir:Transforms",
         "//mlir:ViewLikeInterface",
     ],
@@ -532,7 +532,7 @@ cc_library(
         "//mlir:PDLInterpDialect",
         "//mlir:Pass",
         "//mlir:Support",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
     ],
 )
 
@@ -570,7 +570,7 @@ cc_library(
         "//mlir:SCFDialect",
         "//mlir:SPIRVDialect",
         "//mlir:Support",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
     ],
 )
 
@@ -600,7 +600,7 @@ cc_library(
         "//mlir:Pass",
         "//mlir:SCFDialect",
         "//mlir:SCFTransforms",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
     ],
 )
 
@@ -695,7 +695,6 @@ cc_library(
         "//mlir:SCFToControlFlow",
         "//mlir:SPIRVDialect",
         "//mlir:ToLLVMIRTranslation",
-        "//mlir:TransformUtils",
         "//mlir:Transforms",
         "//mlir:VectorDialect",
         "//mlir:VectorToLLVM",
@@ -728,7 +727,6 @@ cc_library(
         "//mlir:SCFTransforms",
         "//mlir:TensorDialect",
         "//mlir:TensorTransforms",
-        "//mlir:TransformUtils",
         "//mlir:Transforms",
         "//mlir:VectorDialect",
         "//mlir:VectorToSCF",
@@ -770,7 +768,7 @@ cc_library(
         "//mlir:MathTransforms",
         "//mlir:Pass",
         "//mlir:SCFDialect",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
         "//mlir:VectorDialect",
         "//mlir:X86VectorDialect",
     ],
@@ -786,7 +784,7 @@ cc_library(
         "//mlir:IR",
         "//mlir:MathDialect",
         "//mlir:Pass",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
         "//mlir:VCIXDialect",
         "//mlir:VectorDialect",
     ],
@@ -850,7 +848,7 @@ cc_library(
         "//mlir:Pass",
         "//mlir:SCFDialect",
         "//mlir:Support",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
     ],
 )
 
@@ -869,7 +867,7 @@ cc_library(
         "//mlir:SCFDialect",
         "//mlir:SCFTransforms",
         "//mlir:SCFUtils",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
     ],
 )
 
@@ -994,7 +992,7 @@ cc_library(
         "//mlir:FuncTransforms",
         "//mlir:IR",
         "//mlir:Pass",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
     ],
 )
 
@@ -1033,7 +1031,7 @@ cc_library(
         "//mlir:SCFDialect",
         "//mlir:Support",
         "//mlir:TensorDialect",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
         "//mlir:VectorDialect",
         "//mlir:VectorToSCF",
         "//mlir:VectorTransforms",
@@ -1119,6 +1117,6 @@ cc_library(
         "//mlir:Parser",
         "//mlir:Pass",
         "//mlir:Support",
-        "//mlir:TransformUtils",
+        "//mlir:Transforms",
     ],
 )



More information about the Mlir-commits mailing list