[all-commits] [llvm/llvm-project] 2455d1: [mlir][NFC] Switch dialects with no fold methods t...

zero9178 via All-commits all-commits at lists.llvm.org
Wed Jan 11 07:17:25 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2455d1ce71529777e5fea2aaf4a6680a858c6f49
      https://github.com/llvm/llvm-project/commit/2455d1ce71529777e5fea2aaf4a6680a858c6f49
  Author: Markus Böck <markus.boeck02 at gmail.com>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/AMDGPU/AMDGPU.td
    M mlir/include/mlir/Dialect/AMX/AMX.td
    M mlir/include/mlir/Dialect/ArmNeon/ArmNeon.td
    M mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td
    M mlir/include/mlir/Dialect/Async/IR/AsyncDialect.td
    M mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td
    M mlir/include/mlir/Dialect/DLTI/DLTIBase.td
    M mlir/include/mlir/Dialect/MLProgram/IR/MLProgramBase.td
    M mlir/include/mlir/Dialect/NVGPU/IR/NVGPU.td
    M mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/include/mlir/Dialect/PDL/IR/PDLDialect.td
    M mlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td
    M mlir/include/mlir/Dialect/X86Vector/X86Vector.td

  Log Message:
  -----------
  [mlir][NFC] Switch dialects with no fold methods to the new fold API

These are the trivial cases which do not require any other code changes.
Changing the default might not have any semantic changes but at least guarantees that no new fold methods may be added to these dialects while migrating.

This commit is also revertible at the end of the migration

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


  Commit: a3fa6b86fa424dab1f1b6cbc38e27c8c3364f2f4
      https://github.com/llvm/llvm-project/commit/a3fa6b86fa424dab1f1b6cbc38e27c8c3364f2f4
  Author: Markus Böck <markus.boeck02 at gmail.com>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
    M mlir/lib/Dialect/Arith/IR/ArithOps.cpp

  Log Message:
  -----------
  [mlir][Arith][NFC] Migrate Arith dialect to the new fold API

This is the dialect in-tree with the most `fold` method implementations by far. This patch simply changes all implementations to make use of the new signature.

Admittedly, the code readability does not get a lot better in this case, simply due to most methods making use of `constFoldBinaryOp`. I did not modify that function or its interface as part of this patch, but might be something to consider in the future.

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


Compare: https://github.com/llvm/llvm-project/compare/678dd9a589d6...a3fa6b86fa42


More information about the All-commits mailing list