Mlir analysis depending on results of some other analysis

Hi, I am writing an analysis which need results of other analysis to construct itself (specifically, I’m hacking together mlir version of MemorySSA which depends on AliasAnalysis). As I understand, there is no way to to do this in current analysis infra. Am I missing something?

Most straightforward way to support this imo is to add support of second version of analysis constructor which takes both Operation and and AnalysisManager so analysis can request any other analysis from it (it will also need proper isInvalidated to reflect this dependency).

What do you think?

There is no way to have dependent analyses atm, but it is definitely necessary.

@River707 may have some thoughts about the implementation