[Mlir-commits] [mlir] [mlir] add missing include to MemRefTransformOps.h (PR #92361)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Thu May 16 01:23:16 PDT 2024


https://github.com/ftynse created https://github.com/llvm/llvm-project/pull/92361

The ODS-generated code has the following:

```
::mlir::TypedValue<::mlir::transform::OperationType> getAlloca() {
  return ::llvm::cast<::mlir::TypedValue<::mlir::transform::OperationType>>(
      *getODSOperands(0).begin());
}
```

that may require the compiler seing the definition of `OperationType` so include the corresponding header.

>From bb7aa791dfcf595d9d43d07c76ad22e6d90c17bc Mon Sep 17 00:00:00 2001
From: Alex Zinenko <ftynse at gmail.com>
Date: Thu, 16 May 2024 10:20:57 +0200
Subject: [PATCH] [mlir] add missing include to MemRefTransformOps.h

The ODS-generated code has the following:

```
::mlir::TypedValue<::mlir::transform::OperationType> getAlloca() {
  return ::llvm::cast<::mlir::TypedValue<::mlir::transform::OperationType>>(
      *getODSOperands(0).begin());
}
```

that may require the compiler seing the definition of `OperationType` so
include the corresponding header.
---
 .../mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h        | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mlir/include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h b/mlir/include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h
index a87767acdd3b8..5ef901ade91d1 100644
--- a/mlir/include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h
+++ b/mlir/include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h
@@ -10,6 +10,7 @@
 #define MLIR_DIALECT_MEMREF_TRANSFORMOPS_MEMREFTRANSFORMOPS_H
 
 #include "mlir/Bytecode/BytecodeOpInterface.h"
+#include "mlir/Dialect/Transform/IR/TransformTypes.h"
 #include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"
 #include "mlir/IR/OpImplementation.h"
 



More information about the Mlir-commits mailing list