[Mlir-commits] [mlir] [mlir][spirv] Change Spirv.GlobalVariableOp builtin -> built_in (PR #152148)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Aug 5 07:42:56 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: None (moscickimilosz)

<details>
<summary>Changes</summary>

GlobalVariableOp describes that built_in specifies SPIR-V BuiltIn decoration associated with the op. The attribute was defined as builtin in the tablegen (no uderscore). This was causing correct GlobalVariableOp decorations like: built_in("GlobalInvocationId") to be saved as a new attribute making it impossible to access the built_in attribute through getBuiltinAttr.

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


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td (+1-1) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
index 7986025d6ca31..3bd3510fec8f3 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
@@ -451,7 +451,7 @@ def SPIRV_GlobalVariableOp : SPIRV_Op<"GlobalVariable", [InModuleScope, Symbol]>
     OptionalAttr<I32Attr>:$location,
     OptionalAttr<I32Attr>:$binding,
     OptionalAttr<I32Attr>:$descriptor_set,
-    OptionalAttr<StrAttr>:$builtin,
+    OptionalAttr<StrAttr>:$built_in,
     OptionalAttr<SPIRV_LinkageAttributesAttr>:$linkage_attributes
   );
 

``````````

</details>


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


More information about the Mlir-commits mailing list