[all-commits] [llvm/llvm-project] 589764: [mlir][math] Initial support for fastmath flag att...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Fri Nov 4 10:44:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 589764a382642ae8374cfe21a6b10f839c8596da
      https://github.com/llvm/llvm-project/commit/589764a382642ae8374cfe21a6b10f839c8596da
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2022-11-04 (Fri, 04 Nov 2022)

  Changed paths:
    A mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
    M mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
    M mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
    M mlir/include/mlir/Dialect/Math/IR/Math.h
    M mlir/include/mlir/Dialect/Math/IR/MathOps.td
    A mlir/lib/Conversion/ArithCommon/AttrToLLVMConverter.cpp
    A mlir/lib/Conversion/ArithCommon/CMakeLists.txt
    M mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
    M mlir/lib/Conversion/ArithToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/CMakeLists.txt
    M mlir/lib/Conversion/MathToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/MathToLLVM/MathToLLVM.cpp
    M mlir/test/Conversion/MathToLLVM/math-to-llvm.mlir
    M mlir/test/Dialect/Math/ops.mlir

  Log Message:
  -----------
  [mlir][math] Initial support for fastmath flag attributes for Math dialect.

Added arith::FastMathAttr and ArithFastMathInterface support for Math dialect
floating point operations.

This change-set creates ArithCommon conversion utils that currently
provide classes and methods to aid with arith::FastMathAttr conversion
into LLVM::FastmathFlags. These utils are used in ArithToLLVM and
MathToLLVM convertors, but may eventually be used by other converters
that need to convert fast math attributes.

Since Math dialect operations use arith::FastMathAttr, MathOps.td now
has to include enum and attributes definitions from Arith dialect.
To minimize the amount of TD code included from Arith dialect,
I moved FastMathAttr definition into ArithBase.td.

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




More information about the All-commits mailing list