[mlir] Delete dup code and use unified methods.
authorHanhan Wang <hanchung@google.com>
Fri, 21 Oct 2022 23:51:11 +0000 (16:51 -0700)
committerHanhan Wang <hanchung@google.com>
Fri, 21 Oct 2022 23:51:44 +0000 (16:51 -0700)
commit00767cb45225e142ce5b5cf6312f3e689d53bb82
tree79b53124e98e8caca9ac99cda28e3ac68769aab4
parent27d8eedd5a3cd7fd644be4f06225ffa1ff04cccf
[mlir] Delete dup code and use unified methods.

The foldMemRefCast method is defined in memref namespace; the
foldTensorCast method is defined in tensor namespace. This revision
deletes the dup code and use the unified methods.

Reviewed By: dcaballe

Differential Revision: https://reviews.llvm.org/D136379
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp