xref: /freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/SPIRVSymbolicOperands.td (revision 67be1e195acfaec99ce4fffeb17111ce085755f7)
1//===- SPIRVSymbolicOperands.td ----------------------------*- tablegen -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines symbolic/named operands for various SPIR-V instructions.
10//
11//===----------------------------------------------------------------------===//
12
13include "llvm/TableGen/SearchableTable.td"
14
15//===----------------------------------------------------------------------===//
16// Lookup table containing symbolic operands with the following columns:
17// - Category (Extension/Capability/BuiltIn/etc.)
18// - Value (32-bit representation for binary emission)
19// - Mnemonic (String representation for textual emission)
20// - MinVersion
21// - MaxVersion
22//===----------------------------------------------------------------------===//
23
24// Forward-declare classes used in SymbolicOperand
25class OperandCategory;
26
27class SymbolicOperand<OperandCategory category, bits<32> value, string mnemonic, bits<32> minVersion, bits<32> maxVersion> {
28  OperandCategory Category = category;
29  bits<32> Value = value;
30  string Mnemonic = mnemonic;
31  bits<32> MinVersion = minVersion;
32  bits<32> MaxVersion = maxVersion;
33}
34
35def SymbolicOperands : GenericTable {
36  let FilterClass = "SymbolicOperand";
37  let Fields = ["Category", "Value", "Mnemonic", "MinVersion", "MaxVersion"];
38  string TypeOf_Category = "OperandCategory";
39  let PrimaryKey = ["Category", "Value"];
40  // Function for looking up symbolic operands based on category and value.
41  let PrimaryKeyName = "lookupSymbolicOperandByCategoryAndValue";
42}
43
44// Function for looking up symbolic operands based on just category.
45def lookupSymbolicOperandByCategory : SearchIndex {
46  let Table = SymbolicOperands;
47  let Key = ["Category"];
48}
49
50// Function for looking up symbolic operands based on category and mnemonic.
51def lookupSymbolicOperandByCategoryAndMnemonic : SearchIndex {
52  let Table = SymbolicOperands;
53  let Key = ["Category", "Mnemonic"];
54}
55
56//===----------------------------------------------------------------------===//
57// Lookup table for matching symbolic operands (category + 32-bit value) to
58// a SPIR-V extension.
59//===----------------------------------------------------------------------===//
60
61// Forward-declare classes used in ExtensionEntry
62class Extension;
63
64class ExtensionEntry<OperandCategory category, bits<32> value, Extension reqExtension> {
65  OperandCategory Category = category;
66  bits<32> Value = value;
67  Extension ReqExtension = reqExtension;
68}
69
70def ExtensionEntries : GenericTable {
71  let FilterClass = "ExtensionEntry";
72  let Fields = ["Category", "Value", "ReqExtension"];
73  string TypeOf_Category = "OperandCategory";
74  string TypeOf_ReqExtension = "Extension";
75  let PrimaryKey = ["Category", "Value"];
76  // Function for looking up the extension by category + value.
77  let PrimaryKeyName = "lookupExtensionByCategoryAndValue";
78}
79
80// Function to lookup symbolic operands enabled by a given extension.
81def lookupSymbolicOperandsEnabledByExtension : SearchIndex {
82  let Table = ExtensionEntries;
83  let Key = ["ReqExtension", "Category"];
84}
85
86//===----------------------------------------------------------------------===//
87// Lookup table for matching symbolic operands (category + 32-bit value) to
88// SPIR-V capabilities. If an operand requires more than one capability, there
89// will be multiple consecutive entries present in the table.
90//===----------------------------------------------------------------------===//
91
92// Forward-declare classes used in ExtensionEntry
93class Capability;
94
95class CapabilityEntry<OperandCategory category, bits<32> value, Capability reqCabaility> {
96  OperandCategory Category = category;
97  bits<32> Value = value;
98  Capability ReqCapability = reqCabaility;
99}
100
101def CapabilityEntries : GenericTable {
102  let FilterClass = "CapabilityEntry";
103  let Fields = ["Category", "Value", "ReqCapability"];
104  string TypeOf_Category = "OperandCategory";
105  string TypeOf_ReqCapability = "Capability";
106  let PrimaryKey = ["Category", "Value"];
107  // Function for looking up a (the first) capability by category + value. Next
108  // capabilities should be consecutive.
109  let PrimaryKeyName = "lookupCapabilityByCategoryAndValue";
110}
111
112//===----------------------------------------------------------------------===//
113// Multiclass used to define a SymbolicOperand and at the same time declare
114// required extension and capabilities.
115//===----------------------------------------------------------------------===//
116
117multiclass SymbolicOperandWithRequirements<OperandCategory category, bits<32> value, string mnemonic, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
118    assert !ge(!size(mnemonic), 1), "No mnemonic/string representation provided for symbolic operand with value " # value;
119    def : SymbolicOperand<category, value, mnemonic, minVersion, maxVersion>;
120
121    assert !le(!size(reqExtensions), 1), "Too many required extensions for a symbolic/named operand: " # mnemonic;
122    if !eq(!size(reqExtensions), 1) then {
123        def : ExtensionEntry<category, value, reqExtensions[0]>;
124    }
125
126    foreach capability = reqCapabilities in {
127        def : CapabilityEntry<category, value, capability>;
128    }
129}
130
131//===----------------------------------------------------------------------===//
132// Enum defining different categories of symbolic/named operands.
133//===----------------------------------------------------------------------===//
134
135def OperandCategory : GenericEnum {
136  let FilterClass = "OperandCategory";
137}
138
139class OperandCategory;
140
141def ExtensionOperand : OperandCategory;
142def CapabilityOperand : OperandCategory;
143def SourceLanguageOperand : OperandCategory;
144def AddressingModelOperand : OperandCategory;
145def ExecutionModelOperand : OperandCategory;
146def MemoryModelOperand : OperandCategory;
147def ExecutionModeOperand : OperandCategory;
148def StorageClassOperand : OperandCategory;
149def DimOperand : OperandCategory;
150def SamplerAddressingModeOperand : OperandCategory;
151def SamplerFilterModeOperand : OperandCategory;
152def ImageFormatOperand : OperandCategory;
153def ImageChannelOrderOperand : OperandCategory;
154def ImageChannelDataTypeOperand : OperandCategory;
155def ImageOperandOperand : OperandCategory;
156def FPFastMathModeOperand : OperandCategory;
157def FPRoundingModeOperand : OperandCategory;
158def LinkageTypeOperand : OperandCategory;
159def AccessQualifierOperand : OperandCategory;
160def FunctionParameterAttributeOperand : OperandCategory;
161def DecorationOperand : OperandCategory;
162def BuiltInOperand : OperandCategory;
163def SelectionControlOperand : OperandCategory;
164def LoopControlOperand : OperandCategory;
165def FunctionControlOperand : OperandCategory;
166def MemorySemanticsOperand : OperandCategory;
167def MemoryOperandOperand : OperandCategory;
168def ScopeOperand : OperandCategory;
169def GroupOperationOperand : OperandCategory;
170def KernelEnqueueFlagsOperand : OperandCategory;
171def KernelProfilingInfoOperand : OperandCategory;
172def OpcodeOperand : OperandCategory;
173
174//===----------------------------------------------------------------------===//
175// Multiclass used to define Extesions enum values and at the same time
176// SymbolicOperand entries.
177//===----------------------------------------------------------------------===//
178
179def Extension : GenericEnum, Operand<i32> {
180  let FilterClass = "Extension";
181  let NameField = "Name";
182  let ValueField = "Value";
183  let PrintMethod = "printExtension";
184}
185
186class Extension<string name, bits<32> value> {
187  string Name = name;
188  bits<32> Value = value;
189}
190
191multiclass ExtensionOperand<bits<32> value> {
192  def NAME : Extension<NAME, value>;
193  defm : SymbolicOperandWithRequirements<ExtensionOperand, value, NAME, 0, 0, [], []>;
194}
195
196defm SPV_AMD_shader_explicit_vertex_parameter : ExtensionOperand<1>;
197defm SPV_AMD_shader_trinary_minmax_extension : ExtensionOperand<2>;
198defm SPV_AMD_gcn_shader : ExtensionOperand<3>;
199defm SPV_KHR_shader_ballot : ExtensionOperand<4>;
200defm SPV_AMD_shader_ballot : ExtensionOperand<5>;
201defm SPV_AMD_gpu_shader_half_float : ExtensionOperand<6>;
202defm SPV_KHR_shader_draw_parameters : ExtensionOperand<7>;
203defm SPV_KHR_subgroup_vote : ExtensionOperand<8>;
204defm SPV_KHR_16bit_storage : ExtensionOperand<9>;
205defm SPV_KHR_device_group : ExtensionOperand<10>;
206defm SPV_KHR_multiview : ExtensionOperand<11>;
207defm SPV_NVX_multiview_per_view_attributes : ExtensionOperand<12>;
208defm SPV_NV_viewport_array2 : ExtensionOperand<13>;
209defm SPV_NV_stereo_view_rendering : ExtensionOperand<14>;
210defm SPV_NV_sample_mask_override_coverage : ExtensionOperand<15>;
211defm SPV_NV_geometry_shader_passthrough : ExtensionOperand<16>;
212defm SPV_AMD_texture_gather_bias_lod : ExtensionOperand<17>;
213defm SPV_KHR_storage_buffer_storage_class : ExtensionOperand<18>;
214defm SPV_KHR_variable_pointers : ExtensionOperand<19>;
215defm SPV_AMD_gpu_shader_int16 : ExtensionOperand<20>;
216defm SPV_KHR_post_depth_coverage : ExtensionOperand<21>;
217defm SPV_KHR_shader_atomic_counter_ops : ExtensionOperand<22>;
218defm SPV_EXT_shader_stencil_export : ExtensionOperand<23>;
219defm SPV_EXT_shader_viewport_index_layer : ExtensionOperand<24>;
220defm SPV_AMD_shader_image_load_store_lod : ExtensionOperand<25>;
221defm SPV_AMD_shader_fragment_mask : ExtensionOperand<26>;
222defm SPV_EXT_fragment_fully_covered : ExtensionOperand<27>;
223defm SPV_AMD_gpu_shader_half_float_fetch : ExtensionOperand<28>;
224defm SPV_GOOGLE_decorate_string : ExtensionOperand<29>;
225defm SPV_GOOGLE_hlsl_functionality1 : ExtensionOperand<30>;
226defm SPV_NV_shader_subgroup_partitioned : ExtensionOperand<31>;
227defm SPV_EXT_descriptor_indexing : ExtensionOperand<32>;
228defm SPV_KHR_8bit_storage : ExtensionOperand<33>;
229defm SPV_KHR_vulkan_memory_model : ExtensionOperand<34>;
230defm SPV_NV_ray_tracing : ExtensionOperand<35>;
231defm SPV_NV_compute_shader_derivatives : ExtensionOperand<36>;
232defm SPV_NV_fragment_shader_barycentric : ExtensionOperand<37>;
233defm SPV_NV_mesh_shader : ExtensionOperand<38>;
234defm SPV_NV_shader_image_footprint : ExtensionOperand<39>;
235defm SPV_NV_shading_rate : ExtensionOperand<40>;
236defm SPV_INTEL_subgroups : ExtensionOperand<41>;
237defm SPV_INTEL_media_block_io : ExtensionOperand<42>;
238defm SPV_EXT_fragment_invocation_density : ExtensionOperand<44>;
239defm SPV_KHR_no_integer_wrap_decoration : ExtensionOperand<45>;
240defm SPV_KHR_float_controls : ExtensionOperand<46>;
241defm SPV_EXT_physical_storage_buffer : ExtensionOperand<47>;
242defm SPV_INTEL_fpga_memory_attributes : ExtensionOperand<48>;
243defm SPV_NV_cooperative_matrix : ExtensionOperand<49>;
244defm SPV_INTEL_shader_integer_functions2 : ExtensionOperand<50>;
245defm SPV_INTEL_fpga_loop_controls : ExtensionOperand<51>;
246defm SPV_EXT_fragment_shader_interlock : ExtensionOperand<52>;
247defm SPV_NV_shader_sm_builtins : ExtensionOperand<53>;
248defm SPV_KHR_shader_clock : ExtensionOperand<54>;
249defm SPV_INTEL_unstructured_loop_controls : ExtensionOperand<55>;
250defm SPV_EXT_demote_to_helper_invocation : ExtensionOperand<56>;
251defm SPV_INTEL_fpga_reg : ExtensionOperand<57>;
252defm SPV_INTEL_blocking_pipes : ExtensionOperand<58>;
253defm SPV_GOOGLE_user_type : ExtensionOperand<59>;
254defm SPV_KHR_physical_storage_buffer : ExtensionOperand<60>;
255defm SPV_INTEL_kernel_attributes : ExtensionOperand<61>;
256defm SPV_KHR_non_semantic_info : ExtensionOperand<62>;
257defm SPV_INTEL_io_pipes : ExtensionOperand<63>;
258defm SPV_KHR_ray_tracing : ExtensionOperand<64>;
259defm SPV_KHR_ray_query : ExtensionOperand<65>;
260defm SPV_INTEL_fpga_memory_accesses : ExtensionOperand<66>;
261defm SPV_INTEL_arbitrary_precision_integers : ExtensionOperand<67>;
262defm SPV_EXT_shader_atomic_float_add : ExtensionOperand<68>;
263defm SPV_KHR_terminate_invocation : ExtensionOperand<69>;
264defm SPV_KHR_fragment_shading_rate : ExtensionOperand<70>;
265defm SPV_EXT_shader_image_int64 : ExtensionOperand<71>;
266defm SPV_INTEL_fp_fast_math_mode : ExtensionOperand<72>;
267defm SPV_INTEL_fpga_cluster_attributes : ExtensionOperand<73>;
268defm SPV_INTEL_loop_fuse : ExtensionOperand<74>;
269defm SPV_EXT_shader_atomic_float_min_max : ExtensionOperand<75>;
270defm SPV_KHR_workgroup_memory_explicit_layout : ExtensionOperand<76>;
271defm SPV_KHR_linkonce_odr : ExtensionOperand<77>;
272defm SPV_KHR_expect_assume : ExtensionOperand<78>;
273defm SPV_INTEL_fpga_dsp_control : ExtensionOperand<79>;
274defm SPV_NV_bindless_texture : ExtensionOperand<80>;
275defm SPV_INTEL_fpga_invocation_pipelining_attributes : ExtensionOperand<81>;
276defm SPV_KHR_subgroup_uniform_control_flow : ExtensionOperand<82>;
277defm SPV_HUAWEI_subpass_shading : ExtensionOperand<83>;
278defm SPV_KHR_integer_dot_product : ExtensionOperand<84>;
279defm SPV_EXT_shader_atomic_float16_add : ExtensionOperand<85>;
280defm SPV_INTEL_runtime_aligned : ExtensionOperand<86>;
281defm SPV_KHR_bit_instructions : ExtensionOperand<87>;
282defm SPV_NV_ray_tracing_motion_blur : ExtensionOperand<88>;
283defm SPV_KHR_uniform_group_instructions : ExtensionOperand<89>;
284defm SPV_KHR_subgroup_rotate : ExtensionOperand<90>;
285defm SPV_INTEL_split_barrier : ExtensionOperand<91>;
286defm SPV_KHR_ray_cull_mask : ExtensionOperand<92>;
287defm SPV_KHR_fragment_shader_barycentric : ExtensionOperand<93>;
288defm SPV_EXT_relaxed_printf_string_address_space : ExtensionOperand<94>;
289defm SPV_EXT_ycbcr_attachments : ExtensionOperand<95>;
290defm SPV_EXT_mesh_shader : ExtensionOperand<96>;
291defm SPV_ARM_core_builtins : ExtensionOperand<97>;
292defm SPV_EXT_opacity_micromap : ExtensionOperand<98>;
293defm SPV_NV_shader_invocation_reorder : ExtensionOperand<99>;
294defm SPV_INTEL_usm_storage_classes : ExtensionOperand<100>;
295defm SPV_INTEL_fpga_latency_control : ExtensionOperand<101>;
296defm SPV_INTEL_fpga_argument_interfaces : ExtensionOperand<102>;
297defm SPV_INTEL_optnone : ExtensionOperand<103>;
298
299//===----------------------------------------------------------------------===//
300// Multiclass used to define Capabilities enum values and at the same time
301// SymbolicOperand entries with string mnemonics, versioning, extensions, and
302// capabilities.
303//===----------------------------------------------------------------------===//
304
305def Capability : GenericEnum, Operand<i32> {
306  let FilterClass = "Capability";
307  let NameField = "Name";
308  let ValueField = "Value";
309  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
310}
311
312class Capability<string name, bits<32> value> {
313  string Name = name;
314  bits<32> Value = value;
315}
316
317multiclass CapabilityOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
318  def NAME : Capability<NAME, value>;
319  defm : SymbolicOperandWithRequirements<CapabilityOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
320}
321
322defm Matrix : CapabilityOperand<0, 0, 0, [], []>;
323defm Shader : CapabilityOperand<1, 0, 0, [], [Matrix]>;
324defm Geometry : CapabilityOperand<2, 0, 0, [], [Shader]>;
325defm Tessellation : CapabilityOperand<3, 0, 0, [], [Shader]>;
326defm Addresses : CapabilityOperand<4, 0, 0, [], []>;
327defm Linkage : CapabilityOperand<5, 0, 0, [], []>;
328defm Kernel : CapabilityOperand<6, 0, 0, [], []>;
329defm Vector16 : CapabilityOperand<7, 0, 0, [], [Kernel]>;
330defm Float16Buffer : CapabilityOperand<8, 0, 0, [], [Kernel]>;
331defm Float16 : CapabilityOperand<9, 0, 0, [], []>;
332defm Float64 : CapabilityOperand<10, 0, 0, [], []>;
333defm Int64 : CapabilityOperand<11, 0, 0, [], []>;
334defm Int64Atomics : CapabilityOperand<12, 0, 0, [], [Int64]>;
335defm ImageBasic : CapabilityOperand<13, 0, 0, [], [Kernel]>;
336defm ImageReadWrite : CapabilityOperand<14, 0, 0, [], [ImageBasic]>;
337defm ImageMipmap : CapabilityOperand<15, 0, 0, [], [ImageBasic]>;
338defm Pipes : CapabilityOperand<17, 0, 0, [], [Kernel]>;
339defm Groups : CapabilityOperand<18, 0, 0, [], []>;
340defm DeviceEnqueue : CapabilityOperand<19, 0, 0, [], []>;
341defm LiteralSampler : CapabilityOperand<20, 0, 0, [], [Kernel]>;
342defm AtomicStorage : CapabilityOperand<21, 0, 0, [], [Shader]>;
343defm Int16 : CapabilityOperand<22, 0, 0, [], []>;
344defm TessellationPointSize : CapabilityOperand<23, 0, 0, [], [Tessellation]>;
345defm GeometryPointSize : CapabilityOperand<24, 0, 0, [], [Geometry]>;
346defm ImageGatherExtended : CapabilityOperand<25, 0, 0, [], [Shader]>;
347defm StorageImageMultisample : CapabilityOperand<27, 0, 0, [], [Shader]>;
348defm UniformBufferArrayDynamicIndexing : CapabilityOperand<28, 0, 0, [], [Shader]>;
349defm SampledImageArrayDymnamicIndexing : CapabilityOperand<29, 0, 0, [], [Shader]>;
350defm ClipDistance : CapabilityOperand<32, 0, 0, [], [Shader]>;
351defm CullDistance : CapabilityOperand<33, 0, 0, [], [Shader]>;
352defm SampleRateShading : CapabilityOperand<35, 0, 0, [], [Shader]>;
353defm SampledRect : CapabilityOperand<37, 0, 0, [], [Shader]>;
354defm ImageRect : CapabilityOperand<36, 0, 0, [], [SampledRect]>;
355defm GenericPointer : CapabilityOperand<38, 0, 0, [], [Addresses]>;
356defm Int8 : CapabilityOperand<39, 0, 0, [], []>;
357defm InputAttachment : CapabilityOperand<40, 0, 0, [], [Shader]>;
358defm SparseResidency : CapabilityOperand<41, 0, 0, [], [Shader]>;
359defm MinLod : CapabilityOperand<42, 0, 0, [], [Shader]>;
360defm Sampled1D : CapabilityOperand<43, 0, 0, [], []>;
361defm Image1D : CapabilityOperand<44, 0, 0, [], [Sampled1D]>;
362defm SampledCubeArray : CapabilityOperand<45, 0, 0, [], [Shader]>;
363defm ImageCubeArray : CapabilityOperand<34, 0, 0, [], [SampledCubeArray]>;
364defm SampledBuffer : CapabilityOperand<46, 0, 0, [], []>;
365defm ImageBuffer : CapabilityOperand<47, 0, 0, [], [SampledBuffer]>;
366defm ImageMSArray : CapabilityOperand<48, 0, 0, [], [Shader]>;
367defm StorageImageExtendedFormats : CapabilityOperand<49, 0, 0, [], [Shader]>;
368defm ImageQuery : CapabilityOperand<50, 0, 0, [], [Shader]>;
369defm DerivativeControl : CapabilityOperand<51, 0, 0, [], [Shader]>;
370defm InterpolationFunction : CapabilityOperand<52, 0, 0, [], [Shader]>;
371defm TransformFeedback : CapabilityOperand<53, 0, 0, [], [Shader]>;
372defm GeometryStreams : CapabilityOperand<54, 0, 0, [], [Geometry]>;
373defm StorageImageReadWithoutFormat : CapabilityOperand<55, 0, 0, [], [Shader]>;
374defm StorageImageWriteWithoutFormat : CapabilityOperand<56, 0, 0, [], [Shader]>;
375defm MultiViewport : CapabilityOperand<57, 0, 0, [], [Geometry]>;
376defm SubgroupDispatch : CapabilityOperand<58, 0x10100, 0, [], [DeviceEnqueue]>;
377defm NamedBarrier : CapabilityOperand<59, 0x10100, 0, [], [Kernel]>;
378defm PipeStorage : CapabilityOperand<60, 0x10100, 0, [], [Pipes]>;
379defm GroupNonUniform : CapabilityOperand<61, 0x10300, 0, [], []>;
380defm GroupNonUniformVote : CapabilityOperand<62, 0x10300, 0, [], [GroupNonUniform]>;
381defm GroupNonUniformArithmetic : CapabilityOperand<63, 0x10300, 0, [], [GroupNonUniform]>;
382defm GroupNonUniformBallot : CapabilityOperand<64, 0x10300, 0, [], [GroupNonUniform]>;
383defm GroupNonUniformShuffle : CapabilityOperand<65, 0x10300, 0, [], [GroupNonUniform]>;
384defm GroupNonUniformShuffleRelative : CapabilityOperand<66, 0x10300, 0, [], [GroupNonUniform]>;
385defm GroupNonUniformClustered : CapabilityOperand<67, 0x10300, 0, [], [GroupNonUniform]>;
386defm GroupNonUniformQuad : CapabilityOperand<68, 0x10300, 0, [], [GroupNonUniform]>;
387defm SubgroupBallotKHR : CapabilityOperand<4423, 0, 0, [SPV_KHR_shader_ballot], []>;
388defm DrawParameters : CapabilityOperand<4427, 0x10300, 0, [SPV_KHR_shader_draw_parameters], [Shader]>;
389defm SubgroupVoteKHR : CapabilityOperand<4431, 0, 0, [SPV_KHR_subgroup_vote], []>;
390defm StorageBuffer16BitAccess : CapabilityOperand<4433, 0x10300, 0, [SPV_KHR_16bit_storage], []>;
391defm StorageUniform16 : CapabilityOperand<4434, 0x10300, 0, [SPV_KHR_16bit_storage], [StorageBuffer16BitAccess]>;
392defm StoragePushConstant16 : CapabilityOperand<4435, 0x10300, 0, [SPV_KHR_16bit_storage], []>;
393defm StorageInputOutput16 : CapabilityOperand<4436, 0x10300, 0, [SPV_KHR_16bit_storage], []>;
394defm DeviceGroup : CapabilityOperand<4437, 0x10300, 0, [SPV_KHR_device_group], []>;
395defm MultiView : CapabilityOperand<4439, 0x10300, 0, [SPV_KHR_multiview], [Shader]>;
396defm VariablePointersStorageBuffer : CapabilityOperand<4441, 0x10300, 0, [SPV_KHR_variable_pointers], [Shader]>;
397defm VariablePointers : CapabilityOperand<4442, 0x10300, 0, [SPV_KHR_variable_pointers], [VariablePointersStorageBuffer]>;
398defm AtomicStorageOps : CapabilityOperand<4445, 0, 0, [SPV_KHR_shader_atomic_counter_ops], []>;
399defm SampleMaskPostDepthCoverage : CapabilityOperand<4447, 0, 0, [SPV_KHR_post_depth_coverage], []>;
400defm StorageBuffer8BitAccess : CapabilityOperand<4448, 0, 0, [SPV_KHR_8bit_storage], []>;
401defm UniformAndStorageBuffer8BitAccess : CapabilityOperand<4449, 0, 0, [SPV_KHR_8bit_storage], [StorageBuffer8BitAccess]>;
402defm StoragePushConstant8 : CapabilityOperand<4450, 0, 0, [SPV_KHR_8bit_storage], []>;
403defm DenormPreserve : CapabilityOperand<4464, 0x10400, 0, [SPV_KHR_float_controls], []>;
404defm DenormFlushToZero : CapabilityOperand<4465, 0x10400, 0, [SPV_KHR_float_controls], []>;
405defm SignedZeroInfNanPreserve : CapabilityOperand<4466, 0x10400, 0, [SPV_KHR_float_controls], []>;
406defm RoundingModeRTE : CapabilityOperand<4467, 0x10400, 0, [SPV_KHR_float_controls], []>;
407defm RoundingModeRTZ : CapabilityOperand<4468, 0x10400, 0, [SPV_KHR_float_controls], []>;
408defm Float16ImageAMD : CapabilityOperand<5008, 0, 0, [], [Shader]>;
409defm ImageGatherBiasLodAMD : CapabilityOperand<5009, 0, 0, [], [Shader]>;
410defm FragmentMaskAMD : CapabilityOperand<5010, 0, 0, [], [Shader]>;
411defm StencilExportEXT : CapabilityOperand<5013, 0, 0, [], [Shader]>;
412defm ImageReadWriteLodAMD : CapabilityOperand<5015, 0, 0, [], [Shader]>;
413defm SampleMaskOverrideCoverageNV : CapabilityOperand<5249, 0, 0, [], [SampleRateShading]>;
414defm GeometryShaderPassthroughNV : CapabilityOperand<5251, 0, 0, [], [Geometry]>;
415defm ShaderViewportIndexLayerEXT : CapabilityOperand<5254, 0, 0, [], [MultiViewport]>;
416defm ShaderViewportMaskNV : CapabilityOperand<5255, 0, 0, [], [ShaderViewportIndexLayerEXT]>;
417defm ShaderStereoViewNV : CapabilityOperand<5259, 0, 0, [], [ShaderViewportMaskNV]>;
418defm PerViewAttributesNV : CapabilityOperand<5260, 0, 0, [], [MultiView]>;
419defm FragmentFullyCoveredEXT : CapabilityOperand<5265, 0, 0, [], [Shader]>;
420defm MeshShadingNV : CapabilityOperand<5266, 0, 0, [], [Shader]>;
421defm ShaderNonUniformEXT : CapabilityOperand<5301, 0, 0, [], [Shader]>;
422defm RuntimeDescriptorArrayEXT : CapabilityOperand<5302, 0, 0, [], [Shader]>;
423defm InputAttachmentArrayDynamicIndexingEXT : CapabilityOperand<5303, 0, 0, [], [InputAttachment]>;
424defm UniformTexelBufferArrayDynamicIndexingEXT : CapabilityOperand<5304, 0, 0, [], [SampledBuffer]>;
425defm StorageTexelBufferArrayDynamicIndexingEXT : CapabilityOperand<5305, 0, 0, [], [ImageBuffer]>;
426defm UniformBufferArrayNonUniformIndexingEXT : CapabilityOperand<5306, 0, 0, [], [ShaderNonUniformEXT]>;
427defm SampledImageArrayNonUniformIndexingEXT : CapabilityOperand<5307, 0, 0, [], [ShaderNonUniformEXT]>;
428defm StorageBufferArrayNonUniformIndexingEXT : CapabilityOperand<5308, 0, 0, [], [ShaderNonUniformEXT]>;
429defm StorageImageArrayNonUniformIndexingEXT : CapabilityOperand<5309, 0, 0, [], [ShaderNonUniformEXT]>;
430defm InputAttachmentArrayNonUniformIndexingEXT : CapabilityOperand<5310, 0, 0, [], [InputAttachment, ShaderNonUniformEXT]>;
431defm UniformTexelBufferArrayNonUniformIndexingEXT : CapabilityOperand<5311, 0, 0, [], [SampledBuffer, ShaderNonUniformEXT]>;
432defm StorageTexelBufferArrayNonUniformIndexingEXT : CapabilityOperand<5312, 0, 0, [], [ImageBuffer, ShaderNonUniformEXT]>;
433defm RayTracingNV : CapabilityOperand<5340, 0, 0, [], [Shader]>;
434defm SubgroupShuffleINTEL : CapabilityOperand<5568, 0, 0, [], []>;
435defm SubgroupBufferBlockIOINTEL : CapabilityOperand<5569, 0, 0, [], []>;
436defm SubgroupImageBlockIOINTEL : CapabilityOperand<5570, 0, 0, [], []>;
437defm SubgroupImageMediaBlockIOINTEL : CapabilityOperand<5579, 0, 0, [], []>;
438defm SubgroupAvcMotionEstimationINTEL : CapabilityOperand<5696, 0, 0, [], []>;
439defm SubgroupAvcMotionEstimationIntraINTEL : CapabilityOperand<5697, 0, 0, [], []>;
440defm SubgroupAvcMotionEstimationChromaINTEL : CapabilityOperand<5698, 0, 0, [], []>;
441defm GroupNonUniformPartitionedNV : CapabilityOperand<5297, 0, 0, [], []>;
442defm VulkanMemoryModelKHR : CapabilityOperand<5345, 0, 0, [], []>;
443defm VulkanMemoryModelDeviceScopeKHR : CapabilityOperand<5346, 0, 0, [], []>;
444defm ImageFootprintNV : CapabilityOperand<5282, 0, 0, [], []>;
445defm FragmentBarycentricNV : CapabilityOperand<5284, 0, 0, [], []>;
446defm ComputeDerivativeGroupQuadsNV : CapabilityOperand<5288, 0, 0, [], []>;
447defm ComputeDerivativeGroupLinearNV : CapabilityOperand<5350, 0, 0, [], []>;
448defm FragmentDensityEXT : CapabilityOperand<5291, 0, 0, [], [Shader]>;
449defm PhysicalStorageBufferAddressesEXT : CapabilityOperand<5347, 0, 0, [], [Shader]>;
450defm CooperativeMatrixNV : CapabilityOperand<5357, 0, 0, [], [Shader]>;
451defm ArbitraryPrecisionIntegersINTEL : CapabilityOperand<5844, 0, 0, [SPV_INTEL_arbitrary_precision_integers], [Int8, Int16]>;
452defm OptNoneINTEL : CapabilityOperand<6094, 0, 0, [SPV_INTEL_optnone], []>;
453defm BitInstructions : CapabilityOperand<6025, 0, 0, [SPV_KHR_bit_instructions], []>;
454defm ExpectAssumeKHR : CapabilityOperand<5629, 0, 0, [SPV_KHR_expect_assume], []>;
455
456//===----------------------------------------------------------------------===//
457// Multiclass used to define SourceLanguage enum values and at the same time
458// SymbolicOperand entries.
459//===----------------------------------------------------------------------===//
460
461def SourceLanguage : GenericEnum, Operand<i32> {
462  let FilterClass = "SourceLanguage";
463  let NameField = "Name";
464  let ValueField = "Value";
465  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
466}
467
468class SourceLanguage<string name, bits<32> value> {
469  string Name = name;
470  bits<32> Value = value;
471}
472
473multiclass SourceLanguageOperand<bits<32> value> {
474  def : SourceLanguage<NAME, value>;
475  defm : SymbolicOperandWithRequirements<SourceLanguageOperand, value, NAME, 0, 0, [], []>;
476}
477
478defm Unknown : SourceLanguageOperand<0>;
479defm ESSL : SourceLanguageOperand<1>;
480defm GLSL : SourceLanguageOperand<2>;
481defm OpenCL_C : SourceLanguageOperand<3>;
482defm OpenCL_CPP : SourceLanguageOperand<4>;
483defm HLSL : SourceLanguageOperand<5>;
484
485//===----------------------------------------------------------------------===//
486// Multiclass used to define AddressingModel enum values and at the same time
487// SymbolicOperand entries with string mnemonics, and capabilities.
488//===----------------------------------------------------------------------===//
489
490def AddressingModel : GenericEnum, Operand<i32> {
491  let FilterClass = "AddressingModel";
492  let NameField = "Name";
493  let ValueField = "Value";
494  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
495}
496
497class AddressingModel<string name, bits<32> value> {
498  string Name = name;
499  bits<32> Value = value;
500}
501
502multiclass AddressingModelOperand<bits<32> value, list<Capability> reqCapabilities> {
503  def : AddressingModel<NAME, value>;
504  defm : SymbolicOperandWithRequirements<AddressingModelOperand, value, NAME, 0, 0, [], reqCapabilities>;
505}
506
507defm Logical : AddressingModelOperand<0, []>;
508defm Physical32 : AddressingModelOperand<1, [Addresses]>;
509defm Physical64 : AddressingModelOperand<2, [Addresses]>;
510defm PhysicalStorageBuffer64EXT : AddressingModelOperand<5348, [PhysicalStorageBufferAddressesEXT]>;
511
512//===----------------------------------------------------------------------===//
513// Multiclass used to define ExecutionModel enum values and at the same time
514// SymbolicOperand entries with string mnemonics and capabilities.
515//===----------------------------------------------------------------------===//
516
517def ExecutionModel : GenericEnum, Operand<i32> {
518  let FilterClass = "ExecutionModel";
519  let NameField = "Name";
520  let ValueField = "Value";
521  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
522}
523
524class ExecutionModel<string name, bits<32> value> {
525  string Name = name;
526  bits<32> Value = value;
527}
528
529multiclass ExecutionModelOperand<bits<32> value, list<Capability> reqCapabilities> {
530  def : ExecutionModel<NAME, value>;
531  defm : SymbolicOperandWithRequirements<ExecutionModelOperand, value, NAME, 0, 0, [], reqCapabilities>;
532}
533
534defm Vertex : ExecutionModelOperand<0, [Shader]>;
535defm TessellationControl: ExecutionModelOperand<1, [Tessellation]>;
536defm TessellationEvaluation: ExecutionModelOperand<2, [Tessellation]>;
537defm Geometry: ExecutionModelOperand<3, [Geometry]>;
538defm Fragment: ExecutionModelOperand<4, [Shader]>;
539defm GLCompute: ExecutionModelOperand<5, [Shader]>;
540defm Kernel: ExecutionModelOperand<6, [Kernel]>;
541defm TaskNV: ExecutionModelOperand<5267, [MeshShadingNV]>;
542defm MeshNV: ExecutionModelOperand<5268, [MeshShadingNV]>;
543defm RayGenerationNV: ExecutionModelOperand<5313, [RayTracingNV]>;
544defm IntersectionNV: ExecutionModelOperand<5314, [RayTracingNV]>;
545defm AnyHitNV: ExecutionModelOperand<5315, [RayTracingNV]>;
546defm ClosestHitNV: ExecutionModelOperand<5316, [RayTracingNV]>;
547defm MissNV: ExecutionModelOperand<5317, [RayTracingNV]>;
548defm CallableNV: ExecutionModelOperand<5318, [RayTracingNV]>;
549
550//===----------------------------------------------------------------------===//
551// Multiclass used to define MemoryModel enum values and at the same time
552// SymbolicOperand entries with string mnemonics and capabilities.
553//===----------------------------------------------------------------------===//
554
555def MemoryModel : GenericEnum, Operand<i32> {
556  let FilterClass = "MemoryModel";
557  let NameField = "Name";
558  let ValueField = "Value";
559  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
560}
561
562class MemoryModel<string name, bits<32> value> {
563  string Name = name;
564  bits<32> Value = value;
565}
566
567multiclass MemoryModelOperand<bits<32> value, list<Capability> reqCapabilities> {
568  def : MemoryModel<NAME, value>;
569  defm : SymbolicOperandWithRequirements<MemoryModelOperand, value, NAME, 0, 0, [], reqCapabilities>;
570}
571
572defm Simple : MemoryModelOperand<0, [Shader]>;
573defm GLSL450 : MemoryModelOperand<1, [Shader]>;
574defm OpenCL : MemoryModelOperand<2, [Kernel]>;
575defm VulkanKHR : MemoryModelOperand<3, [VulkanMemoryModelKHR]>;
576
577//===----------------------------------------------------------------------===//
578// Multiclass used to define ExecutionMode enum values and at the same time
579// SymbolicOperand entries with string mnemonics and capabilities.
580//===----------------------------------------------------------------------===//
581
582def ExecutionMode : GenericEnum, Operand<i32> {
583  let FilterClass = "ExecutionMode";
584  let NameField = "Name";
585  let ValueField = "Value";
586  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
587}
588
589class ExecutionMode<string name, bits<32> value> {
590  string Name = name;
591  bits<32> Value = value;
592}
593
594multiclass ExecutionModeOperand<bits<32> value, list<Capability> reqCapabilities> {
595  def : ExecutionMode<NAME, value>;
596  defm : SymbolicOperandWithRequirements<ExecutionModeOperand, value, NAME, 0, 0, [], reqCapabilities>;
597}
598
599defm Invocations : ExecutionModeOperand<0, [Geometry]>;
600defm SpacingEqual : ExecutionModeOperand<1, [Tessellation]>;
601defm SpacingFractionalEven : ExecutionModeOperand<2, [Tessellation]>;
602defm SpacingFractionalOdd : ExecutionModeOperand<3, [Tessellation]>;
603defm VertexOrderCw : ExecutionModeOperand<4, [Tessellation]>;
604defm VertexOrderCcw : ExecutionModeOperand<5, [Tessellation]>;
605defm PixelCenterInteger : ExecutionModeOperand<6, [Shader]>;
606defm OriginUpperLeft : ExecutionModeOperand<7, [Shader]>;
607defm OriginLowerLeft : ExecutionModeOperand<8, [Shader]>;
608defm EarlyFragmentTests : ExecutionModeOperand<9, [Shader]>;
609defm PointMode : ExecutionModeOperand<10, [Tessellation]>;
610defm Xfb : ExecutionModeOperand<11, [TransformFeedback]>;
611defm DepthReplacing : ExecutionModeOperand<12, [Shader]>;
612defm DepthGreater : ExecutionModeOperand<14, [Shader]>;
613defm DepthLess : ExecutionModeOperand<15, [Shader]>;
614defm DepthUnchanged : ExecutionModeOperand<16, [Shader]>;
615defm LocalSize : ExecutionModeOperand<17, []>;
616defm LocalSizeHint : ExecutionModeOperand<18, [Kernel]>;
617defm InputPoints : ExecutionModeOperand<19, [Geometry]>;
618defm InputLines : ExecutionModeOperand<20, [Geometry]>;
619defm InputLinesAdjacency : ExecutionModeOperand<21, [Geometry]>;
620defm Triangles : ExecutionModeOperand<22, [Geometry]>;
621defm InputTrianglesAdjacency : ExecutionModeOperand<23, [Geometry]>;
622defm Quads : ExecutionModeOperand<24, [Tessellation]>;
623defm Isolines : ExecutionModeOperand<25, [Tessellation]>;
624defm OutputVertices : ExecutionModeOperand<26, [Geometry]>;
625defm OutputPoints : ExecutionModeOperand<27, [Geometry]>;
626defm OutputLineStrip : ExecutionModeOperand<28, [Geometry]>;
627defm OutputTriangleStrip : ExecutionModeOperand<29, [Geometry]>;
628defm VecTypeHint : ExecutionModeOperand<30, [Kernel]>;
629defm ContractionOff : ExecutionModeOperand<31, [Kernel]>;
630defm Initializer : ExecutionModeOperand<33, [Kernel]>;
631defm Finalizer : ExecutionModeOperand<34, [Kernel]>;
632defm SubgroupSize : ExecutionModeOperand<35, [SubgroupDispatch]>;
633defm SubgroupsPerWorkgroup : ExecutionModeOperand<36, [SubgroupDispatch]>;
634defm SubgroupsPerWorkgroupId : ExecutionModeOperand<37, [SubgroupDispatch]>;
635defm LocalSizeId : ExecutionModeOperand<38, []>;
636defm LocalSizeHintId : ExecutionModeOperand<39, [Kernel]>;
637defm PostDepthCoverage : ExecutionModeOperand<4446, [SampleMaskPostDepthCoverage]>;
638defm DenormPreserve : ExecutionModeOperand<4459, [DenormPreserve]>;
639defm DenormFlushToZero : ExecutionModeOperand<4460, [DenormFlushToZero]>;
640defm SignedZeroInfNanPreserve : ExecutionModeOperand<4461, [SignedZeroInfNanPreserve]>;
641defm RoundingModeRTE : ExecutionModeOperand<4462, [RoundingModeRTE]>;
642defm RoundingModeRTZ : ExecutionModeOperand<4463, [RoundingModeRTZ]>;
643defm StencilRefReplacingEXT : ExecutionModeOperand<5027, [StencilExportEXT]>;
644defm OutputLinesNV : ExecutionModeOperand<5269, [MeshShadingNV]>;
645defm DerivativeGroupQuadsNV : ExecutionModeOperand<5289, [ComputeDerivativeGroupQuadsNV]>;
646defm DerivativeGroupLinearNV : ExecutionModeOperand<5290, [ComputeDerivativeGroupLinearNV]>;
647defm OutputTrianglesNV : ExecutionModeOperand<5298, [MeshShadingNV]>;
648
649//===----------------------------------------------------------------------===//
650// Multiclass used to define StorageClass enum values and at the same time
651// SymbolicOperand entries with string mnemonics and capabilities.
652//===----------------------------------------------------------------------===//
653
654def StorageClass : GenericEnum, Operand<i32> {
655  let FilterClass = "StorageClass";
656  let NameField = "Name";
657  let ValueField = "Value";
658  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
659}
660
661class StorageClass<string name, bits<32> value> {
662  string Name = name;
663  bits<32> Value = value;
664}
665
666multiclass StorageClassOperand<bits<32> value, list<Capability> reqCapabilities> {
667  def : StorageClass<NAME, value>;
668  defm : SymbolicOperandWithRequirements<StorageClassOperand, value, NAME, 0, 0, [], reqCapabilities>;
669}
670
671defm UniformConstant : StorageClassOperand<0, []>;
672defm Input : StorageClassOperand<1, []>;
673defm Uniform : StorageClassOperand<2, [Shader]>;
674defm Output : StorageClassOperand<3, [Shader]>;
675defm Workgroup : StorageClassOperand<4, []>;
676defm CrossWorkgroup : StorageClassOperand<5, []>;
677defm Private : StorageClassOperand<6, [Shader]>;
678defm Function : StorageClassOperand<7, []>;
679defm Generic : StorageClassOperand<8, [GenericPointer]>;
680defm PushConstant : StorageClassOperand<9, [Shader]>;
681defm AtomicCounter : StorageClassOperand<10, [AtomicStorage]>;
682defm Image : StorageClassOperand<11, []>;
683defm StorageBuffer : StorageClassOperand<12, [Shader]>;
684defm CallableDataNV : StorageClassOperand<5328, [RayTracingNV]>;
685defm IncomingCallableDataNV : StorageClassOperand<5329, [RayTracingNV]>;
686defm RayPayloadNV : StorageClassOperand<5338, [RayTracingNV]>;
687defm HitAttributeNV : StorageClassOperand<5339, [RayTracingNV]>;
688defm IncomingRayPayloadNV : StorageClassOperand<5342, [RayTracingNV]>;
689defm ShaderRecordBufferNV : StorageClassOperand<5343, [RayTracingNV]>;
690defm PhysicalStorageBufferEXT : StorageClassOperand<5349, [PhysicalStorageBufferAddressesEXT]>;
691
692//===----------------------------------------------------------------------===//
693// Multiclass used to define Dim enum values and at the same time
694// SymbolicOperand entries with string mnemonics and capabilities.
695//===----------------------------------------------------------------------===//
696
697def Dim : GenericEnum, Operand<i32> {
698  let FilterClass = "Dim";
699  let NameField = "Name";
700  let ValueField = "Value";
701  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
702}
703
704class Dim<string name, bits<32> value> {
705  string Name = name;
706  bits<32> Value = value;
707}
708
709multiclass DimOperand<bits<32> value, string mnemonic, list<Capability> reqCapabilities> {
710  def NAME : Dim<NAME, value>;
711  defm : SymbolicOperandWithRequirements<DimOperand, value, mnemonic, 0, 0, [], reqCapabilities>;
712}
713
714defm DIM_1D : DimOperand<0, "1D", [Sampled1D, Image1D]>;
715defm DIM_2D : DimOperand<1, "2D", [Shader, Kernel, ImageMSArray]>;
716defm DIM_3D : DimOperand<2, "3D", []>;
717defm DIM_Cube : DimOperand<3, "Cube", [Shader, ImageCubeArray]>;
718defm DIM_Rect : DimOperand<4, "Rect", [SampledRect, ImageRect]>;
719defm DIM_Buffer : DimOperand<5, "Buffer", [SampledBuffer, ImageBuffer]>;
720defm DIM_SubpassData : DimOperand<6, "SubpassData", [InputAttachment]>;
721
722//===----------------------------------------------------------------------===//
723// Multiclass used to define SamplerAddressingMode enum values and at the same
724// time SymbolicOperand entries with string mnemonics and capabilities.
725//===----------------------------------------------------------------------===//
726
727def SamplerAddressingMode : GenericEnum, Operand<i32> {
728  let FilterClass = "SamplerAddressingMode";
729  let NameField = "Name";
730  let ValueField = "Value";
731  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
732}
733
734class SamplerAddressingMode<string name, bits<32> value> {
735  string Name = name;
736  bits<32> Value = value;
737}
738
739multiclass SamplerAddressingModeOperand<bits<32> value, list<Capability> reqCapabilities> {
740  def : SamplerAddressingMode<NAME, value>;
741  defm : SymbolicOperandWithRequirements<SamplerAddressingModeOperand, value, NAME, 0, 0, [], reqCapabilities>;
742}
743
744defm None : SamplerAddressingModeOperand<0, [Kernel]>;
745defm ClampToEdge : SamplerAddressingModeOperand<1, [Kernel]>;
746defm Clamp : SamplerAddressingModeOperand<2, [Kernel]>;
747defm Repeat : SamplerAddressingModeOperand<3, [Kernel]>;
748defm RepeatMirrored : SamplerAddressingModeOperand<4, [Kernel]>;
749
750//===----------------------------------------------------------------------===//
751// Multiclass used to define SamplerFilterMode enum values and at the same
752// time SymbolicOperand entries with string mnemonics and capabilities.
753//===----------------------------------------------------------------------===//
754
755def SamplerFilterMode : GenericEnum, Operand<i32> {
756  let FilterClass = "SamplerFilterMode";
757  let NameField = "Name";
758  let ValueField = "Value";
759  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
760}
761
762class SamplerFilterMode<string name, bits<32> value> {
763  string Name = name;
764  bits<32> Value = value;
765}
766
767multiclass SamplerFilterModeOperand<bits<32> value, list<Capability> reqCapabilities> {
768  def : SamplerFilterMode<NAME, value>;
769  defm : SymbolicOperandWithRequirements<SamplerFilterModeOperand, value, NAME, 0, 0, [], reqCapabilities>;
770}
771
772defm Nearest : SamplerFilterModeOperand<0, [Kernel]>;
773defm Linear : SamplerFilterModeOperand<1, [Kernel]>;
774
775//===----------------------------------------------------------------------===//
776// Multiclass used to define ImageFormat enum values and at the same time
777// SymbolicOperand entries with string mnemonics and capabilities.
778//===----------------------------------------------------------------------===//
779
780def ImageFormat : GenericEnum, Operand<i32> {
781  let FilterClass = "ImageFormat";
782  let NameField = "Name";
783  let ValueField = "Value";
784  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
785}
786
787class ImageFormat<string name, bits<32> value> {
788  string Name = name;
789  bits<32> Value = value;
790}
791
792multiclass ImageFormatOperand<bits<32> value, list<Capability> reqCapabilities> {
793  def NAME : ImageFormat<NAME, value>;
794  defm : SymbolicOperandWithRequirements<ImageFormatOperand, value, NAME, 0, 0, [], reqCapabilities>;
795}
796
797defm Unknown : ImageFormatOperand<0, []>;
798defm Rgba32f : ImageFormatOperand<1, [Shader]>;
799defm Rgba16f : ImageFormatOperand<2, [Shader]>;
800defm R32f : ImageFormatOperand<3, [Shader]>;
801defm Rgba8 : ImageFormatOperand<4, [Shader]>;
802defm Rgba8Snorm : ImageFormatOperand<5, [Shader]>;
803defm Rg32f : ImageFormatOperand<6, [StorageImageExtendedFormats]>;
804defm Rg16f : ImageFormatOperand<7, [StorageImageExtendedFormats]>;
805defm R11fG11fB10f : ImageFormatOperand<8, [StorageImageExtendedFormats]>;
806defm R16f : ImageFormatOperand<9, [StorageImageExtendedFormats]>;
807defm Rgba16 : ImageFormatOperand<10, [StorageImageExtendedFormats]>;
808defm Rgb10A2 : ImageFormatOperand<11, [StorageImageExtendedFormats]>;
809defm Rg16 : ImageFormatOperand<12, [StorageImageExtendedFormats]>;
810defm Rg8 : ImageFormatOperand<13, [StorageImageExtendedFormats]>;
811defm R16 : ImageFormatOperand<14, [StorageImageExtendedFormats]>;
812defm R8 : ImageFormatOperand<15, [StorageImageExtendedFormats]>;
813defm Rgba16Snorm : ImageFormatOperand<16, [StorageImageExtendedFormats]>;
814defm Rg16Snorm : ImageFormatOperand<17, [StorageImageExtendedFormats]>;
815defm Rg8Snorm : ImageFormatOperand<18, [StorageImageExtendedFormats]>;
816defm R16Snorm : ImageFormatOperand<19, [StorageImageExtendedFormats]>;
817defm R8Snorm : ImageFormatOperand<20, [StorageImageExtendedFormats]>;
818defm Rgba32i : ImageFormatOperand<21, [Shader]>;
819defm Rgba16i : ImageFormatOperand<22, [Shader]>;
820defm Rgba8i : ImageFormatOperand<23, [Shader]>;
821defm R32i : ImageFormatOperand<24, [Shader]>;
822defm Rg32i : ImageFormatOperand<25, [StorageImageExtendedFormats]>;
823defm Rg16i : ImageFormatOperand<26, [StorageImageExtendedFormats]>;
824defm Rg8i : ImageFormatOperand<27, [StorageImageExtendedFormats]>;
825defm R16i : ImageFormatOperand<28, [StorageImageExtendedFormats]>;
826defm R8i : ImageFormatOperand<29, [StorageImageExtendedFormats]>;
827defm Rgba32ui : ImageFormatOperand<30, [Shader]>;
828defm Rgba16ui : ImageFormatOperand<31, [Shader]>;
829defm Rgba8ui : ImageFormatOperand<32, [Shader]>;
830defm R32ui : ImageFormatOperand<33, [Shader]>;
831defm Rgb10a2ui : ImageFormatOperand<34, [StorageImageExtendedFormats]>;
832defm Rg32ui : ImageFormatOperand<35, [StorageImageExtendedFormats]>;
833defm Rg16ui : ImageFormatOperand<36, [StorageImageExtendedFormats]>;
834defm Rg8ui : ImageFormatOperand<37, [StorageImageExtendedFormats]>;
835defm R16ui : ImageFormatOperand<38, [StorageImageExtendedFormats]>;
836defm R8ui : ImageFormatOperand<39, [StorageImageExtendedFormats]>;
837
838//===----------------------------------------------------------------------===//
839// Multiclass used to define ImageChannelOrder enum values and at the same time
840// SymbolicOperand entries with string mnemonics and capabilities.
841//===----------------------------------------------------------------------===//
842
843def ImageChannelOrder : GenericEnum, Operand<i32> {
844  let FilterClass = "ImageChannelOrder";
845  let NameField = "Name";
846  let ValueField = "Value";
847  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
848}
849
850class ImageChannelOrder<string name, bits<32> value> {
851  string Name = name;
852  bits<32> Value = value;
853}
854
855multiclass ImageChannelOrderOperand<bits<32> value, list<Capability> reqCapabilities> {
856  def : ImageChannelOrder<NAME, value>;
857  defm : SymbolicOperandWithRequirements<ImageChannelOrderOperand, value, NAME, 0, 0, [], reqCapabilities>;
858}
859
860defm R : ImageChannelOrderOperand<0, [Kernel]>;
861defm A : ImageChannelOrderOperand<1, [Kernel]>;
862defm RG : ImageChannelOrderOperand<2, [Kernel]>;
863defm RA : ImageChannelOrderOperand<3, [Kernel]>;
864defm RGB : ImageChannelOrderOperand<4, [Kernel]>;
865defm RGBA : ImageChannelOrderOperand<5, [Kernel]>;
866defm BGRA : ImageChannelOrderOperand<6, [Kernel]>;
867defm ARGB : ImageChannelOrderOperand<7, [Kernel]>;
868defm Intensity : ImageChannelOrderOperand<8, [Kernel]>;
869defm Luminance : ImageChannelOrderOperand<9, [Kernel]>;
870defm Rx : ImageChannelOrderOperand<10, [Kernel]>;
871defm RGx : ImageChannelOrderOperand<11, [Kernel]>;
872defm RGBx : ImageChannelOrderOperand<12, [Kernel]>;
873defm Depth : ImageChannelOrderOperand<13, [Kernel]>;
874defm DepthStencil : ImageChannelOrderOperand<14, [Kernel]>;
875defm sRGB : ImageChannelOrderOperand<15, [Kernel]>;
876defm sRGBx : ImageChannelOrderOperand<16, [Kernel]>;
877defm sRGBA : ImageChannelOrderOperand<17, [Kernel]>;
878defm sBGRA : ImageChannelOrderOperand<18, [Kernel]>;
879defm ABGR : ImageChannelOrderOperand<19, [Kernel]>;
880
881//===----------------------------------------------------------------------===//
882// Multiclass used to define ImageChannelDataType enum values and at the same
883// time SymbolicOperand entries with string mnemonics and capabilities.
884//===----------------------------------------------------------------------===//
885
886def ImageChannelDataType : GenericEnum, Operand<i32> {
887  let FilterClass = "ImageChannelDataType";
888  let NameField = "Name";
889  let ValueField = "Value";
890  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
891}
892
893class ImageChannelDataType<string name, bits<32> value> {
894  string Name = name;
895  bits<32> Value = value;
896}
897
898multiclass ImageChannelDataTypeOperand<bits<32> value, list<Capability> reqCapabilities> {
899  def : ImageChannelDataType<NAME, value>;
900  defm : SymbolicOperandWithRequirements<ImageChannelDataTypeOperand, value, NAME, 0, 0, [], reqCapabilities>;
901}
902
903defm SnormInt8 : ImageChannelDataTypeOperand<0, []>;
904defm SnormInt16 : ImageChannelDataTypeOperand<1, []>;
905defm UnormInt8 : ImageChannelDataTypeOperand<2, [Kernel]>;
906defm UnormInt16 : ImageChannelDataTypeOperand<3, [Kernel]>;
907defm UnormShort565 : ImageChannelDataTypeOperand<4, [Kernel]>;
908defm UnormShort555 : ImageChannelDataTypeOperand<5, [Kernel]>;
909defm UnormInt101010 : ImageChannelDataTypeOperand<6, [Kernel]>;
910defm SignedInt8 : ImageChannelDataTypeOperand<7, [Kernel]>;
911defm SignedInt16 : ImageChannelDataTypeOperand<8, [Kernel]>;
912defm SignedInt32 : ImageChannelDataTypeOperand<9, [Kernel]>;
913defm UnsignedInt8 : ImageChannelDataTypeOperand<10, [Kernel]>;
914defm UnsignedInt16 : ImageChannelDataTypeOperand<11, [Kernel]>;
915defm UnsigendInt32 : ImageChannelDataTypeOperand<12, [Kernel]>;
916defm HalfFloat : ImageChannelDataTypeOperand<13, [Kernel]>;
917defm Float : ImageChannelDataTypeOperand<14, [Kernel]>;
918defm UnormInt24 : ImageChannelDataTypeOperand<15, [Kernel]>;
919defm UnormInt101010_2 : ImageChannelDataTypeOperand<16, [Kernel]>;
920
921//===----------------------------------------------------------------------===//
922// Multiclass used to define ImageOperand enum values and at the same time
923// SymbolicOperand entries with string mnemonics and capabilities.
924//===----------------------------------------------------------------------===//
925
926def ImageOperand : GenericEnum, Operand<i32> {
927  let FilterClass = "ImageOperand";
928  let NameField = "Name";
929  let ValueField = "Value";
930  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
931}
932
933class ImageOperand<string name, bits<32> value> {
934  string Name = name;
935  bits<32> Value = value;
936}
937
938multiclass ImageOperandOperand<bits<32> value, list<Capability> reqCapabilities> {
939  def : ImageOperand<NAME, value>;
940  defm : SymbolicOperandWithRequirements<ImageOperandOperand, value, NAME, 0, 0, [], reqCapabilities>;
941}
942
943defm None : ImageOperandOperand<0x0, []>;
944defm Bias : ImageOperandOperand<0x1, [Shader]>;
945defm Lod : ImageOperandOperand<0x2, []>;
946defm Grad : ImageOperandOperand<0x4, []>;
947defm ConstOffset : ImageOperandOperand<0x8, []>;
948defm Offset : ImageOperandOperand<0x10, [ImageGatherExtended]>;
949defm ConstOffsets : ImageOperandOperand<0x20, [ImageGatherExtended]>;
950defm Sample : ImageOperandOperand<0x40, []>;
951defm MinLod : ImageOperandOperand<0x80, [MinLod]>;
952defm MakeTexelAvailableKHR : ImageOperandOperand<0x100, [VulkanMemoryModelKHR]>;
953defm MakeTexelVisibleKHR : ImageOperandOperand<0x200, [VulkanMemoryModelKHR]>;
954defm NonPrivateTexelKHR : ImageOperandOperand<0x400, [VulkanMemoryModelKHR]>;
955defm VolatileTexelKHR : ImageOperandOperand<0x800, [VulkanMemoryModelKHR]>;
956defm SignExtend : ImageOperandOperand<0x1000, []>;
957defm ZeroExtend : ImageOperandOperand<0x2000, []>;
958
959//===----------------------------------------------------------------------===//
960// Multiclass used to define FPFastMathMode enum values and at the same time
961// SymbolicOperand entries with string mnemonics and capabilities.
962//===----------------------------------------------------------------------===//
963
964def FPFastMathMode : GenericEnum, Operand<i32> {
965  let FilterClass = "FPFastMathMode";
966  let NameField = "Name";
967  let ValueField = "Value";
968  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
969}
970
971class FPFastMathMode<string name, bits<32> value> {
972  string Name = name;
973  bits<32> Value = value;
974}
975
976multiclass FPFastMathModeOperand<bits<32> value, list<Capability> reqCapabilities> {
977  def : FPFastMathMode<NAME, value>;
978  defm : SymbolicOperandWithRequirements<FPFastMathModeOperand, value, NAME, 0, 0, [], reqCapabilities>;
979}
980
981defm None : FPFastMathModeOperand<0x0, []>;
982defm NotNaN : FPFastMathModeOperand<0x1, [Kernel]>;
983defm NotInf : FPFastMathModeOperand<0x2, [Kernel]>;
984defm NSZ : FPFastMathModeOperand<0x4, [Kernel]>;
985defm AllowRecip : FPFastMathModeOperand<0x8, [Kernel]>;
986defm Fast : FPFastMathModeOperand<0x10, [Kernel]>;
987
988//===----------------------------------------------------------------------===//
989// Multiclass used to define FPRoundingMode enum values and at the same time
990// SymbolicOperand entries with string mnemonics.
991//===----------------------------------------------------------------------===//
992
993def FPRoundingMode : GenericEnum, Operand<i32> {
994  let FilterClass = "FPRoundingMode";
995  let NameField = "Name";
996  let ValueField = "Value";
997  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
998}
999
1000class FPRoundingMode<string name, bits<32> value> {
1001  string Name = name;
1002  bits<32> Value = value;
1003}
1004
1005multiclass FPRoundingModeOperand<bits<32> value> {
1006  def NAME : FPRoundingMode<NAME, value>;
1007  defm : SymbolicOperandWithRequirements<FPRoundingModeOperand, value, NAME, 0, 0, [], []>;
1008}
1009
1010defm RTE : FPRoundingModeOperand<0>;
1011defm RTZ : FPRoundingModeOperand<1>;
1012defm RTP : FPRoundingModeOperand<2>;
1013defm RTN : FPRoundingModeOperand<3>;
1014
1015//===----------------------------------------------------------------------===//
1016// Multiclass used to define LinkageType enum values and at the same time
1017// SymbolicOperand entries with string mnemonics and capabilities.
1018//===----------------------------------------------------------------------===//
1019
1020def LinkageType : GenericEnum, Operand<i32> {
1021  let FilterClass = "LinkageType";
1022  let NameField = "Name";
1023  let ValueField = "Value";
1024  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1025}
1026
1027class LinkageType<string name, bits<32> value> {
1028  string Name = name;
1029  bits<32> Value = value;
1030}
1031
1032multiclass LinkageTypeOperand<bits<32> value, list<Capability> reqCapabilities> {
1033  def : LinkageType<NAME, value>;
1034  defm : SymbolicOperandWithRequirements<LinkageTypeOperand, value, NAME, 0, 0, [], reqCapabilities>;
1035}
1036
1037defm Export : LinkageTypeOperand<0, [Linkage]>;
1038defm Import : LinkageTypeOperand<1, [Linkage]>;
1039
1040//===----------------------------------------------------------------------===//
1041// Multiclass used to define AccessQualifier enum values and at the same time
1042// SymbolicOperand entries with string mnemonics and capabilities.
1043//===----------------------------------------------------------------------===//
1044
1045def AccessQualifier : GenericEnum, Operand<i32> {
1046  let FilterClass = "AccessQualifier";
1047  let NameField = "Name";
1048  let ValueField = "Value";
1049  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1050}
1051
1052class AccessQualifier<string name, bits<32> value> {
1053  string Name = name;
1054  bits<32> Value = value;
1055}
1056
1057multiclass AccessQualifierOperand<bits<32> value, list<Capability> reqCapabilities> {
1058  def NAME : AccessQualifier<NAME, value>;
1059  defm : SymbolicOperandWithRequirements<AccessQualifierOperand, value, NAME, 0, 0, [], reqCapabilities>;
1060}
1061
1062defm ReadOnly : AccessQualifierOperand<0, [Kernel]>;
1063defm WriteOnly : AccessQualifierOperand<1, [Kernel]>;
1064defm ReadWrite : AccessQualifierOperand<2, [Kernel]>;
1065
1066//===----------------------------------------------------------------------===//
1067// Multiclass used to define FunctionParameterAttribute enum values and at the
1068// same time SymbolicOperand entries with string mnemonics and capabilities.
1069//===----------------------------------------------------------------------===//
1070
1071def FunctionParameterAttribute : GenericEnum, Operand<i32> {
1072  let FilterClass = "FunctionParameterAttribute";
1073  let NameField = "Name";
1074  let ValueField = "Value";
1075  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1076}
1077
1078class FunctionParameterAttribute<string name, bits<32> value> {
1079  string Name = name;
1080  bits<32> Value = value;
1081}
1082
1083multiclass FunctionParameterAttributeOperand<bits<32> value, list<Capability> reqCapabilities> {
1084  def : FunctionParameterAttribute<NAME, value>;
1085  defm : SymbolicOperandWithRequirements<FunctionParameterAttributeOperand, value, NAME, 0, 0, [], reqCapabilities>;
1086}
1087
1088defm Zext : FunctionParameterAttributeOperand<0, [Kernel]>;
1089defm Sext : FunctionParameterAttributeOperand<1, [Kernel]>;
1090defm ByVal : FunctionParameterAttributeOperand<2, [Kernel]>;
1091defm Sret : FunctionParameterAttributeOperand<3, [Kernel]>;
1092defm NoAlias : FunctionParameterAttributeOperand<4, [Kernel]>;
1093defm NoCapture : FunctionParameterAttributeOperand<5, [Kernel]>;
1094defm NoWrite : FunctionParameterAttributeOperand<6, [Kernel]>;
1095defm NoReadWrite : FunctionParameterAttributeOperand<7, [Kernel]>;
1096
1097//===----------------------------------------------------------------------===//
1098// Multiclass used to define Decoration enum values and at the same time
1099// SymbolicOperand entries with string mnemonics, versioning, extensions and
1100// capabilities.
1101//===----------------------------------------------------------------------===//
1102
1103def Decoration : GenericEnum, Operand<i32> {
1104  let FilterClass = "Decoration";
1105  let NameField = "Name";
1106  let ValueField = "Value";
1107  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1108}
1109
1110class Decoration<string name, bits<32> value> {
1111  string Name = name;
1112  bits<32> Value = value;
1113}
1114
1115multiclass DecorationOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
1116  def : Decoration<NAME, value>;
1117  defm : SymbolicOperandWithRequirements<DecorationOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
1118}
1119
1120defm RelaxedPrecision : DecorationOperand<0, 0, 0, [], [Shader]>;
1121defm SpecId : DecorationOperand<1, 0, 0, [], [Shader, Kernel]>;
1122defm Block : DecorationOperand<2, 0, 0, [], [Shader]>;
1123defm BufferBlock : DecorationOperand<3, 0, 0, [], [Shader]>;
1124defm RowMajor : DecorationOperand<4, 0, 0, [], [Matrix]>;
1125defm ColMajor : DecorationOperand<5, 0, 0, [], [Matrix]>;
1126defm ArrayStride : DecorationOperand<6, 0, 0, [], [Shader]>;
1127defm MatrixStride : DecorationOperand<7, 0, 0, [], [Matrix]>;
1128defm GLSLShared : DecorationOperand<8, 0, 0, [], [Shader]>;
1129defm GLSLPacked : DecorationOperand<9, 0, 0, [], [Shader]>;
1130defm CPacked : DecorationOperand<10, 0, 0, [], [Kernel]>;
1131defm BuiltIn : DecorationOperand<11, 0, 0, [], []>;
1132defm NoPerspective : DecorationOperand<13, 0, 0, [], [Shader]>;
1133defm Flat : DecorationOperand<14, 0, 0, [], [Shader]>;
1134defm Patch : DecorationOperand<15, 0, 0, [], [Tessellation]>;
1135defm Centroid : DecorationOperand<16, 0, 0, [], [Shader]>;
1136defm Sample : DecorationOperand<17, 0, 0, [], [SampleRateShading]>;
1137defm Invariant : DecorationOperand<18, 0, 0, [], [Shader]>;
1138defm Restrict : DecorationOperand<19, 0, 0, [], []>;
1139defm Aliased : DecorationOperand<20, 0, 0, [], []>;
1140defm Volatile : DecorationOperand<21, 0, 0, [], []>;
1141defm Constant : DecorationOperand<22, 0, 0, [], [Kernel]>;
1142defm Coherent : DecorationOperand<23, 0, 0, [], []>;
1143defm NonWritable : DecorationOperand<24, 0, 0, [], []>;
1144defm NonReadable : DecorationOperand<25, 0, 0, [], []>;
1145defm Uniform : DecorationOperand<26, 0, 0, [], [Shader]>;
1146defm UniformId : DecorationOperand<27, 0, 0, [], [Shader]>;
1147defm SaturatedConversion : DecorationOperand<28, 0, 0, [], [Kernel]>;
1148defm Stream : DecorationOperand<29, 0, 0, [], [GeometryStreams]>;
1149defm Location : DecorationOperand<30, 0, 0, [], [Shader]>;
1150defm Component : DecorationOperand<31, 0, 0, [], [Shader]>;
1151defm Index : DecorationOperand<32, 0, 0, [], [Shader]>;
1152defm Binding : DecorationOperand<33, 0, 0, [], [Shader]>;
1153defm DescriptorSet : DecorationOperand<34, 0, 0, [], [Shader]>;
1154defm Offset : DecorationOperand<35, 0, 0, [], [Shader]>;
1155defm XfbBuffer : DecorationOperand<36, 0, 0, [], [TransformFeedback]>;
1156defm XfbStride : DecorationOperand<37, 0, 0, [], [TransformFeedback]>;
1157defm FuncParamAttr : DecorationOperand<38, 0, 0, [], [Kernel]>;
1158defm FPRoundingMode : DecorationOperand<39, 0, 0, [], []>;
1159defm FPFastMathMode : DecorationOperand<40, 0, 0, [], [Kernel]>;
1160defm LinkageAttributes : DecorationOperand<41, 0, 0, [], [Linkage]>;
1161defm NoContraction : DecorationOperand<42, 0, 0, [], [Shader]>;
1162defm InputAttachmentIndex : DecorationOperand<43, 0, 0, [], [InputAttachment]>;
1163defm Alignment : DecorationOperand<44, 0, 0, [], [Kernel]>;
1164defm MaxByteOffset : DecorationOperand<45, 0, 0, [], [Addresses]>;
1165defm AlignmentId : DecorationOperand<46, 0, 0, [], [Kernel]>;
1166defm MaxByteOffsetId : DecorationOperand<47, 0, 0, [], [Addresses]>;
1167defm NoSignedWrap : DecorationOperand<4469, 0x10400, 0, [SPV_KHR_no_integer_wrap_decoration], []>;
1168defm NoUnsignedWrap : DecorationOperand<4470, 0x10400, 0, [SPV_KHR_no_integer_wrap_decoration], []>;
1169defm ExplicitInterpAMD : DecorationOperand<4999, 0, 0, [], []>;
1170defm OverrideCoverageNV : DecorationOperand<5248, 0, 0, [], [SampleMaskOverrideCoverageNV]>;
1171defm PassthroughNV : DecorationOperand<5250, 0, 0, [], [GeometryShaderPassthroughNV]>;
1172defm ViewportRelativeNV : DecorationOperand<5252, 0, 0, [], [ShaderViewportMaskNV]>;
1173defm SecondaryViewportRelativeNV : DecorationOperand<5256, 0, 0, [], [ShaderStereoViewNV]>;
1174defm PerPrimitiveNV : DecorationOperand<5271, 0, 0, [], [MeshShadingNV]>;
1175defm PerViewNV : DecorationOperand<5272, 0, 0, [], [MeshShadingNV]>;
1176defm PerVertexNV : DecorationOperand<5273, 0, 0, [], [FragmentBarycentricNV]>;
1177defm NonUniformEXT : DecorationOperand<5300, 0, 0, [], [ShaderNonUniformEXT]>;
1178defm CountBuffer : DecorationOperand<5634, 0, 0, [], []>;
1179defm UserSemantic : DecorationOperand<5635, 0, 0, [], []>;
1180defm RestrictPointerEXT : DecorationOperand<5355, 0, 0, [], [PhysicalStorageBufferAddressesEXT]>;
1181defm AliasedPointerEXT : DecorationOperand<5356, 0, 0, [], [PhysicalStorageBufferAddressesEXT]>;
1182
1183//===----------------------------------------------------------------------===//
1184// Multiclass used to define BuiltIn enum values and at the same time
1185// SymbolicOperand entries with string mnemonics, versioning, extensions and
1186// capabilities.
1187//===----------------------------------------------------------------------===//
1188
1189def BuiltIn : GenericEnum, Operand<i32> {
1190  let FilterClass = "BuiltIn";
1191  let NameField = "Name";
1192  let ValueField = "Value";
1193  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1194}
1195
1196class BuiltIn<string name, bits<32> value> {
1197  string Name = name;
1198  bits<32> Value = value;
1199}
1200
1201multiclass BuiltInOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
1202  def NAME : BuiltIn<NAME, value>;
1203  defm : SymbolicOperandWithRequirements<BuiltInOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
1204}
1205
1206defm Position : BuiltInOperand<0, 0, 0, [], [Shader]>;
1207defm PointSize : BuiltInOperand<1, 0, 0, [], [Shader]>;
1208defm ClipDistanceVariable : BuiltInOperand<3, 0, 0, [], [ClipDistance]>;
1209defm CullDistanceVariable : BuiltInOperand<4, 0, 0, [], [CullDistance]>;
1210defm VertexId : BuiltInOperand<5, 0, 0, [], [Shader]>;
1211defm InstanceId : BuiltInOperand<6, 0, 0, [], [Shader]>;
1212defm PrimitiveId : BuiltInOperand<7, 0, 0, [], [Geometry, Tessellation, RayTracingNV]>;
1213defm InvocationId : BuiltInOperand<8, 0, 0, [], [Geometry, Tessellation]>;
1214defm Layer : BuiltInOperand<9, 0, 0, [], [Geometry]>;
1215defm ViewportIndex : BuiltInOperand<10, 0, 0, [], [MultiViewport]>;
1216defm TessLevelOuter : BuiltInOperand<11, 0, 0, [], [Tessellation]>;
1217defm TessLevelInner : BuiltInOperand<12, 0, 0, [], [Tessellation]>;
1218defm TessCoord : BuiltInOperand<13, 0, 0, [], [Tessellation]>;
1219defm PatchVertices : BuiltInOperand<14, 0, 0, [], [Tessellation]>;
1220defm FragCoord : BuiltInOperand<15, 0, 0, [], [Shader]>;
1221defm PointCoord : BuiltInOperand<16, 0, 0, [], [Shader]>;
1222defm FrontFacing : BuiltInOperand<17, 0, 0, [], [Shader]>;
1223defm SampleId : BuiltInOperand<18, 0, 0, [], [SampleRateShading]>;
1224defm SamplePosition : BuiltInOperand<19, 0, 0, [], [SampleRateShading]>;
1225defm SampleMask : BuiltInOperand<20, 0, 0, [], [Shader]>;
1226defm FragDepth : BuiltInOperand<22, 0, 0, [], [Shader]>;
1227defm HelperInvocation : BuiltInOperand<23, 0, 0, [], [Shader]>;
1228defm NumWorkgroups : BuiltInOperand<24, 0, 0, [], []>;
1229defm WorkgroupSize : BuiltInOperand<25, 0, 0, [], []>;
1230defm WorkgroupId : BuiltInOperand<26, 0, 0, [], []>;
1231defm LocalInvocationId : BuiltInOperand<27, 0, 0, [], []>;
1232defm GlobalInvocationId : BuiltInOperand<28, 0, 0, [], []>;
1233defm LocalInvocationIndex : BuiltInOperand<29, 0, 0, [], []>;
1234defm WorkDim : BuiltInOperand<30, 0, 0, [], [Kernel]>;
1235defm GlobalSize : BuiltInOperand<31, 0, 0, [], [Kernel]>;
1236defm EnqueuedWorkgroupSize : BuiltInOperand<32, 0, 0, [], [Kernel]>;
1237defm GlobalOffset : BuiltInOperand<33, 0, 0, [], [Kernel]>;
1238defm GlobalLinearId : BuiltInOperand<34, 0, 0, [], [Kernel]>;
1239defm SubgroupSize : BuiltInOperand<36, 0, 0, [], [Kernel, GroupNonUniform, SubgroupBallotKHR]>;
1240defm SubgroupMaxSize : BuiltInOperand<37, 0, 0, [], [Kernel]>;
1241defm NumSubgroups : BuiltInOperand<38, 0, 0, [], [Kernel, GroupNonUniform]>;
1242defm NumEnqueuedSubgroups : BuiltInOperand<39, 0, 0, [], [Kernel]>;
1243defm SubgroupId : BuiltInOperand<40, 0, 0, [], [Kernel, GroupNonUniform]>;
1244defm SubgroupLocalInvocationId : BuiltInOperand<41, 0, 0, [], [Kernel, GroupNonUniform, SubgroupBallotKHR]>;
1245defm VertexIndex : BuiltInOperand<42, 0, 0, [], [Shader]>;
1246defm InstanceIndex : BuiltInOperand<43, 0, 0, [], [Shader]>;
1247defm SubgroupEqMask : BuiltInOperand<4416, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;
1248defm SubgroupGeMask : BuiltInOperand<4417, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;
1249defm SubgroupGtMask : BuiltInOperand<4418, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;
1250defm SubgroupLeMask : BuiltInOperand<4419, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;
1251defm SubgroupLtMask : BuiltInOperand<4420, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;
1252defm BaseVertex : BuiltInOperand<4424, 0, 0, [], [DrawParameters]>;
1253defm BaseInstance : BuiltInOperand<4425, 0, 0, [], [DrawParameters]>;
1254defm DrawIndex : BuiltInOperand<4426, 0, 0, [], [DrawParameters, MeshShadingNV]>;
1255defm DeviceIndex : BuiltInOperand<4438, 0, 0, [], [DeviceGroup]>;
1256defm ViewIndex : BuiltInOperand<4440, 0, 0, [], [MultiView]>;
1257defm BaryCoordNoPerspAMD : BuiltInOperand<4492, 0, 0, [], []>;
1258defm BaryCoordNoPerspCentroidAMD : BuiltInOperand<4493, 0, 0, [], []>;
1259defm BaryCoordNoPerspSampleAMD : BuiltInOperand<4494, 0, 0, [], []>;
1260defm BaryCoordSmoothAMD : BuiltInOperand<4495, 0, 0, [], []>;
1261defm BaryCoordSmoothCentroid : BuiltInOperand<4496, 0, 0, [], []>;
1262defm BaryCoordSmoothSample : BuiltInOperand<4497, 0, 0, [], []>;
1263defm BaryCoordPullModel : BuiltInOperand<4498, 0, 0, [], []>;
1264defm FragStencilRefEXT : BuiltInOperand<5014, 0, 0, [], [StencilExportEXT]>;
1265defm ViewportMaskNV : BuiltInOperand<5253, 0, 0, [], [ShaderViewportMaskNV, MeshShadingNV]>;
1266defm SecondaryPositionNV : BuiltInOperand<5257, 0, 0, [], [ShaderStereoViewNV]>;
1267defm SecondaryViewportMaskNV : BuiltInOperand<5258, 0, 0, [], [ShaderStereoViewNV]>;
1268defm PositionPerViewNV : BuiltInOperand<5261, 0, 0, [], [PerViewAttributesNV, MeshShadingNV]>;
1269defm ViewportMaskPerViewNV : BuiltInOperand<5262, 0, 0, [], [PerViewAttributesNV, MeshShadingNV]>;
1270defm FullyCoveredEXT : BuiltInOperand<5264, 0, 0, [], [FragmentFullyCoveredEXT]>;
1271defm TaskCountNV : BuiltInOperand<5274, 0, 0, [], [MeshShadingNV]>;
1272defm PrimitiveCountNV : BuiltInOperand<5275, 0, 0, [], [MeshShadingNV]>;
1273defm PrimitiveIndicesNV : BuiltInOperand<5276, 0, 0, [], [MeshShadingNV]>;
1274defm ClipDistancePerViewNV : BuiltInOperand<5277, 0, 0, [], [MeshShadingNV]>;
1275defm CullDistancePerViewNV : BuiltInOperand<5278, 0, 0, [], [MeshShadingNV]>;
1276defm LayerPerViewNV : BuiltInOperand<5279, 0, 0, [], [MeshShadingNV]>;
1277defm MeshViewCountNV : BuiltInOperand<5280, 0, 0, [], [MeshShadingNV]>;
1278defm MeshViewIndices : BuiltInOperand<5281, 0, 0, [], [MeshShadingNV]>;
1279defm BaryCoordNV : BuiltInOperand<5286, 0, 0, [], [FragmentBarycentricNV]>;
1280defm BaryCoordNoPerspNV : BuiltInOperand<5287, 0, 0, [], [FragmentBarycentricNV]>;
1281defm FragSizeEXT : BuiltInOperand<5292, 0, 0, [], [FragmentDensityEXT]>;
1282defm FragInvocationCountEXT : BuiltInOperand<5293, 0, 0, [], [FragmentDensityEXT]>;
1283defm LaunchIdNV : BuiltInOperand<5319, 0, 0, [], [RayTracingNV]>;
1284defm LaunchSizeNV : BuiltInOperand<5320, 0, 0, [], [RayTracingNV]>;
1285defm WorldRayOriginNV : BuiltInOperand<5321, 0, 0, [], [RayTracingNV]>;
1286defm WorldRayDirectionNV : BuiltInOperand<5322, 0, 0, [], [RayTracingNV]>;
1287defm ObjectRayOriginNV : BuiltInOperand<5323, 0, 0, [], [RayTracingNV]>;
1288defm ObjectRayDirectionNV : BuiltInOperand<5324, 0, 0, [], [RayTracingNV]>;
1289defm RayTminNV : BuiltInOperand<5325, 0, 0, [], [RayTracingNV]>;
1290defm RayTmaxNV : BuiltInOperand<5326, 0, 0, [], [RayTracingNV]>;
1291defm InstanceCustomIndexNV : BuiltInOperand<5327, 0, 0, [], [RayTracingNV]>;
1292defm ObjectToWorldNV : BuiltInOperand<5330, 0, 0, [], [RayTracingNV]>;
1293defm WorldToObjectNV : BuiltInOperand<5331, 0, 0, [], [RayTracingNV]>;
1294defm HitTNV : BuiltInOperand<5332, 0, 0, [], [RayTracingNV]>;
1295defm HitKindNV : BuiltInOperand<5333, 0, 0, [], [RayTracingNV]>;
1296defm IncomingRayFlagsNV : BuiltInOperand<5351, 0, 0, [], [RayTracingNV]>;
1297
1298//===----------------------------------------------------------------------===//
1299// Multiclass used to define SelectionControl enum values and at the same time
1300// SymbolicOperand entries with string mnemonics.
1301//===----------------------------------------------------------------------===//
1302
1303def SelectionControl : GenericEnum, Operand<i32> {
1304  let FilterClass = "SelectionControl";
1305  let NameField = "Name";
1306  let ValueField = "Value";
1307  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1308}
1309
1310class SelectionControl<string name, bits<32> value> {
1311  string Name = name;
1312  bits<32> Value = value;
1313}
1314
1315multiclass SelectionControlOperand<bits<32> value> {
1316  def : SelectionControl<NAME, value>;
1317  defm : SymbolicOperandWithRequirements<SelectionControlOperand, value, NAME, 0, 0, [], []>;
1318}
1319
1320defm None : SelectionControlOperand<0x0>;
1321defm Flatten : SelectionControlOperand<0x1>;
1322defm DontFlatten : SelectionControlOperand<0x2>;
1323
1324//===----------------------------------------------------------------------===//
1325// Multiclass used to define LoopControl enum values and at the same time
1326// SymbolicOperand entries with string mnemonics.
1327//===----------------------------------------------------------------------===//
1328
1329def LoopControl : GenericEnum, Operand<i32> {
1330  let FilterClass = "LoopControl";
1331  let NameField = "Name";
1332  let ValueField = "Value";
1333  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1334}
1335
1336class LoopControl<string name, bits<32> value> {
1337  string Name = name;
1338  bits<32> Value = value;
1339}
1340
1341multiclass LoopControlOperand<bits<32> value> {
1342  def : LoopControl<NAME, value>;
1343  defm : SymbolicOperandWithRequirements<LoopControlOperand, value, NAME, 0, 0, [], []>;
1344}
1345
1346defm None : LoopControlOperand<0x0>;
1347defm Unroll : LoopControlOperand<0x1>;
1348defm DontUnroll : LoopControlOperand<0x2>;
1349defm DependencyInfinite : LoopControlOperand<0x4>;
1350defm DependencyLength : LoopControlOperand<0x8>;
1351defm MinIterations : LoopControlOperand<0x10>;
1352defm MaxIterations : LoopControlOperand<0x20>;
1353defm IterationMultiple : LoopControlOperand<0x40>;
1354defm PeelCount : LoopControlOperand<0x80>;
1355defm PartialCount : LoopControlOperand<0x100>;
1356
1357//===----------------------------------------------------------------------===//
1358// Multiclass used to define FunctionControl enum values and at the same time
1359// SymbolicOperand entries with string mnemonics.
1360//===----------------------------------------------------------------------===//
1361
1362def FunctionControl : GenericEnum, Operand<i32> {
1363  let FilterClass = "FunctionControl";
1364  let NameField = "Name";
1365  let ValueField = "Value";
1366  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1367}
1368
1369class FunctionControl<string name, bits<32> value> {
1370  string Name = name;
1371  bits<32> Value = value;
1372}
1373
1374multiclass FunctionControlOperand<bits<32> value> {
1375  def : FunctionControl<NAME, value>;
1376  defm : SymbolicOperandWithRequirements<FunctionControlOperand, value, NAME, 0, 0, [], []>;
1377}
1378
1379defm None : FunctionControlOperand<0x0>;
1380defm Inline : FunctionControlOperand<0x1>;
1381defm DontInline : FunctionControlOperand<0x2>;
1382defm Pure : FunctionControlOperand<0x4>;
1383defm Const : FunctionControlOperand<0x8>;
1384
1385//===----------------------------------------------------------------------===//
1386// Multiclass used to define MemorySemantics enum values and at the same time
1387// SymbolicOperand entries with string mnemonics, versioning, extensions and
1388// capabilities.
1389//===----------------------------------------------------------------------===//
1390
1391def MemorySemantics : GenericEnum, Operand<i32> {
1392  let FilterClass = "MemorySemantics";
1393  let NameField = "Name";
1394  let ValueField = "Value";
1395  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1396}
1397
1398class MemorySemantics<string name, bits<32> value> {
1399  string Name = name;
1400  bits<32> Value = value;
1401}
1402
1403multiclass MemorySemanticsOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
1404  def : MemorySemantics<NAME, value>;
1405  defm : SymbolicOperandWithRequirements<MemorySemanticsOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
1406}
1407
1408defm None : MemorySemanticsOperand<0x0, 0, 0, [], []>;
1409defm Acquire : MemorySemanticsOperand<0x2, 0, 0, [], []>;
1410defm Release : MemorySemanticsOperand<0x4, 0, 0, [], []>;
1411defm AcquireRelease : MemorySemanticsOperand<0x8, 0, 0, [], []>;
1412defm SequentiallyConsistent : MemorySemanticsOperand<0x10, 0, 0, [], []>;
1413defm UniformMemory : MemorySemanticsOperand<0x40, 0, 0, [], [Shader]>;
1414defm SubgroupMemory : MemorySemanticsOperand<0x80, 0, 0, [], []>;
1415defm WorkgroupMemory : MemorySemanticsOperand<0x100, 0, 0, [], []>;
1416defm CrossWorkgroupMemory : MemorySemanticsOperand<0x200, 0, 0, [], []>;
1417defm AtomicCounterMemory : MemorySemanticsOperand<0x400, 0, 0, [], [AtomicStorage]>;
1418defm ImageMemory : MemorySemanticsOperand<0x800, 0, 0, [], []>;
1419defm OutputMemoryKHR : MemorySemanticsOperand<0x1000, 0, 0, [], [VulkanMemoryModelKHR]>;
1420defm MakeAvailableKHR : MemorySemanticsOperand<0x2000, 0, 0, [], [VulkanMemoryModelKHR]>;
1421defm MakeVisibleKHR : MemorySemanticsOperand<0x4000, 0, 0, [], [VulkanMemoryModelKHR]>;
1422
1423//===----------------------------------------------------------------------===//
1424// Multiclass used to define MemoryOperand enum values and at the same time
1425// SymbolicOperand entries with string mnemonics, versioning, extensions and
1426// capabilities.
1427//===----------------------------------------------------------------------===//
1428
1429def MemoryOperand : GenericEnum, Operand<i32> {
1430  let FilterClass = "MemoryOperand";
1431  let NameField = "Name";
1432  let ValueField = "Value";
1433  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1434}
1435
1436class MemoryOperand<string name, bits<32> value> {
1437  string Name = name;
1438  bits<32> Value = value;
1439}
1440
1441multiclass MemoryOperandOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
1442  def : MemoryOperand<NAME, value>;
1443  defm : SymbolicOperandWithRequirements<MemoryOperandOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
1444}
1445
1446defm None : MemoryOperandOperand<0x0, 0, 0, [], []>;
1447defm Volatile : MemoryOperandOperand<0x1, 0, 0, [], []>;
1448defm Aligned : MemoryOperandOperand<0x2, 0, 0, [], []>;
1449defm Nontemporal : MemoryOperandOperand<0x4, 0, 0, [], []>;
1450defm MakePointerAvailableKHR : MemoryOperandOperand<0x8, 0, 0, [], [VulkanMemoryModelKHR]>;
1451defm MakePointerVisibleKHR : MemoryOperandOperand<0x10, 0, 0, [], [VulkanMemoryModelKHR]>;
1452defm NonPrivatePointerKHR : MemoryOperandOperand<0x20, 0, 0, [], [VulkanMemoryModelKHR]>;
1453
1454//===----------------------------------------------------------------------===//
1455// Multiclass used to define Scope enum values and at the same time
1456// SymbolicOperand entries with string mnemonics, versioning, extensions and
1457// capabilities.
1458//===----------------------------------------------------------------------===//
1459
1460def Scope : GenericEnum, Operand<i32> {
1461  let FilterClass = "Scope";
1462  let NameField = "Name";
1463  let ValueField = "Value";
1464  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1465}
1466
1467class Scope<string name, bits<32> value> {
1468  string Name = name;
1469  bits<32> Value = value;
1470}
1471
1472multiclass ScopeOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
1473  def : Scope<NAME, value>;
1474  defm : SymbolicOperandWithRequirements<ScopeOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
1475}
1476
1477defm CrossDevice : ScopeOperand<0, 0, 0, [], []>;
1478defm Device : ScopeOperand<1, 0, 0, [], []>;
1479defm Workgroup : ScopeOperand<2, 0, 0, [], []>;
1480defm Subgroup : ScopeOperand<3, 0, 0, [], []>;
1481defm Invocation : ScopeOperand<4, 0, 0, [], []>;
1482defm QueueFamilyKHR : ScopeOperand<5, 0, 0, [], [VulkanMemoryModelKHR]>;
1483
1484//===----------------------------------------------------------------------===//
1485// Multiclass used to define GroupOperation enum values and at the same time
1486// SymbolicOperand entries with string mnemonics, versioning, extensions and
1487// capabilities.
1488//===----------------------------------------------------------------------===//
1489
1490def GroupOperation : GenericEnum, Operand<i32> {
1491  let FilterClass = "GroupOperation";
1492  let NameField = "Name";
1493  let ValueField = "Value";
1494  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1495}
1496
1497class GroupOperation<string name, bits<32> value> {
1498  string Name = name;
1499  bits<32> Value = value;
1500}
1501
1502multiclass GroupOperationOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
1503  def NAME : GroupOperation<NAME, value>;
1504  defm : SymbolicOperandWithRequirements<GroupOperationOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
1505}
1506
1507defm Reduce : GroupOperationOperand<0, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>;
1508defm InclusiveScan : GroupOperationOperand<1, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>;
1509defm ExclusiveScan : GroupOperationOperand<2, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>;
1510defm ClusteredReduce : GroupOperationOperand<3, 0, 0, [], [GroupNonUniformClustered]>;
1511defm PartitionedReduceNV : GroupOperationOperand<6, 0, 0, [], [GroupNonUniformPartitionedNV]>;
1512defm PartitionedInclusiveScanNV : GroupOperationOperand<7, 0, 0, [], [GroupNonUniformPartitionedNV]>;
1513defm PartitionedExclusiveScanNV : GroupOperationOperand<8, 0, 0, [], [GroupNonUniformPartitionedNV]>;
1514
1515//===----------------------------------------------------------------------===//
1516// Multiclass used to define KernelEnqueueFlags enum values and at the same time
1517// SymbolicOperand entries with string mnemonics, versioning, extensions and
1518// capabilities.
1519//===----------------------------------------------------------------------===//
1520
1521def KernelEnqueueFlags : GenericEnum, Operand<i32> {
1522  let FilterClass = "KernelEnqueueFlags";
1523  let NameField = "Name";
1524  let ValueField = "Value";
1525  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1526}
1527
1528class KernelEnqueueFlags<string name, bits<32> value> {
1529  string Name = name;
1530  bits<32> Value = value;
1531}
1532
1533multiclass KernelEnqueueFlagsOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
1534  def : KernelEnqueueFlags<NAME, value>;
1535  defm : SymbolicOperandWithRequirements<KernelEnqueueFlagsOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
1536}
1537
1538defm NoWait : KernelEnqueueFlagsOperand<0, 0, 0, [], [Kernel]>;
1539defm WaitKernel : KernelEnqueueFlagsOperand<1, 0, 0, [], [Kernel]>;
1540defm WaitWorkGroup : KernelEnqueueFlagsOperand<2, 0, 0, [], [Kernel]>;
1541
1542//===----------------------------------------------------------------------===//
1543// Multiclass used to define KernelProfilingInfo enum values and at the same time
1544// SymbolicOperand entries with string mnemonics, versioning, extensions and
1545// capabilities.
1546//===----------------------------------------------------------------------===//
1547
1548def KernelProfilingInfo : GenericEnum, Operand<i32> {
1549  let FilterClass = "KernelProfilingInfo";
1550  let NameField = "Name";
1551  let ValueField = "Value";
1552  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1553}
1554
1555class KernelProfilingInfo<string name, bits<32> value> {
1556  string Name = name;
1557  bits<32> Value = value;
1558}
1559
1560multiclass KernelProfilingInfoOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
1561  def : KernelProfilingInfo<NAME, value>;
1562  defm : SymbolicOperandWithRequirements<KernelProfilingInfoOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
1563}
1564
1565defm None : KernelProfilingInfoOperand<0x0, 0, 0, [], []>;
1566defm CmdExecTime : KernelProfilingInfoOperand<0x1, 0, 0, [], [Kernel]>;
1567
1568//===----------------------------------------------------------------------===//
1569// Multiclass used to define Opcode enum values and at the same time
1570// SymbolicOperand entries with string mnemonics and capabilities.
1571//===----------------------------------------------------------------------===//
1572
1573def Opcode : GenericEnum, Operand<i32> {
1574  let FilterClass = "Opcode";
1575  let NameField = "Name";
1576  let ValueField = "Value";
1577  let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
1578}
1579
1580class Opcode<string name, bits<32> value> {
1581  string Name = name;
1582  bits<32> Value = value;
1583}
1584
1585multiclass OpcodeOperand<bits<32> value> {
1586  def : Opcode<NAME, value>;
1587  defm : SymbolicOperandWithRequirements<OpcodeOperand, value, NAME, 0, 0, [], []>;
1588}
1589// TODO: implement other mnemonics.
1590defm InBoundsPtrAccessChain : OpcodeOperand<70>;
1591defm PtrCastToGeneric : OpcodeOperand<121>;
1592