[mlir][Transforms] Simplify region before simplifying operation in CSE.
authorMahesh Ravishankar <ravishankarm@google.com>
Wed, 7 Dec 2022 01:00:37 +0000 (01:00 +0000)
committerMahesh Ravishankar <ravishankarm@google.com>
Wed, 7 Dec 2022 23:11:14 +0000 (23:11 +0000)
commit242d5b2ba47d6956225d79ef6d1f0aa0a1cf8330
tree377f26273b40054cfed20fcfeeecfe03a2478fe5
parentbcc4470bade15dbafa879973828a03c7e5194399
[mlir][Transforms] Simplify region before simplifying operation in CSE.

This covers more options for CSE. It also ensures that two operations
that have same operands but different regions to begin with, but same
regions after `simplifyRegions`, don't get both added to the list of
`knownValues`.

Fixes #59135

Differential Revision: https://reviews.llvm.org/D139490
mlir/lib/Transforms/CSE.cpp
mlir/test/Transforms/cse.mlir