[all-commits] [llvm/llvm-project] 5c3b20: [mlir] Update LLVMIR Fastmath flags use of MLIR Bi...

Jeremy Furtek via All-commits all-commits at lists.llvm.org
Tue May 17 11:19:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c3b20520b5716d61833c8ce45d19faa48ce8db7
      https://github.com/llvm/llvm-project/commit/5c3b20520b5716d61833c8ce45d19faa48ce8db7
  Author: jfurtek <jfurtek at nvidia.com>
  Date:   2022-05-17 (Tue, 17 May 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/IR/EnumAttr.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/IR/attribute.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/tools/mlir-tblgen/EnumsGen.cpp
    M mlir/unittests/TableGen/EnumsGenTest.cpp
    M mlir/unittests/TableGen/enums.td

  Log Message:
  -----------
  [mlir] Update LLVMIR Fastmath flags use of MLIR BitEnum functionality

This diff updates the LLVMIR dialect Fastmath flags attribute to use recently
added features of `BitEnum` attributes. Specifically, this diff uses the bit
enum "group" case to represent the `fast` value as an alias for a combination
of other values (`ninf`, `nnan`, ...), instead of using a separate integer
value. (This is in line with LLVM's fastmath flags representation.) This diff
also leverages the `printBitEnumPrimaryGroups` `tblgen` field for concise
enum printing.

The `BitEnum` features were developed for an upcoming diff that adds `fastmath`
support to the arithmetic dialect. This diff simply applies some of the relevant
new features to the LLVM dialect attribute.

Reviewed By: ftynse, Mogball

Differential Revision: https://reviews.llvm.org/D124720




More information about the All-commits mailing list