llvm-project/mlir/tools
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
..
mlir-cpu-runner [mlir][Standard] NFC - Drop remaining EDSC usage 2021-05-21 10:40:39 +00:00
mlir-linalg-ods-gen [mlir][OpDSL] Rename `PrimFn` to `ArithFn`. 2022-01-07 12:38:03 +00:00
mlir-lsp-server [mlir:Analysis] Move the LoopAnalysis library to Dialect/Affine/Analysis 2022-01-18 10:28:22 -08:00
mlir-opt [mlir:Analysis] Move the LoopAnalysis library to Dialect/Affine/Analysis 2022-01-18 10:28:22 -08:00
mlir-pdll [mlir][PDLL] Add an initial frontend for PDLL 2021-12-16 02:08:12 +00:00
mlir-reduce [MLIR] Move TestDialect to ::test namespace 2021-08-14 13:24:41 -07:00
mlir-shlib [MLIR] Reapply: Adjust libMLIR building to more closely follow libClang 2020-05-04 20:47:57 -07:00
mlir-spirv-cpu-runner [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
mlir-tblgen [mlir] Add ODS support for enum attributes with grouped bit cases 2022-01-26 21:01:01 +00:00
mlir-translate Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects" 2020-10-04 15:17:34 -07:00
mlir-vulkan-runner [mlir] Use .empty() instead of checking size() == 0. 2022-01-14 11:58:52 +01:00
CMakeLists.txt [mlir][PDLL] Add an initial frontend for PDLL 2021-12-16 02:08:12 +00:00