[mlir][analysis] Add an analysis for preserving symbol tables
authorJeff Niu <jeff@modular.com>
Thu, 8 Dec 2022 20:22:40 +0000 (12:22 -0800)
committerJeff Niu <jeff@modular.com>
Sun, 8 Jan 2023 21:16:16 +0000 (13:16 -0800)
commit496f9a7d8d4b61b6f5dfa21e2614043a2b27cf67
treeacd6b3b52c84c2ca2f6242464b77b6b95d4ce469
parenta22f1458f6a80820a685c3748f85ce573d11e846
[mlir][analysis] Add an analysis for preserving symbol tables

This patch adds a `SymbolTableAnalysis` that can be used with the
analysis manager. It contains a symbol table collection. This analysis
allows symbol tables to be preserved across passes so that they do not
need to be recomputed. The analysis assumes it remains valid because
most transformations automatically keep symbol tables up-to-date using
its `insert` and `erase` methods.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D139666
mlir/include/mlir/Analysis/SymbolTableAnalysis.h [new file with mode: 0644]