[all-commits] [llvm/llvm-project] 472291: [mlir][Arith] Generalize and improve -int-range-op...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Mon Jun 10 07:56:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 472291111d9135961305afebe4e283e3e4e7eebc
      https://github.com/llvm/llvm-project/commit/472291111d9135961305afebe4e283e3e4e7eebc
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2024-06-10 (Mon, 10 Jun 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Arith/Transforms/Passes.td
    M mlir/lib/Dialect/Arith/Transforms/IntRangeOptimizations.cpp
    M mlir/test/Dialect/Arith/int-range-interface.mlir
    M mlir/test/Dialect/Arith/int-range-opts.mlir
    M mlir/test/Dialect/GPU/int-range-interface.mlir
    M mlir/test/Dialect/Index/int-range-inference.mlir
    M mlir/test/Interfaces/InferIntRangeInterface/infer-int-range-test-ops.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    R mlir/test/lib/Transforms/TestIntRangeInference.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir][Arith] Generalize and improve -int-range-optimizations (#94712)

When the integer range analysis was first develop, a pass that did
integer range-based constant folding was developed and used as a test
pass. There was an intent to add such a folding to SCCP, but that hasn't
happened.

Meanwhile, -int-range-optimizations was added to the arith dialect's
transformations. The cmpi simplification in that pass is a strict subset
of the constant folding that lived in
-test-int-range-inference.

This commit moves the former test pass into -int-range-optimizaitons,
subsuming its previous contents. It also adds an optimization from
rocMLIR where `rem{s,u}i` operations that are noops are replaced by
their left operands.



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