[mlir] Symbol DCE ignores unknown symbols
authorMogball <jeffniu22@gmail.com>
Mon, 20 Dec 2021 16:48:00 +0000 (16:48 +0000)
committerMogball <jeffniu22@gmail.com>
Wed, 5 Jan 2022 20:48:30 +0000 (20:48 +0000)
commit4ca5e95c6f4e8f48cd8315d801c186f4e7cae69c
tree8249cc256317f822e7380cb8edbdb112c4bda18d
parentdd83befe33a055c9053f16ff44f4639c6ea15f4a
[mlir] Symbol DCE ignores unknown symbols

Instead of failing when it encounters a reference to an unknown symbol, Symbol DCE should ignore them. References to unknown symbols do not affect the overall function of Symbol DCE, so it should not need to fail when it encounters one.

In general, requiring that symbol references always be valid rather than only when necessary can be overly conservative.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D116047
mlir/lib/Transforms/SymbolDCE.cpp
mlir/test/Transforms/test-symbol-dce.mlir