[all-commits] [llvm/llvm-project] bd5149: [mlir][CSE] Add ability to remove commutative oper...
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Sat Apr 16 12:10:09 PDT 2022
Author: Valentin Clement <clementval at gmail.com>
Date: 2022-04-16 (Sat, 16 Apr 2022)
[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
More information about the All-commits