Convert the Canonicalize and CSE passes to generic Operation Passes.
authorRiver Riddle <riverriddle@google.com>
Thu, 24 Oct 2019 22:00:36 +0000 (15:00 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 24 Oct 2019 22:01:09 +0000 (15:01 -0700)
commit2b61b7979eb59df579a3a4bf6fe768ddf2a556f4
treeecbca8b29c18ac250c144271dae96ed3859d64af
parentef43b5653830641766997c10699682f90f1c24da
Convert the Canonicalize and CSE passes to generic Operation Passes.

This allows for them to be used on other non-function, or even other function-like, operations. The algorithms are already generic, so this is simply changing the derived pass type. The majority of this change is just ensuring that the nesting of these passes remains the same, as the pass manager won't auto-nest them anymore.

PiperOrigin-RevId: 276573038
25 files changed:
mlir/bindings/python/pybind.cpp
mlir/examples/toy/Ch3/toyc.cpp
mlir/examples/toy/Ch4/toyc.cpp
mlir/examples/toy/Ch5/toyc.cpp
mlir/examples/toy/Ch6/toyc.cpp
mlir/g3doc/Tutorials/Toy/Ch-3.md
mlir/include/mlir/Pass/PassManager.h
mlir/include/mlir/Transforms/Passes.h
mlir/lib/Transforms/CSE.cpp
mlir/lib/Transforms/Canonicalizer.cpp
mlir/test/AffineOps/canonicalize.mlir
mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir
mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir
mlir/test/Dialect/GPU/canonicalize.mlir
mlir/test/Dialect/LLVMIR/terminator.mlir
mlir/test/Dialect/QuantOps/canonicalize.mlir
mlir/test/Dialect/SPIRV/canonicalize.mlir
mlir/test/Pass/ir-printing.mlir
mlir/test/Pass/pass-timing.mlir
mlir/test/Pass/pipeline-parsing.mlir
mlir/test/Quantizer/matmul.mlir
mlir/test/Transforms/canonicalize.mlir
mlir/test/Transforms/cse.mlir
mlir/test/Transforms/test-canonicalize.mlir
mlir/test/lib/Transforms/TestConstantFold.cpp