[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

Lei Zhang via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 28 17:30:14 PDT 2023


================
@@ -166,4 +166,35 @@ def SPIRV_ResourceLimitsAttr : SPIRV_Attr<"ResourceLimits", "resource_limits"> {
   let assemblyFormat = "`<` struct(params) `>`";
 }
 
+//===----------------------------------------------------------------------===//
+// SPIRV target attribute.
+//===----------------------------------------------------------------------===//
+
+def SPIRV_TargetAttr : SPIRV_Attr<"SPIRVTarget", "target"> {
----------------
antiagainst wrote:

This attribute is pretty much a duplication of `spirv::TargetEnvAttr` defined in `SPIRVAttributes.h`? We should avoid introducing such duplications and causing confusion. Any reaons we cannot use `spirv::TargetEnvAttr` directly? 

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


More information about the cfe-commits mailing list