[all-commits] [llvm/llvm-project] ad4b7f: [mlir][Math] Support fold Log2Op with constant dense.

Jianjian Guan via All-commits all-commits at lists.llvm.org
Sun Jul 10 19:48:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad4b7fb3ce018338e6ad8f5dbc26957434ad820c
      https://github.com/llvm/llvm-project/commit/ad4b7fb3ce018338e6ad8f5dbc26957434ad820c
  Author: jacquesguan <Jianjian.Guan at streamcomputing.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/CommonFolders.h
    M mlir/lib/Dialect/Math/IR/MathOps.cpp
    M mlir/test/Dialect/Math/canonicalize.mlir
    M mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir

  Log Message:
  -----------
  [mlir][Math] Support fold Log2Op with constant dense.

This patch is similar to D129108, it adds a conditional unary constant folder which allow to exit when the constants not meet the fold condition. And use it for Log2Op to make it able to fold the constant dense.

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




More information about the All-commits mailing list