llvm-project/mlir/unittests/TableGen
Jeremy Furtek 33185e66f2 [mlir] Add ODS support for enum attributes with grouped bit cases
This diff modifies the tablegen specification and code generation for
BitEnumAttr attributes in MLIR Operation Definition Specification (ODS) files.
Specifically:

- there is a new tablegen class for "none" values (i.e. no bits set)
- single-bit enum cases are specified via bit index (i.e. [0, 31]) instead of
  the resulting enum integer value
- there is a new tablegen class to represent a "grouped" bitwise OR of other
  enum values

This diff is intended as an initial step towards improving "fastmath"
optimization support in MLIR, to allow more precise control of whether certain
floating point optimizations are applied in MLIR passes. "Fast" math options
for floating point MLIR operations would (following subsequent RFC and
discussion) be specified by using the improved enum bit support in this diff.
For example, a "fast" enum value would act as an alias for a group of other
cases (e.g. finite-math-only, no-signed-zeros, etc.), in a way that is similar
to support in C/C++ compilers (clang, gcc).

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D117029
2022-01-26 21:01:01 +00:00
..
CMakeLists.txt [mlir] Replace `include_directories` 2021-09-10 07:06:27 +00:00
EnumsGenTest.cpp [mlir] Add ODS support for enum attributes with grouped bit cases 2022-01-26 21:01:01 +00:00
FormatTest.cpp [NFC] Fix comment style in MLIR unittests to conform to LLVM coding standards. 2020-07-12 07:27:02 -07:00
OpBuildGen.cpp Apply clang-tidy fixes for performance-move-const-arg to MLIR (NFC) 2022-01-02 22:36:56 +00:00
PassGenTest.cpp [mlir][ODS] Fix copy ctor for generate Pass classes 2021-06-21 14:07:31 +03:00
StructsGenTest.cpp Fix clang-tidy issues in mlir/ (NFC) 2021-12-20 20:25:01 +00:00
enums.td [mlir] Add ODS support for enum attributes with grouped bit cases 2022-01-26 21:01:01 +00:00
passes.td [mlir][ODS] Fix copy ctor for generate Pass classes 2021-06-21 14:07:31 +03:00
structs.td [mlir][ODS] Rename several uses of 'description' to 'summary' 2021-01-06 14:18:58 -08:00