diff options
author | Valentin Clement <clementval@gmail.com> | 2022-04-16 21:08:16 +0200 |
---|---|---|
committer | Valentin Clement <clementval@gmail.com> | 2022-04-16 21:09:47 +0200 |
commit | bd514967aa221bef5d1adaec12abc68511f325f0 (patch) | |
tree | 55156a5ada35fa9dd6d16f5a819f6a7aec13c327 /flang/lib/Semantics/pointer-assignment.cpp | |
parent | bf59cd72447facdb7b17fc00c502d18a02135abb (diff) | |
download | llvm-bd514967aa221bef5d1adaec12abc68511f325f0.zip llvm-bd514967aa221bef5d1adaec12abc68511f325f0.tar.gz llvm-bd514967aa221bef5d1adaec12abc68511f325f0.tar.bz2 |
[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
Diffstat (limited to 'flang/lib/Semantics/pointer-assignment.cpp')
0 files changed, 0 insertions, 0 deletions