[mlir] Add a DCE pass for dead symbols.
authorRiver Riddle <riddleriver@gmail.com>
Tue, 28 Jan 2020 07:24:48 +0000 (23:24 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Tue, 28 Jan 2020 07:29:30 +0000 (23:29 -0800)
commitb276dec5b65dfb885bf661484b9eab1e719c5e47
tree7103889d31b1c1043e164841dd2b4122ede9ecfb
parentab9e5598cdc793890f514c2756866c53ad7971f3
[mlir] Add a DCE pass for dead symbols.

Summary: This pass deletes all symbols that are found to be unreachable. This is done by computing the set of operations that are known to be live, propagating that liveness to other symbols, and then deleting all symbols that are not within this live set.

Differential Revision: https://reviews.llvm.org/D72482
mlir/include/mlir/IR/SymbolTable.h
mlir/include/mlir/Transforms/Passes.h
mlir/lib/IR/SymbolTable.cpp
mlir/lib/Transforms/CMakeLists.txt
mlir/lib/Transforms/SymbolDCE.cpp [new file with mode: 0644]
mlir/test/IR/test-symbol-dce.mlir [new file with mode: 0644]