Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

[spirv] Change spv.module custom assembly #224

Open
antiagainst opened this issue Nov 6, 2019 · 0 comments
Open

[spirv] Change spv.module custom assembly #224

antiagainst opened this issue Nov 6, 2019 · 0 comments

Comments

@antiagainst
Copy link
Contributor

Right now the arguments in spv.module is defined as

let arguments = (ins
SPV_AddressingModelAttr:$addressing_model,
SPV_MemoryModelAttr:$memory_model,
OptionalAttr<StrArrayAttr>:$capabilities,
OptionalAttr<StrArrayAttr>:$extensions,
OptionalAttr<StrArrayAttr>:$extended_instruction_sets
);

Actually for $capabilities we should be able to use TypedArrayAttr<SPV_CapabilityAttr> as the kind but still parsing and printing the symbols for those capability numbers in custom assembly form.

Additionally for the custom assembly form, it would be nice to change to

`spv.module`
    spv-addressing-model spv-memory-model
    (`capabilities[` (spv-capability-string)+ `]`)?
    (`extensions[` (spv-extension-string)+ `]`)?
    (`ext-inst-sets[` (spv-extended-instruction-set-string)+ `]`)?
    region

This is easier to read and more consistent with the layout of SPIR-V itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant