[all-commits] [llvm/llvm-project] 839b43: [mlir] Improve BitEnumAttr, update documentation
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Tue Sep 6 14:36:50 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 839b436c93604e042f74050cf2adadd75f30e898
https://github.com/llvm/llvm-project/commit/839b436c93604e042f74050cf2adadd75f30e898
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2022-09-06 (Tue, 06 Sep 2022)
Changed paths:
M mlir/docs/OpDefinitions.md
A mlir/test/mlir-tblgen/enums-gen.td
M mlir/tools/mlir-tblgen/EnumsGen.cpp
Log Message:
-----------
[mlir] Improve BitEnumAttr, update documentation
- Add new operators to BitEnumAttr, mainly not (which only inverts
bits that can be valid bits for the attribute) and xor
- Add new bit enum utility functions: bitEnumClear(bits, bit) and
bitEnumSet(bits, bit, value=true) as they've come up in code I've been
writing that makes use of such enums
- Add rudimentary tests for the enum generator
- Update the OpDefinition documentation to make it contain a correct
example and to have it account for the changes mentioned above.
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D133374
More information about the All-commits
mailing list