llvm/mlir
Valentin Clement bd514967aa
[mlir][CSE] Add ability to remove commutative operations
This patch takes advantage of the Commutative trait on operation
to remove identical commutative operations where the operands are swapped.

The second operation below can be removed since `arith.addi` is commutative.
```
%1 = arith.addi %a, %b : i32
%2 = arith.addi %b, %a : i32
```

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D123492
2022-04-16 21:09:47 +02:00
..
benchmark/python
cmake/modules
docs [mlir] Split intrinsics out of LLVMOps.td 2022-04-14 13:23:31 +02:00
examples [MLIR] Standalone: Fix copy-and-paste typo (NFC) 2022-04-07 11:22:21 +02:00
include [mlir] Add asserts when changing various MLIRContext configurations 2022-04-15 21:49:03 -07:00
lib [mlir][CSE] Add ability to remove commutative operations 2022-04-16 21:09:47 +02:00
python [mlir][Linalg] Add pooling_nchw_sum op. 2022-04-08 17:57:47 +05:30
test [mlir][CSE] Add ability to remove commutative operations 2022-04-16 21:09:47 +02:00
tools Apply clang-tidy fixes for readability-identifier-naming in OpFormatGen.cpp (NFC) 2022-04-16 06:36:12 +00:00
unittests [mlir][ods][NFC] Move enum attribute definitions from OpBase.td to EnumAttr.td 2022-04-15 16:51:14 +00:00
utils [mlir] Fix a typo to load lsp-mode correctly. 2022-04-14 00:04:40 +00:00
.clang-format
.clang-tidy
CMakeLists.txt mlir: set CMAKE_INCLUDE_CURRENT_DIR to fix out-of-tree builds 2022-03-19 18:22:09 -05:00
LICENSE.TXT
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.