[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:41:59 PDT 2025
https://github.com/moscickimilosz created https://github.com/llvm/llvm-project/pull/152148
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.
>From 5443fa94a96b62bc5251a0b6d0e2129bf9b89069 Mon Sep 17 00:00:00 2001
From: Milosz Moscicki <Milosz.Moscicki at imgtec.com>
Date: Tue, 5 Aug 2025 15:30:27 +0100
Subject: [PATCH] [mlir][spirv] Change Spirv.GlobalVariableOp builtin ->
built_in
GlobalVarialeOp 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.
---
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
);
More information about the Mlir-commits
mailing list