Lots of SPIR-V ops take enum attributes and certain enum cases
need extra capabilities or extensions to be available. This commit
extends to allow specifying availability spec on enum cases.
Extra utility functions are generated for the corresponding enum
classes to return the availability requirement. The availability
interface implemention for a SPIR-V op now goes over all enum
attributes to collect the availability requirements.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: pass. 61132 tests passed, 0 failed and 728 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
SPIR-V parts look good to me. Would still prefer the version/capability related methods into a separate file. They seem to have disjoint functionality (but its a personal preference).
You mean in the SPIR-V dialect or the TableGen backend? For the former I'm open to suggestions given that they will stay as what is implemented here for the foreseeable future (minus minor changes maybe) so having a clean library structure makes sense. For the latter, I won't worry that much given that eventually they will be moved to a proper place in core.