Skip to content

Conversation

ftynse
Copy link
Member

@ftynse ftynse commented May 16, 2024

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.

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.
@llvmbot
Copy link
Member

llvmbot commented May 16, 2024

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-memref

Author: Oleksandr "Alex" Zinenko (ftynse)

Changes

The ODS-generated code has the following:

::mlir::TypedValue&lt;::mlir::transform::OperationType&gt; getAlloca() {
  return ::llvm::cast&lt;::mlir::TypedValue&lt;::mlir::transform::OperationType&gt;&gt;(
      *getODSOperands(0).begin());
}

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


Full diff: https://github.com/llvm/llvm-project/pull/92361.diff

1 Files Affected:

  • (modified) mlir/include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h (+1)
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"
 

Copy link
Collaborator

@qcolombet qcolombet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ftynse ftynse merged commit e3ed9e3 into llvm:main May 24, 2024
@ftynse ftynse deleted the split branch May 24, 2024 07:33
qiaojbao pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Jun 26, 2024
…02b412774

Local branch amd-gfx 15202b4 Revert blending-shuffle tests
Remote branch main e3ed9e3 [mlir] add missing include to MemRefTransformOps.h (llvm#92361)
steven-studio pushed a commit to steven-studio/llvm-project that referenced this pull request Sep 11, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants