llvm-project/mlir/lib
Valentin Clement 02da964350
[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
2022-04-07 10:08:55 +02:00
..
Analysis [MLIR][Presburger] Refactor subtraction in preparation for making it iterative 2022-04-06 16:35:28 +01:00
Bindings/Python [MLIR] Add block detach func to CAPI and use it in Python bindings 2022-04-06 13:11:56 -07:00
CAPI [MLIR] Add block detach func to CAPI and use it in Python bindings 2022-04-06 13:11:56 -07:00
Conversion [MLIR] Check for static shape before bare pointer conversion 2022-04-05 17:56:41 +02:00
Dialect [mlir][sparse] replace stack-based access pattern with dyn-alloc 2022-04-06 17:10:43 -07:00
ExecutionEngine [mlir][sparse] avoid reserving dense storage for ptr/idx 2022-04-05 17:40:01 -07:00
IR [mlir] Bubble up tensor.extract_slice above linalg operation 2022-03-31 16:48:38 +00:00
Interfaces [mlir] Simplify LoopLikeOpInterface 2022-03-28 18:10:04 +00:00
Parser [mlir:Parser][NFC] Replace SSAUseInfo with OpAsmParser::UnresolvedOperand 2022-04-06 18:25:08 -07:00
Pass [Support/Hash functions] Change the `final()` and `result()` of the hashing functions to return an array of bytes 2022-04-05 21:38:06 -07:00
Reducer Apply clang-tidy fixes for performance-move-const-arg in ReductionNode.cpp (NFC) 2022-01-10 01:05:14 +00:00
Rewrite [mlir:PDL] Expand how native constraint/rewrite functions can be defined 2022-04-06 17:41:59 -07:00
Support [mlir] Rework the implementation of TypeID 2022-04-04 13:52:26 -07:00
TableGen [mlir][ods] Add description to Attr and ensure doc generation 2022-04-05 10:40:15 +02:00
Target [OpenMPIRBuilder] Detect and fix ambiguous InsertPoints for createSections. 2022-04-05 12:36:29 -05:00
Tools [mlir:PDL] Expand how native constraint/rewrite functions can be defined 2022-04-06 17:41:59 -07:00
Transforms [mlir][CSE] Remove duplicated operations with MemRead side-effect 2022-04-07 10:08:55 +02:00
CMakeLists.txt [mlir][NFC] Move Translation.h to a Tools/mlir-translate directory 2022-03-07 01:05:38 -08:00