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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Analysis/SymbolTableAnalysis.h | ||
---|---|---|
44 | OOC is there a way to still invalidate the analysis manually given this? Or would it remain valid analysis always? |
mlir/include/mlir/Analysis/SymbolTableAnalysis.h | ||
---|---|---|
44 | I don't think there's an API for invalidating analyses, but you can always reinitialize it. |
LGTM, this is desperately needed.
mlir/include/mlir/Analysis/SymbolTableAnalysis.h | ||
---|---|---|
44 | This is slightly concerning-ish, given that you won't be able to know when this actually gets invalidated by a pass. Is it a problem to just explicitly say that this gets preserved in the various passes that we need to? |
mlir/include/mlir/Analysis/SymbolTableAnalysis.h | ||
---|---|---|
44 | On the surface, it's a little annoying to have to explicitly mark the analysis as preserved for every single pass, but it also creates a composability issue: if this analysis were downstream, for example, any upstream pass will always invalidate the analysis: canonicalization, cse, etc. That requires the analysis to be upstreamed, which is problematic. |
OOC is there a way to still invalidate the analysis manually given this? Or would it remain valid analysis always?