[spirv] Change enum case uniquing in gen_spirv_dialect.py
In SPIR-V we can have multiple symbols corresponding to the same enum value. This is because when an extension is introduced into the core spec, its suffix is typically removed, e.g., 'VulkanKHR' memory model becomes 'Vulkan' memory model in SPIR-V 1.5. Previously we just keep the first symbol for an enum value. That symbol is not necessarily a better one. This CL changes to sort symbols, grouped by enum values, alphabetically and then keep the first one, which is typically shorter and without the extension suffix. We also fix up certain ones like HlslSemanticGOOGLE. PiperOrigin-RevId: 272290363
Loading
Please sign in to comment