[llvm] [mlir] [mlir] NFC: Fix layering check / parse headers violations (PR #110117)

Walter Lee via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 05:37:36 PDT 2024


https://github.com/googlewalt created https://github.com/llvm/llvm-project/pull/110117

Those tools check strict dependency and standalone headers in Google, but some internal build optimizations caused some violations not to be detected.  This change adds a missing dependency, and includes some types that are needed for template instantiation.

>From 9b1b89c4436bcaa447f777ed79f13d4ef7784b5a Mon Sep 17 00:00:00 2001
From: Walter Lee <waltl at google.com>
Date: Thu, 26 Sep 2024 08:31:03 -0400
Subject: [PATCH] [mlir] NFC: Fix layering check / parse headers violations

Those tools check strict dependency and standalone headers in Google,
but some internal build optimizations caused some violations not to be
detected.  This change adds a missing dependency, and includes some
types that are needed for template instantiation.
---
 .../mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h    | 5 +----
 utils/bazel/llvm-project-overlay/mlir/BUILD.bazel            | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h
index db25c9b241734f..9ede21e87cf530 100644
--- a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h
+++ b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h
@@ -14,6 +14,7 @@
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Transform/IR/TransformAttrs.h"
 #include "mlir/Dialect/Transform/IR/TransformDialect.h"
+#include "mlir/Dialect/Transform/IR/TransformTypes.h"
 #include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"
 #include "mlir/Dialect/Utils/StructuredOpsUtils.h"
 #include "mlir/IR/OpImplementation.h"
@@ -42,10 +43,6 @@ class UnPackOp;
 } // namespace tensor
 
 namespace transform {
-class AnyOpType;
-class AnyValueType;
-class OperationType;
-class TransformHandleTypeInterface;
 // Types needed for builders.
 struct TileSizesSpec {};
 struct NumThreadsSpec {};
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index f5437245e8e135..a8b74b2376e71d 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -12370,6 +12370,7 @@ cc_library(
     hdrs = glob(["include/mlir/Dialect/Transform/IR/*.h"]),
     deps = [
         ":Analysis",
+        ":BytecodeOpInterface",
         ":CallOpInterfaces",
         ":CastInterfaces",
         ":ControlFlowInterfaces",



More information about the llvm-commits mailing list