[all-commits] [llvm/llvm-project] 02da96: [mlir][CSE] Remove duplicated operations with MemR...
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Thu Apr 7 01:09:12 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 02da9643506dee4a82353e0f911513279634d846
https://github.com/llvm/llvm-project/commit/02da9643506dee4a82353e0f911513279634d846
Author: Valentin Clement <clementval at gmail.com>
Date: 2022-04-07 (Thu, 07 Apr 2022)
Changed paths:
M flang/include/flang/Optimizer/Dialect/FIROps.td
A flang/test/Fir/cse.fir
M mlir/lib/Transforms/CSE.cpp
M mlir/test/Examples/Toy/Ch5/affine-lowering.mlir
M mlir/test/Examples/Toy/Ch6/affine-lowering.mlir
M mlir/test/Examples/Toy/Ch7/affine-lowering.mlir
M mlir/test/Transforms/cse.mlir
M mlir/test/lib/Dialect/Test/TestOps.td
Log Message:
-----------
[mlir][CSE] Remove duplicated operations with MemRead side-effect
This patch enhances the CSE pass to deal with simple cases of duplicated
operations with MemoryEffects.
It allows the CSE pass to remove safely duplicate operations with the
MemoryEffects::Read that have no other side-effecting operations in
between. Other MemoryEffects::Read operation are allowed.
The use case is pretty simple so far so we can build on top of it to add
more features.
This patch is also meant to avoid a dedicated CSE pass in FIR and was
brought together afetr discussion on https://reviews.llvm.org/D112711.
It does not currently cover the full range of use cases described in
https://reviews.llvm.org/D112711 but the idea is to gradually enhance
the MLIR CSE pass to handle common use cases that can be used by
other dialects.
This patch takes advantage of the new CSE capabilities in Fir.
Reviewed By: mehdi_amini, rriddle, schweitz
Differential Revision: https://reviews.llvm.org/D122801
More information about the All-commits
mailing list