Page MenuHomePhabricator

[mlir][spirv] Add implied capabilities and availability for capabilities
ClosedPublic

Authored by antiagainst on Jan 15 2020, 5:12 AM.

Details

Summary

Certain SPIR-V capabilities are only available in certain SPIR-V versions
or extensions. Also a SPIR-V capability may implicitly declares other
capabilities.

This commit updates gen_spirv_dialect.py to support generating such
information into SPIRVBase.td. It requires us to topologically sort
all capabilities because now a capability can refer to another one.

This commits also registers a few extensions because their symbols are
used by capability availability.

Note that this commit hasn't updated SPIRVConversionTarget to take
into consideration such relationship yet. That will be done in a
following-up commit.

Diff Detail

Event Timeline

antiagainst created this revision.Jan 15 2020, 5:12 AM

Unit tests: pass. 61882 tests passed, 0 failed and 782 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

benvanik accepted this revision.Jan 15 2020, 9:09 AM
This revision is now accepted and ready to land.Jan 15 2020, 9:09 AM
This revision was automatically updated to reflect the committed changes.