By default, for an enum attribute, we will generate a list of equality
comparisons for all supported cases inside it's predicate. This list
can be fairly large for certain SPIR-V enum attributes. Instead, we
already have such a list generated by EnumsGen in the symbolize
functions. Leverage that to simplify the generated C++ code.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: pass. 61884 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
sybmolize is a typo in the description :)
mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td | ||
---|---|---|
2894 | optional: it would make this file more readable if this was instead a class; let predicate = I32EnumAttrIsSymbolizable<"SelectionControl"> etc |
mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td | ||
---|---|---|
2894 | Good point! This stuff can indeed be deduplicated. I created new wrapper classes to set this there to avoid have each enum to have it. |
Unit tests: pass. 61912 tests passed, 0 failed and 783 were skipped.
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Unit tests: pass. 61912 tests passed, 0 failed and 783 were skipped.
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
optional: it would make this file more readable if this was instead a class; let predicate = I32EnumAttrIsSymbolizable<"SelectionControl"> etc