[all-commits] [llvm/llvm-project] dd38f8: [mlir][LLVMIR] Update LLVMIR fastmath to use EnumA...

Jeremy Furtek via All-commits all-commits at lists.llvm.org
Mon Oct 17 15:06:08 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd38f899803465dd2765d1601b3989df3bd53863
  Author: Jeremy Furtek <jfurtek at nvidia.com>
  Date:   2022-10-17 (Mon, 17 Oct 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    M mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Target/LLVMIR/llvmir.mlir

  Log Message:
  [mlir][LLVMIR] Update LLVMIR fastmath to use EnumAttr tblgen classes

This diff updates the `fastmath` attribute in the LLVMIR dialect to use `tblgen`
classes that were developed after the initial LLVMIR `fastmath` implementation.
Using the `EnumAttr` `tblgen` classes brings the LLVMIR `fastmath` attribute in
line with other dialects, and eliminates some of the custom printing and parsing
code in the LLVMIR dialect.

Subsequent commits will further reduce the custom processing code for the LLVMIR
`fastmath` attribute by unifying printing/parsing functionality between the
LLVMIR and `arith` `fastmath` attributes. (The actual attributes will remain
separate, but the printing and parsing will be made generic, and will be usable
by other dialects/attributes.)

Reviewed By: ftynse

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

More information about the All-commits mailing list