[Mlir-commits] [mlir] [mlir][ArmSME][NFC] Include generated interface declarations outside of namespaces (PR #236106)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Oct 27 06:07:42 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Markus Böck (zero9178)

<details>
<summary>Changes</summary>

`ArmSMETileOpInterface` now specifies its `cppNamespace` in ODS, so the generated `ArmSMEOpInterfaces.h.inc` declares it in the right namespace by itself. This allows including the generated header at global scope instead of from within namespace `mlir::arm_sme`.

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


2 Files Affected:

- (modified) mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.h (+1-1) 
- (modified) mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td (+1) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.h b/mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.h
index 9153fbb57ea88e..a03a9353e49c3c 100644
--- a/mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.h
+++ b/mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.h
@@ -20,8 +20,8 @@ LogicalResult verifyArmSMETileOpInterface(Operation *);
 // The first in-memory SME tile ID. This is set to 16 as that is the first tile
 // ID larger than any virtual tile ID supported by the SME ISA.
 static constexpr unsigned kInMemoryTileIdBase = 16;
+} // namespace mlir::arm_sme
 
 #include "mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.h.inc"
-} // namespace mlir::arm_sme
 
 #endif // MLIR_DIALECT_ARMSME_OPINTERFACES_H
diff --git a/mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td b/mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td
index f7fec15ec130e7..10a32f19d89279 100644
--- a/mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td
+++ b/mlir/include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td
@@ -38,6 +38,7 @@ def ArmSMETileType : I32EnumAttr<"ArmSMETileType", "Arm SME tile type",
 }
 
 def ArmSMETileOpInterface : OpInterface<"ArmSMETileOpInterface"> {
+  let cppNamespace = "::mlir::arm_sme";
   let description = [{
     An interface for operations that use Arm SME tiles. These operations need to
     be assigned a tile ID, an i32 attribute, which specifies which virtual tile

``````````

</details>


https://github.com/llvm/llvm-project/pull/236106


More information about the Mlir-commits mailing list