llvm-project/mlir
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
..
cmake/modules [mlir] Configure mlir so that it can be directly included in a parent cmakelists.txt 2022-01-19 12:02:22 -08:00
docs [mlir] Add ODS support for enum attributes with grouped bit cases 2022-01-26 21:01:01 +00:00
examples [mlir][Pass] Deprecate FunctionPass in favor of OperationPass<FuncOp> 2022-01-18 19:52:44 -08:00
include [mlir] Add ODS support for enum attributes with grouped bit cases 2022-01-26 21:01:01 +00:00
lib [mlir] Move std.generic_atomic_rmw to the memref dialect 2022-01-26 11:52:01 -08:00
python [mlir] Fix broken __repr__ implementation in Linalg OpDSL 2022-01-24 15:58:35 +01:00
test [mlir] Move std.generic_atomic_rmw to the memref dialect 2022-01-26 11:52:01 -08:00
tools [mlir] Add ODS support for enum attributes with grouped bit cases 2022-01-26 21:01:01 +00:00
unittests [mlir] Add ODS support for enum attributes with grouped bit cases 2022-01-26 21:01:01 +00:00
utils [mlir][textmate] Add support for function visibility 2022-01-18 18:48:43 -08:00
.clang-format
.clang-tidy Enable readability-redundant-smartptr-get in MLIR local clang-tidy config 2022-01-08 20:07:11 +00:00
CMakeLists.txt [cmake] Make include(GNUInstallDirs) always below project(..) 2022-01-20 18:59:17 +00:00
LICENSE.TXT
README.md

README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.