[all-commits] [llvm/llvm-project] c40146: [mlir][EmitC] Add Arith to EmitC conversions (#84151)

Marius Brehler via All-commits all-commits at lists.llvm.org
Thu Mar 7 02:34:34 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c40146c214a705a232848144d9412c8a7c73f0fe
      https://github.com/llvm/llvm-project/commit/c40146c214a705a232848144d9412c8a7c73f0fe
  Author: Marius Brehler <marius.brehler at iml.fraunhofer.de>
  Date:   2024-03-07 (Thu, 07 Mar 2024)

  Changed paths:
    A mlir/include/mlir/Conversion/ArithToEmitC/ArithToEmitC.h
    A mlir/include/mlir/Conversion/ArithToEmitC/ArithToEmitCPass.h
    M mlir/include/mlir/Conversion/Passes.h
    M mlir/include/mlir/Conversion/Passes.td
    A mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp
    A mlir/lib/Conversion/ArithToEmitC/ArithToEmitCPass.cpp
    A mlir/lib/Conversion/ArithToEmitC/CMakeLists.txt
    M mlir/lib/Conversion/CMakeLists.txt
    A mlir/test/Conversion/ArithToEmitC/arith-to-emitc.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir][EmitC] Add Arith to EmitC conversions (#84151)

This adds patterns and a pass to convert the Arith dialect to EmitC. For
now, this covers arithemtic binary ops operating on floating point
types.

It is not checked within the patterns whether the types, such as the
Tensor type, are supported in the respective EmitC operations. If
unsupported types should be converted, the conversion will fail anyway
because no legal EmitC operation can be created. This can clearly be
improved in a follow up, also resulting in better error messages.
Functions for such checks should not solely be used in the conversions
and should also be (re)used in the verifier.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list